How get Sets from Collection

Feb 12, 2010 at 1:54 PM

I try get list of sets, and set id from my collection to array. Can any body help me?

Coordinator
Feb 12, 2010 at 1:57 PM
Can you define what you mean a little bit better?

The Flickr.PhotosetsGetList returns a Photosets class, which contains
the PhotosetCollection property which is an array of Photoset
instances.

What else do you need?

Sam

On 12 February 2010 14:54, ravenweb <notifications@codeplex.com> wrote:
> From: ravenweb
>
> I try get list of sets, and set id from my collection to array. Can any body
> help me?
>
> Read the full discussion online.
>
> To add a post to this discussion, reply to this email
> ([email removed])
>
> To start a new discussion for this project, email
> [email removed]
>
> You are receiving this email because you subscribed to this discussion on
> CodePlex. You can unsubscribe or change your settings on codePlex.com.
>
> Please note: Images and attachments will be removed from emails. Any posts
> to this discussion will also be available online at codeplex.com
Feb 12, 2010 at 2:49 PM

Ok, i have variable with id the Collections. In this Collections i have few Set. I want get list id and name from this Collections. So, i started that functions:

        private void GetLitsSestt(string collection_id, string userId)
        {
            Flickr flickr = new Flickr(ApiKey, SharedSecret, Token);
            Auth auth = flickr.AuthCheckToken(Token);
            PhotoCollection drzew = flickr.PhotosetsGetList(
        }

private void GetLitsSestt(string collection_id)
{
Flickr flickr = new Flickr(ApiKey, SharedSecret, Token);
        Auth auth = flickr.AuthCheckToken(Token);
PhotoCollection lista_setow[] = flickr.PhotosetsGetList(string collection_id);
}

Obviously does not work, but finally I wants get table lista_setow[] whit list of id Sets.
lista_setow[0] = 779191 // Set id number 1 in collection_id...
lista_setow[9] = 818110 // Set id #9 -//-
etc

Sorry but I do not know from which side of this issue and resolve it if you want to get ready functions. 
I found in this thread http://flickrnet.codeplex.com/Thread/View.aspx?ThreadId=13851 similar problem but i dont know how use this functions. I work in Windows Forms Apllciation and dont have experience with the Console Apllication so, sometimes I do not know how to rewrite the code ;)  

 

Coordinator
Feb 12, 2010 at 3:14 PM

A 'Set' and a 'Collection' are two completely different things.

The PhotosetsGetList method takes one parameter - which is the User ID - this is the ID of the user, and not the ID of a particular collection or set.

Flickr.CollectionGetTree returns an array of Collection objects, that can each have inner Collections of Sets. To get the list of sets within a collection you would do something like this:

 

 

Flickr f = new Flickr(APiKey, Secret, Token);
Collection[] colArray = f.CollectionsGetTree(collectionId);
foreach(Collection col in colArray)
{
   foreach(CollectionSet colSet in col.Sets)
   {
      Photoset photoSet = f.PhotosetGetPhotos(colSet.SetId);
      // Do something with the photos here.
   }
}