Update verify_credentials docs

This commit is contained in:
Lorenz Diener 2017-12-13 17:11:45 +01:00
pare d28b5725f4
commit c06baa13b3
S'han modificat 2 arxius amb 11 adicions i 2 eliminacions

Veure arxiu

@ -134,7 +134,7 @@ If you are only interested in the fact an error was raised somewhere in
Mastodon.py, and not the details, this is the exception you can catch. Mastodon.py, and not the details, this is the exception you can catch.
`MastodonIllegalArgumentError` is generally a programming problem - you asked the `MastodonIllegalArgumentError` is generally a programming problem - you asked the
API to do something obviously invalid (i.e. specify a privacy scope that does API to do something obviously invalid (i.e. specify a privacy option that does
not exist). not exist).
`MastodonFileNotFoundError` and `MastodonNetworkError` are IO errors - could be you `MastodonFileNotFoundError` and `MastodonNetworkError` are IO errors - could be you
@ -176,8 +176,17 @@ User dicts
'header': # URL for their header image, can be animated 'header': # URL for their header image, can be animated
'avatar_static': # URL for their avatar, never animated 'avatar_static': # URL for their avatar, never animated
'header_static': # URL for their header image, never animated 'header_static': # URL for their header image, never animated
'source': # Additional information - only present for user dict returned from account_verify_credentials()
} }
mastodon.account_verify_credentials()["source"]
# Returns the following dictionary:
{
'privacy': # The users default visibility setting ("private", "unlisted" or "public")
'sensitive': # Denotes whether user media should be marked sensitive by default
'note': # Plain text version of the users bio
}
Toot dicts Toot dicts
~~~~~~~~~~ ~~~~~~~~~~
.. code-block:: python .. code-block:: python

Veure arxiu

@ -510,7 +510,7 @@ class Mastodon:
""" """
Fetch authenticated user's account information. Fetch authenticated user's account information.
Returns a user dict. Returns a user dict (Starting from 2.1.0, with an additional "source" field).
""" """
return self.__api_request('GET', '/api/v1/accounts/verify_credentials') return self.__api_request('GET', '/api/v1/accounts/verify_credentials')