More doc fixes, instance dictionaries
This commit is contained in:
pare
d5bb2418a9
commit
b57b66ebb5
S'han modificat 2 arxius amb 33 adicions i 22 eliminacions
|
@ -228,6 +228,20 @@ Card dicts
|
|||
'provider_url': # URL pointing to the embeds provider
|
||||
}
|
||||
|
||||
Instance dicts
|
||||
~~~~~~~~~~~~~~
|
||||
.. code-block:: python
|
||||
|
||||
mastodon.instance()
|
||||
# Returns the folowing dictionary
|
||||
{
|
||||
'description': # A brief instance description set by the admin
|
||||
'email': # The admin contact e-mail
|
||||
'title': # The instances title
|
||||
'uri': # The instances URL
|
||||
'version': # The instances mastodon version
|
||||
}
|
||||
|
||||
App registration and user authentication
|
||||
----------------------------------------
|
||||
Before you can use the mastodon API, you have to register your
|
||||
|
@ -248,7 +262,7 @@ methods for this are provided.
|
|||
.. automethod:: Mastodon.log_in
|
||||
.. automethod:: Mastodon.auth_request_url
|
||||
|
||||
Reading data: Instance
|
||||
Reading data: Instances
|
||||
-----------------------
|
||||
This function allows you to fetch information associated with the
|
||||
current instance.
|
||||
|
@ -300,9 +314,18 @@ Reading data: Follows
|
|||
|
||||
.. automethod:: Mastodon.follows
|
||||
|
||||
Reading data: Favourites
|
||||
------------------------
|
||||
|
||||
.. automethod:: Mastodon.favourites
|
||||
|
||||
Reading data: Follow requests
|
||||
-----------------------------
|
||||
|
||||
.. automethod:: Mastodon.follow_requests
|
||||
|
||||
Reading data: Searching
|
||||
-----------------------
|
||||
This function allows you to search for content.
|
||||
|
||||
.. automethod:: Mastodon.search
|
||||
|
||||
|
@ -317,25 +340,8 @@ muted or blocked by the logged in user.
|
|||
|
||||
Reading data: Reports
|
||||
------------------------------
|
||||
These functions allow you to retrieve information about reports filed
|
||||
by the authenticated user, and file a report against a user.
|
||||
|
||||
.. automethod:: Mastodon.reports
|
||||
.. automethod:: Mastodon.report
|
||||
|
||||
Reading data: Favourites
|
||||
------------------------
|
||||
This function allows you to get information about statuses favourited
|
||||
by the authenticated user.
|
||||
|
||||
.. automethod:: Mastodon.favourites
|
||||
|
||||
Reading data: Follow requests
|
||||
-----------------------------
|
||||
This function allows you to get a list of pending incoming follow
|
||||
requests for the authenticated user.
|
||||
|
||||
.. automethod:: Mastodon.follow_requests
|
||||
|
||||
Writing data: Statuses
|
||||
----------------------
|
||||
|
@ -379,6 +385,11 @@ to attach media to statuses.
|
|||
|
||||
.. automethod:: Mastodon.media_post
|
||||
|
||||
Writing data: Reports
|
||||
---------------------
|
||||
|
||||
.. automethod:: Mastodon.report
|
||||
|
||||
Streaming
|
||||
---------
|
||||
These functions allow access to the streaming API.
|
||||
|
|
|
@ -207,13 +207,13 @@ class Mastodon:
|
|||
return response['access_token']
|
||||
|
||||
###
|
||||
# Reading data: Instance
|
||||
# Reading data: Instances
|
||||
###
|
||||
def instance(self):
|
||||
"""
|
||||
Retrieve basic information about the instance, including the URI and administrative contact email.
|
||||
|
||||
Returns a dict.
|
||||
Returns an instance dict.
|
||||
"""
|
||||
return self.__api_request('GET', '/api/v1/instance/')
|
||||
|
||||
|
@ -656,7 +656,7 @@ class Mastodon:
|
|||
###
|
||||
def report(self, account_id, status_ids, comment):
|
||||
"""
|
||||
Report a user to the admin.
|
||||
Report statuses to the instances administrators.
|
||||
|
||||
Accepts a list of toot IDs associated with the report, and a comment.
|
||||
|
||||
|
|
Loading…
Referencia en una nova incidència