You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Imgur's documentation, you are able to specify the an integer that represents the number of the paginated gallery. PyImgur does not offer an argument for the page number, and I'm in need of this functionality at the moment.
def get_subreddit_gallery(self, subreddit, sort='time', window='top',
limit=None, page=0):
"""
Return a list of gallery albums/images submitted to a subreddit.
A subreddit is a subsection of the website www.reddit.com, where users
can, among other things, post images.
:param subreddit: A valid subreddit name.
:param sort: time | top - defaults to top.
:param window: Change the date range of the request if the section is
"top", day | week | month | year | all, defaults to day.
:param limit: The number of items to return.
:param page: The page number of the gallery
"""
url = (self._base_url + "/3/gallery/r/{0}/{1}/{2}/{3}".format(
subreddit, sort, window, page))
resp = self._send_request(url, limit=limit)
return [_get_album_or_image(thing, self) for thing in resp]
The text was updated successfully, but these errors were encountered:
In Imgur's documentation, you are able to specify the an integer that represents the number of the paginated gallery. PyImgur does not offer an argument for the page number, and I'm in need of this functionality at the moment.
https://api.imgur.com/endpoints/gallery#subreddit
Perhaps update the function like so:
The text was updated successfully, but these errors were encountered: