Skip to content

Commit 44dce0d

Browse files
committed
Add exhaustive pagination example to README
1 parent 0312f8f commit 44dce0d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,15 @@ for media in recent_media:
126126
photos.append('<img src="%s"/>' % media.images['thumbnail'].url)
127127
```
128128

129+
And an example of exhaustively pursuing a paginated endpoint:
130+
131+
``` python
132+
follows, next_ = api.user_follows()
133+
while next_:
134+
more_follows, next_ = api.user_follows(with_next_url=next_)
135+
follows.extend(more_follows)
136+
```
137+
129138
Users: http://instagr.am/developer/endpoints/users/
130139

131140
``` python

0 commit comments

Comments
 (0)