aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2019-10-12 20:02:09 +0200
committerLorenz Diener <[email protected]>2019-10-12 20:02:09 +0200
commit0b952aef124af09b6ea1267aac48bea6fc12f710 (patch)
tree6f182e6706b23e8f0a0eba456796803ea749a508
parentb2bc879f445604c422c2645e578e591acee5a5ed (diff)
downloadmastodon.py-0b952aef124af09b6ea1267aac48bea6fc12f710.tar.gz
Implement "reason" for create_account
-rw-r--r--mastodon/Mastodon.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index 2adee7e..47f76e1 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -546,12 +546,13 @@ class Mastodon:
546 return response['access_token'] 546 return response['access_token']
547 547
548 @api_version("2.7.0", "2.7.0", "2.7.0") 548 @api_version("2.7.0", "2.7.0", "2.7.0")
549 def create_account(self, username, password, email, agreement=False, locale="en", scopes=__DEFAULT_SCOPES, to_file=None): 549 def create_account(self, username, password, email, agreement=False, reason=None, locale="en", scopes=__DEFAULT_SCOPES, to_file=None):
550 """ 550 """
551 Creates a new user account with the given username, password and email. "agreement" 551 Creates a new user account with the given username, password and email. "agreement"
552 must be set to true (after showing the user the instances user agreement and having 552 must be set to true (after showing the user the instances user agreement and having
553 them agree to it), "locale" specifies the language for the confirmation e-mail as an 553 them agree to it), "locale" specifies the language for the confirmation e-mail as an
554 ISO 639-1 (two-letter) language code. 554 ISO 639-1 (two-letter) language code. `reason` can be used to specify why a user
555 would like to join if approved-registrations mode is on.
555 556
556 Does not require an access token, but does require a client grant. 557 Does not require an access token, but does require a client grant.
557 558
Powered by cgit v1.2.3 (git 2.41.0)