We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 901323e commit 775ebefCopy full SHA for 775ebef
1 file changed
sunlight/pagination.py
@@ -10,6 +10,17 @@ def pageable(func):
10
11
12
class PagingService(object):
13
+ """
14
+ PagingService wraps normal services and iterates over the results of consecutive API calls. ::
15
+
16
+ from sunlight import congress
17
+ from sunlight.pagination import PagingService
18
19
+ congress = PagingService(congress)
20
21
+ print(len(list(congress.legislators(limit=55)))) # page more than a single page
22
23
24
25
limit_attr = 'limit'
26
page_attr = 'page'
0 commit comments