diff options
Diffstat (limited to 'mastodon')
-rw-r--r-- | mastodon/Mastodon.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index d2d759a..36965ac 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py | |||
@@ -191,12 +191,7 @@ class Mastodon: | |||
191 | are wrong, scopes are not valid or granted scopes differ from requested. | 191 | are wrong, scopes are not valid or granted scopes differ from requested. |
192 | 192 | ||
193 | Returns: | 193 | Returns: |
194 | { | 194 | str @access_token |
195 | 'scope': 'read', | ||
196 | 'created_at': 1491599341, | ||
197 | 'access_token': 'd8daf46d...', | ||
198 | 'token_type': 'bearer' | ||
199 | } | ||
200 | """ | 195 | """ |
201 | if username is not None and password is not None: | 196 | if username is not None and password is not None: |
202 | params = self.__generate_params(locals(), ['scopes', 'to_file', 'code', 'refresh_token']) | 197 | params = self.__generate_params(locals(), ['scopes', 'to_file', 'code', 'refresh_token']) |
@@ -231,7 +226,7 @@ class Mastodon: | |||
231 | 226 | ||
232 | if to_file != None: | 227 | if to_file != None: |
233 | with open(to_file, 'w') as token_file: | 228 | with open(to_file, 'w') as token_file: |
234 | token_file.write(response + '\n') | 229 | token_file.write(response['access_token'] + '\n') |
235 | 230 | ||
236 | return response['access_token'] | 231 | return response['access_token'] |
237 | 232 | ||