This project has moved. For the latest updates, please go here.

How to get a list of photosets by user id?

Topics: Developer Forum
Mar 9, 2007 at 7:52 PM
I have found out a function PhotosetsGetList() as:

Public Function PhotosetsGetList() As FlickrNet.Photosets
Member of: FlickrNet.Flickr

But the intellisense does not indicate the existance of it under FlickrNet.Flickr.

How can I use this function?
Mar 12, 2007 at 9:11 AM
Simply call

Flickr flickr = new Flickr(ApiKey, Secret);
string userid = "23423423@N01";
Photosets sets = flickr.PhotosetsGetList(userid);

If you are authenticated and want the authenticated users photosets then you can skip the userid parameter.
Mar 12, 2007 at 10:12 PM
Thank you for the reply first.

Notice in the example website, the author uses PhotoSearchOptions to retrieve a photocollection. Please see code below:

    Public Shared Function PhotoRecent() As FlickrNet.PhotoCollection
        Dim flickr As New FlickrNet.Flickr()
        Dim options As New FlickrNet.PhotoSearchOptions()
        options.UserId = ConfigurationManager.AppSettings.Get("UserId")
        options.PerPage = 20
        options.Page = 1
        options.SortOrder = FlickrNet.PhotoSearchSortOrder.DatePostedDesc
        Dim photos As FlickrNet.Photos = flickr.PhotosSearch(options)
        If photos.PhotoCollection Is Nothing Then
            Return New FlickrNet.PhotoCollection()
            Return photos.PhotoCollection
        End If
    End Function

And it is easy to filter by tags using options.tags.
The problem is that there does not seem to be a options.photosets. So how can we revise the function above a little bit to retrieve a filtered PhotoCollection by Photosets?

Thank you for the help.