Get Sets in a Collection

Aug 15, 2007 at 7:24 PM
On Flickr Sets are Organized into Collections. Is there any way to do a search based on a Collection ID and return a list of sets in that collection, or a search for all of the collections for a certain user. If you could point me in the right direction I would appreciate it (an example in C# would be great!).

Aug 16, 2007 at 7:59 AM
There is no Flickr API support for collections yet, but as soon as there is I will add it to the .Net library.
Aug 16, 2007 at 1:49 PM
Thanks for the quick response... I'll go over to the Flickr forum and start nagging :)
Feb 16, 2008 at 4:27 PM
Sets are available in the Flickr API. Is this in FlickrNet yet?

Jul 27, 2009 at 10:37 AM

Is this possible now as I can't seem to find anything in the FlickrNet API to achieve it?

Jul 29, 2009 at 1:22 AM

Yes, it doesn't seem like the API has a getcollections method yet.  Any idea when we might see it?  Or how we could add it ourselves?

Jul 29, 2009 at 10:26 AM

I've just added the first draft of Collection support to the source code today.

Aug 1, 2009 at 1:46 AM

Thanks Sam, that's great news!  I tried it out tonight.  GetTree() is throwing an error when I don't provide a username and collection id.  Is there not a way to just get a list of collections without having to specify which collection you want?

The error is "User not found (1)" - and it's occuring here:


public Collection[] CollectionsGetTree(string collectionId, string userId)
			Hashtable parameters = new Hashtable();
			parameters.Add("method", "flickr.collections.getTree");
			if( collectionId != null ) parameters.Add("collection_id", collectionId);
			if( userId != null ) parameters.Add("user_id", userId);

			FlickrNet.Response response = GetResponseCache(parameters);

			if (response.Status == ResponseStatus.OK)
				return response.CollectionList.CollectionList;
				throw new FlickrApiException(response.Error);


Aug 1, 2009 at 7:26 AM

If you don't supply a collectionid or userid then the call must be authenticated, so it can work out which user you are.

Have you set the AuthToken?