python-flickr-api icon indicating copy to clipboard operation
python-flickr-api copied to clipboard

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

Open jeangv opened this issue 5 years ago • 1 comments

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!

jeangv avatar Jul 08 '20 22:07 jeangv

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)

bryan avatar Jul 19 '20 04:07 bryan