Fix pagination on some of the API methods.
authorJosh Roesslein <jroesslein@gmail.com>
Fri, 13 Nov 2009 02:41:57 +0000 (20:41 -0600)
committerJosh Roesslein <jroesslein@gmail.com>
Fri, 13 Nov 2009 02:41:57 +0000 (20:41 -0600)
tweepy/api.py

index b6cc28867e5551da6aa9226908b137adbcf765a2..7b332f53e4df469ca656189798c54ab3a8ae87c6 100644 (file)
@@ -486,6 +486,7 @@ class API(object):
             allowed_param = ['cursor'],
             require_auth = True
         )(self, *args, **kargs)
+    lists.pagination_mode = 'cursor'
 
     def lists_memberships(self, *args, **kargs):
         return bind_api(
@@ -494,6 +495,7 @@ class API(object):
             allowed_param = ['cursor'],
             require_auth = True
         )(self, *args, **kargs)
+    lists_memberships.pagination_mode = 'cursor'
 
     def lists_subscriptions(self, *args, **kargs):
         return bind_api(
@@ -502,6 +504,7 @@ class API(object):
             allowed_param = ['cursor'],
             require_auth = True
         )(self, *args, **kargs)
+    lists_subscriptions.pagination_mode = 'cursor'
 
     def list_timeline(self, owner, slug, *args, **kargs):
         return bind_api(
@@ -509,6 +512,7 @@ class API(object):
             parser = parse_statuses,
             allowed_param = ['since_id', 'max_id', 'count', 'page']
         )(self, *args, **kargs)
+    list_timeline.pagination_mode = 'page'
 
     def get_list(self, owner, slug):
         return bind_api(
@@ -540,6 +544,7 @@ class API(object):
             parser = parse_users,
             allowed_param = ['cursor']
         )(self, *args, **kargs)
+    list_members.pagination_mode = 'cursor'
 
     def is_list_member(self, owner, slug, user_id):
         try:
@@ -572,12 +577,13 @@ class API(object):
             parser = parse_users,
             allowed_param = ['cursor']
         )(self, *args, **kargs)
+    list_subscribers.pagination_mode = 'cursor'
 
     def is_subscribed_list(self, owner, slug, user_id):
         try:
             return bind_api(
                 path = '/%s/%s/subscribers/%s.json' % (owner, slug, user_id),
-                parser = parse_user,
+                parser = parse_user
             )(self)
         except TweepError:
             return False
@@ -589,6 +595,7 @@ class API(object):
         parser = parse_search_results,
         allowed_param = ['q', 'lang', 'locale', 'rpp', 'page', 'since_id', 'geocode', 'show_user']
     )
+    search.pagination_mode = 'page'
 
     """ trends """
     trends = bind_api(