alexis-mignon / python-flickr-api

A python implementation of the Flickr API
BSD 3-Clause "New" or "Revised" License
367 stars 108 forks source link

How To Call A Photoset By Photoset ID or if not possible How To Use Walker On user.getPhotosets() #120

Open jeangv opened 4 years ago

jeangv commented 4 years ago

I am trying to get the Photoset object of a specific Flickr Photoset. I do not see how to use the flickr_api to call a specific Photoset by its id. Is this possible? I do see that I can get all the photo sets of a specific user using user.getPhotosets(). The problem here is the returned list does not seem to work with the Walker. Here is an example:

flickr_photosets = user.getPhotosets() flickr_photosets_list = flickr_api.Walker(flickr_photosets)

Errors out: TypeError: 'FlickrList' object is not callable

What are my options here? Thanks for any help!

bryan commented 4 years ago

You want to pass in the function and not the List coming from the response. Try the code below - which removed the parenthesis on the getPhotosets() callout.

flickr_photosets_list = flickr_api.Walker(user.getPhotosets)