diff --git a/docs/index.rst b/docs/index.rst index 9496da6..4dd6403 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -512,6 +512,14 @@ their relationships. .. automethod:: Mastodon.account_relationships .. 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 --------------------- @@ -532,7 +540,6 @@ Reading data: Searching .. automethod:: Mastodon.search - Reading data: Mutes and blocks ------------------------------ 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_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 ----------------------------- These functions allow you to accept or reject incoming follow requests. diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index 3b02881..f15ee23 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py @@ -1105,14 +1105,6 @@ class Mastodon: id = self.__unpack_id(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") 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)) 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") 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)) 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