From 751fda860a69bd123509a43a263ac7eb813fdc5c Mon Sep 17 00:00:00 2001 From: Oleg Komarov Date: Sat, 4 May 2019 10:21:25 +0200 Subject: [PATCH] Add cursor option to blocks_ids and mutes_ids --- docs/api.rst | 6 ++++-- tweepy/api.py | 10 ++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/api.rst b/docs/api.rst index 3148836..268fa80 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -477,11 +477,12 @@ Block Methods :rtype: list of :class:`User` objects -.. method:: API.blocks_ids() +.. method:: API.blocks_ids([cursor]) Returns an array of numeric user ids the authenticating user is blocking. + :param cursor: |cursor| :rtype: list of Integers @@ -508,10 +509,11 @@ Mute Methods :rtype: :class:`User` object -.. method:: API.mutes_ids() +.. method:: API.mutes_ids([cursor]) Returns an array of numeric user ids the authenticating user has muted. + :param cursor: |cursor| :rtype: list of Integers diff --git a/tweepy/api.py b/tweepy/api.py index 599e260..40eb05e 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -789,11 +789,14 @@ class API(object): @property def mutes_ids(self): - """ :reference: https://developer.twitter.com/en/docs/accounts-and-users/mute-block-report-users/api-reference/get-mutes-users-ids """ + """ :reference: https://developer.twitter.com/en/docs/accounts-and-users/mute-block-report-users/api-reference/get-mutes-users-ids + :allowed_param:'cursor' + """ return bind_api( api=self, path='/mutes/users/ids.json', payload_type='json', + allowed_param=['cursor'], require_auth=True ) @@ -840,11 +843,14 @@ class API(object): @property def blocks_ids(self): - """ :reference: https://developer.twitter.com/en/docs/accounts-and-users/mute-block-report-users/api-reference/get-blocks-ids """ + """ :reference: https://developer.twitter.com/en/docs/accounts-and-users/mute-block-report-users/api-reference/get-blocks-ids + :allowed_param:'cursor' + """ return bind_api( api=self, path='/blocks/ids.json', payload_type='json', + allowed_param=['cursor'], require_auth=True ) -- 2.25.1