Skip to content

Commit 3619126

Browse files
committed
Remove 'page' parameter from some endpoints.
Using max_id/since_id or cursor is the preferred way and sometimes the only way to paginate though a collection.
1 parent a071bac commit 3619126

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tweepy/api.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def __init__(self, auth_handler=None,
3737
home_timeline = bind_api(
3838
path = '/statuses/home_timeline.json',
3939
payload_type = 'status', payload_list = True,
40-
allowed_param = ['since_id', 'max_id', 'count', 'page'],
40+
allowed_param = ['since_id', 'max_id', 'count'],
4141
require_auth = True
4242
)
4343

@@ -46,7 +46,7 @@ def __init__(self, auth_handler=None,
4646
path = '/statuses/user_timeline.json',
4747
payload_type = 'status', payload_list = True,
4848
allowed_param = ['id', 'user_id', 'screen_name', 'since_id',
49-
'max_id', 'count', 'page', 'include_rts']
49+
'max_id', 'count', 'include_rts']
5050
)
5151

5252
""" statuses/mentions """
@@ -85,7 +85,7 @@ def __init__(self, auth_handler=None,
8585
retweets_of_me = bind_api(
8686
path = '/statuses/retweets_of_me.json',
8787
payload_type = 'status', payload_list = True,
88-
allowed_param = ['since_id', 'max_id', 'count', 'page'],
88+
allowed_param = ['since_id', 'max_id', 'count'],
8989
require_auth = True
9090
)
9191

@@ -195,7 +195,7 @@ def me(self):
195195
direct_messages = bind_api(
196196
path = '/direct_messages.json',
197197
payload_type = 'direct_message', payload_list = True,
198-
allowed_param = ['since_id', 'max_id', 'count', 'page'],
198+
allowed_param = ['since_id', 'max_id', 'count'],
199199
require_auth = True
200200
)
201201

@@ -282,7 +282,7 @@ def lookup_friendships(self, user_ids=None, screen_names=None):
282282
friends = bind_api(
283283
path = '/friends/list.json',
284284
payload_type = 'user', payload_list = True,
285-
allowed_param = ['id', 'user_id', 'screen_name', 'page', 'cursor']
285+
allowed_param = ['id', 'user_id', 'screen_name', 'cursor']
286286
)
287287

288288
""" friendships/incoming """
@@ -310,7 +310,7 @@ def lookup_friendships(self, user_ids=None, screen_names=None):
310310
followers = bind_api(
311311
path = '/followers/list.json',
312312
payload_type = 'user', payload_list = True,
313-
allowed_param = ['id', 'user_id', 'screen_name', 'page', 'cursor']
313+
allowed_param = ['id', 'user_id', 'screen_name', 'cursor']
314314
)
315315

316316
""" account/verify_credentials """
@@ -432,7 +432,7 @@ def update_profile_background_image(self, filename, *args, **kargs):
432432
blocks = bind_api(
433433
path = '/blocks/list.json',
434434
payload_type = 'user', payload_list = True,
435-
allowed_param = ['page'],
435+
allowed_param = ['cursor'],
436436
require_auth = True
437437
)
438438

0 commit comments

Comments
 (0)