hanklords/flickraw

Getting the Meta-Pages-Informationen for a request

Closed this issue · 2 comments

Hej hanklords!

First of all, thanks for creating this gem. I'm using it for some research with georeferenced pictures. Therefore I often get results which needs more than one api call (= pages). At the App Garden of Flickr (for example https://www.flickr.com/services/api/explore/flickr.people.getPhotos), you're getting the information how much entries for a given call exists. For example, if you want to get the photos of a person, you know that your api call result contains page number 1 of 3 pages (photos page="1" pages="3" perpage="5" total="11"). So you can automatically trigger the next page until you're finished.

Would it be possible to get these information via your gem too?

Thx for helping!

photos = flickr.people.getPhotos :user_id => 'blabla'
photos.page # => 1
photos.pages # => 45
photos.total # => 4435

Ah, perfect. Thanks for the info! Maybe this could be integrated into the documentation. I could prepare this if you want and then make a pull request.