finding a specific set

1 view
Skip to first unread message

Jesse Morrison

unread,
Jan 6, 2009, 4:15:42 PM1/6/09
to as3fli...@googlegroups.com
Hi

Do you know how to get a specific set of photos using the api? Right
now, I just search on the user ID and get the entire stream.

private function doSearch():void {
//search using user identifier - can we use another way of
finding user that returns proper photo data?
this._fs.photos.search(USERID);

//Add event listener for search complete
this._fs.addEventListener(FlickrResultEvent.PHOTOS_SEARCH,
searchResultsReceived, false, 0, true);
}

Is there another parameter I can use with the search() method to find a
set named "website" from a specific user?

Thanks

Jesse

jassa

unread,
Jan 6, 2009, 5:30:59 PM1/6/09
to ActionScript 3 Flickr Library
Hi Jesse,

There certainly is - you can use the photosets.getList() method. So in
your case, it would read something like:

private function getSets():void{
this._fs.photosets.getList(USERID);
this._fs.addEventListener(FlickrResultEvent.PHOTOSETS_GET_LIST,
handleSetList);
}
private function handleSetList(e:FlickrResultEvent):void{
var a:Array = e.data.photoSets as Array;
for(var i:uint = 0; i < a.length; i ++){
var ps:PhotoSet = a[i] as PhotoSet;
trace(ps.id);
}
}

Each of the sets in that Array will have an ID (along with a bunch of
other information). You can use the photosets.getPhotos() method and
pass it a set ID to get the photos that are inside of that set. Hope
that makes sense! Make sure you check out the following links to get
your head around it...

AS3 Flickr Library API Documentation
http://as3flickrlib.googlecode.com/svn/trunk/docs/index.html

photosets.getList method
http://as3flickrlib.googlecode.com/svn/trunk/docs/com/adobe/webapis/flickr/methodgroups/PhotoSets.html#getList()

and the photoset class
http://as3flickrlib.googlecode.com/svn/trunk/docs/com/adobe/webapis/flickr/PhotoSet.html

Hope that helps,

Jassa

mull...@gmail.com

unread,
Feb 6, 2009, 1:37:02 PM2/6/09
to ActionScript 3 Flickr Library
Hi, im dealing with a similar issue. If you know the setID can you
not skip a step and do:

private function getSets():void{
this._fs.photosets.getPhotos(SET_ID);
this._fs.addEventListener(FlickrResultEvent.PHOTOSETS_GET_PHOTOS,
handlePhotos);}

private function handlePhotos(e:FlickrResultEvent):void{
pics = evt.data.photoSet as PhotoSet;
/* and the array of photos is stored in pics.photos */

}

On Jan 6, 5:30 pm, jassa <ja...@viamedia.com.au> wrote:
> Hi Jesse,
>
> There certainly is - you can use the photosets.getList() method. So in
> your case, it would read something like:
>
> private function getSets():void{
>   this._fs.photosets.getList(USERID);
>   this._fs.addEventListener(FlickrResultEvent.PHOTOSETS_GET_LIST,
> handleSetList);}
>
> private function handleSetList(e:FlickrResultEvent):void{
>   var a:Array = e.data.photoSets as Array;
>   for(var i:uint = 0; i < a.length; i ++){
>     var ps:PhotoSet = a[i] as PhotoSet;
>     trace(ps.id);
>   }
>
> }
>
> Each of the sets in that Array will have an ID (along with a bunch of
> other information). You can use the photosets.getPhotos() method and
> pass it a set ID to get the photos that are inside of that set. Hope
> that makes sense! Make sure you check out the following links to get
> your head around it...
>
> AS3 Flickr Library API Documentationhttp://as3flickrlib.googlecode.com/svn/trunk/docs/index.html
>
> photosets.getList methodhttp://as3flickrlib.googlecode.com/svn/trunk/docs/com/adobe/webapis/f...()
>
> and the photoset classhttp://as3flickrlib.googlecode.com/svn/trunk/docs/com/adobe/webapis/f...
Reply all
Reply to author
Forward
0 new messages