FlickrTags
| Kind of class: | class |
|---|---|
| Inherits from: | none |
| Version: | 1.0 |
| Author: | Fabricio Zuardi |
| Classpath: | com.zuardi.flickr.FlickrTags |
| File last modified: | Saturday, 04 September 2004, 10:41:14 |
FlickrTags
last update 08/28/2004
last update 08/28/2004
Summary
Constructor
- FlickrTags (api_key:String, rest_endpoint:String)
- These parameters are filled automatically if you are using a Flickr object
Class properties
- REST_ENDPOINT : String
Instance properties
Instance methods
- getListPhoto (photo_id:String)
- Get the tag list for a given photo.
- getListUser (user_id:String)
- Get the tag list for a given user (or the currently logged in user).
- getListUserPopular (user_id:String, count:Number)
- Get the popular tags for a given user (or the currently logged in user).
- getTagList (method:String, user_id:String, photo_id:String, count:Number)
Event handlers
- onListPhoto : Function
- callback function, called at the end of a getListPhoto method
- onListUser : Function
- callback function, called at the end of a getListUser method
- onListUserPopular : Function
- callback function, called at the end of a getListUserPopular method
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
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
Class properties
REST_ENDPOINT
static private REST_ENDPOINT:String = "http://www.flickr.com/services/rest/"
(read)
Instance properties
_api_key
private _api_key:String
(read)
_response
private _response:XML
(read)
_rest_endpoint
private _rest_endpoint:String
(read)
_tags
private _tags:Array
(read)
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
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
See also:
response
response:XML
(read)
last xml returned from server
Instance methods
getListPhoto
function getListPhoto (
photo_id:String)
Get the tag list for a given photo.
the results are stored in the list attribute
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
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
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.
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
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
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.
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);
getTagList
private function getTagList (
method:String,
user_id:String,
photo_id:String,
count:Number)
Event handlers
onListPhoto
onListPhoto:Function
(read)
callback function, called at the end of a getListPhoto method
See also:
onListUser
onListUser:Function
(read)
callback function, called at the end of a getListUser method
See also:
onListUserPopular
onListUserPopular:Function
(read)
callback function, called at the end of a getListUserPopular method
See also: