FlickrTags
Inherits from:none (FlickrTags is a root class)
- Version: 1.0
- Author: Fabricio Zuardi
- Classpath: com.zuardi.flickr.FlickrTags
- File last modified: Saturday, 04 September 2004, 09:41:14
FlickrTags
last update 08/28/2004Summary
Constructor
Instance properties
Instance methods
Constructor
FlickrTags
function FlickrTags (
api_key:String,
rest_endpoint:String)
These parameters are filled automatically if you are using a Flickr object
otherwise, if you are instantiating a FlickrTags object, you have to enter the parameters
Parameters
api_key: :
(required) The api_key of the application
rest_endpoint::
(optional) The rest endpoint url
Instance properties
list
list:Array
(read)the last tags list returned from server
if it was the result of a getListUser call list is an Array containing the tags strings
if it was the result of a getListUserPopular call list is an Array of objects, each object having the following attributes:
tag, count
if it was the result of a getListPhoto call list is an Array of objects, each object having the following attributes:
tag, author, authorname
onListPhoto
onListPhoto:Function
(read,write)callback function, called at the end of a getListPhoto method
See also
onListUser
onListUser:Function
(read,write)callback function, called at the end of a getListUser method
See also
onListUserPopular
onListUserPopular:Function
(read,write)callback function, called at the end of a getListUserPopular method
See also
response
response:XML
(read)last xml returned from server
Instance methods
getListPhoto
public function getListPhoto (
photo_id:String)
Get the tag list for a given photo.
the results are stored in the list attribute
Parameters
photo_id:
(required) The id of the photo to return tags for.
Usage
my_flickr = new Flickr(APIKEY); my_flickr.tags.onListPhoto = function(error,obj){ if(!error){ trace(obj.list[0].tag) trace(obj.list[0].author) trace(obj.list[0].authorname) }else{ trace(error) } }; my_flickr.tags.getListPhoto(PHOTOID);
getListUser
public function getListUser (
user_id:String)
Get the tag list for a given user (or the currently logged in user).
the results are stored in the list attribute
Parameters
user_id:
(opitional) The NSID of the user to fetch the tag list for.
If this argument is not specified, the currently logged in user (if any) is assumed.
Usage
my_flickr = new Flickr(APIKEY); my_flickr.tags.onListUser = function(error,obj){ if(!error){ trace(obj.list[0]) }else{ trace(error) } }; my_flickr.tags.getListUser(USERID);
getListUserPopular
public function getListUserPopular (
user_id:String,
count:Number)
Get the popular tags for a given user (or the currently logged in user).
the results are stored in the list attribute
Parameters
user_id:
(opitional) The NSID of the user to fetch the tag list for.
If this argument is not specified, the currently logged in user (if any) is assumed.
count :
(opitional) Number of popular tags to return. defaults to 10 when this argument is not present.
Usage
my_flickr = new Flickr(APIKEY); my_flickr.tags.onListUserPopular = function(error,obj){ if(!error){ trace(obj.list[2].tag) trace(obj.list[2].count) }else{ trace(error) } }; my_flickr.tags.getListUserPopular(USERID,3);