Document list endpoints
This commit is contained in:
pare
0b5c0ae5cc
commit
afaab2b874
S'han modificat 2 arxius amb 23 adicions i 11 eliminacions
|
@ -512,6 +512,14 @@ their relationships.
|
||||||
.. automethod:: Mastodon.account_relationships
|
.. automethod:: Mastodon.account_relationships
|
||||||
.. automethod:: Mastodon.account_search
|
.. automethod:: Mastodon.account_search
|
||||||
|
|
||||||
|
Reading data: Lists
|
||||||
|
-------------------
|
||||||
|
These functions allow you to view information about lists.
|
||||||
|
|
||||||
|
.. automethod:: Mastodon.lists
|
||||||
|
.. automethod:: Mastodon.list
|
||||||
|
.. automethod:: Mastodon.list_accounts
|
||||||
|
|
||||||
Reading data: Follows
|
Reading data: Follows
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
|
@ -532,7 +540,6 @@ Reading data: Searching
|
||||||
|
|
||||||
.. automethod:: Mastodon.search
|
.. automethod:: Mastodon.search
|
||||||
|
|
||||||
|
|
||||||
Reading data: Mutes and blocks
|
Reading data: Mutes and blocks
|
||||||
------------------------------
|
------------------------------
|
||||||
These functions allow you to get information about accounts that are
|
These functions allow you to get information about accounts that are
|
||||||
|
@ -593,6 +600,19 @@ These functions allow you to interact with other accounts: To (un)follow and
|
||||||
.. automethod:: Mastodon.account_unmute
|
.. automethod:: Mastodon.account_unmute
|
||||||
.. automethod:: Mastodon.account_update_credentials
|
.. automethod:: Mastodon.account_update_credentials
|
||||||
|
|
||||||
|
Writing data: Lists
|
||||||
|
-------------------
|
||||||
|
These functions allow you to create, maintain and delete lists.
|
||||||
|
|
||||||
|
When creating lists, note that (As of Mastodon 2.1.0), a user can only
|
||||||
|
have a maximum of 50 lists.
|
||||||
|
|
||||||
|
.. automethod:: Mastodon.list_create
|
||||||
|
.. automethod:: Mastodon.list_update
|
||||||
|
.. automethod:: Mastodon.list_delete
|
||||||
|
.. automethod:: Mastodon.list_accounts_add
|
||||||
|
.. automethod:: Mastodon.list_accounts_delete
|
||||||
|
|
||||||
Writing data: Follow requests
|
Writing data: Follow requests
|
||||||
-----------------------------
|
-----------------------------
|
||||||
These functions allow you to accept or reject incoming follow requests.
|
These functions allow you to accept or reject incoming follow requests.
|
||||||
|
|
|
@ -1105,14 +1105,6 @@ class Mastodon:
|
||||||
id = self.__unpack_id(id)
|
id = self.__unpack_id(id)
|
||||||
self.__api_request('DELETE', '/api/v1/lists/{0}'.format(id))
|
self.__api_request('DELETE', '/api/v1/lists/{0}'.format(id))
|
||||||
|
|
||||||
@api_version("2.1.0")
|
|
||||||
def list_delete(self, id):
|
|
||||||
"""
|
|
||||||
Delete a list.
|
|
||||||
"""
|
|
||||||
id = self.__unpack_id(id)
|
|
||||||
self.__api_request('DELETE', '/api/v1/lists/{0}'.format(id))
|
|
||||||
|
|
||||||
@api_version("2.1.0")
|
@api_version("2.1.0")
|
||||||
def list_accounts_add(self, id, account_ids):
|
def list_accounts_add(self, id, account_ids):
|
||||||
"""
|
"""
|
||||||
|
@ -1125,7 +1117,7 @@ class Mastodon:
|
||||||
account_ids = list(map(lambda x: self.__unpack_id(x), account_ids))
|
account_ids = list(map(lambda x: self.__unpack_id(x), account_ids))
|
||||||
|
|
||||||
params = self.__generate_params(locals(), ['id'])
|
params = self.__generate_params(locals(), ['id'])
|
||||||
return self.__api_request('POST', '/api/v1/lists/{0}/accounts'.format(id), params)
|
self.__api_request('POST', '/api/v1/lists/{0}/accounts'.format(id), params)
|
||||||
|
|
||||||
@api_version("2.1.0")
|
@api_version("2.1.0")
|
||||||
def list_accounts_delete(self, id, account_ids):
|
def list_accounts_delete(self, id, account_ids):
|
||||||
|
@ -1139,7 +1131,7 @@ class Mastodon:
|
||||||
account_ids = list(map(lambda x: self.__unpack_id(x), account_ids))
|
account_ids = list(map(lambda x: self.__unpack_id(x), account_ids))
|
||||||
|
|
||||||
params = self.__generate_params(locals(), ['id'])
|
params = self.__generate_params(locals(), ['id'])
|
||||||
return self.__api_request('DELETE', '/api/v1/lists/{0}/accounts'.format(id), params)
|
self.__api_request('DELETE', '/api/v1/lists/{0}/accounts'.format(id), params)
|
||||||
|
|
||||||
###
|
###
|
||||||
# Writing data: Reports
|
# Writing data: Reports
|
||||||
|
|
Loading…
Referencia en una nova incidència