Skip to content
This repository was archived by the owner on Oct 4, 2023. It is now read-only.

Commit 02661ee

Browse files
committed
Merge pull request #37 from xDEADC0DE/adding-page-option
adding a "page" parameter to get_gallery_favorites, get_account_favorites
2 parents 4684e2e + 0aaaa98 commit 02661ee

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

imgurpython/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,15 +184,15 @@ def get_account(self, username):
184184
account_data['pro_expiration'],
185185
)
186186

187-
def get_gallery_favorites(self, username):
187+
def get_gallery_favorites(self, username, page=0):
188188
self.validate_user_context(username)
189-
gallery_favorites = self.make_request('GET', 'account/%s/gallery_favorites' % username)
189+
gallery_favorites = self.make_request('GET', 'account/%s/gallery_favorites/%d' % (username, page))
190190

191191
return build_gallery_images_and_albums(gallery_favorites)
192192

193-
def get_account_favorites(self, username):
193+
def get_account_favorites(self, username, page=0):
194194
self.validate_user_context(username)
195-
favorites = self.make_request('GET', 'account/%s/favorites' % username)
195+
favorites = self.make_request('GET', 'account/%s/favorites/%d' % (username, page))
196196

197197
return build_gallery_images_and_albums(favorites)
198198

0 commit comments

Comments
 (0)