FlickrPhotos
Inherits from:none (FlickrPhotos is a root class)
- Version: 1.0
- Author: Fabricio Zuardi
- Classpath: com.zuardi.flickr.FlickrPhotos
- File last modified: Saturday, 04 September 2004, 09:40:45
FlickrPhotos
last update 09/02/2004Summary
Constructor
Instance properties
Constructor
FlickrPhotos
function FlickrPhotos (
api_key:String,
user_email:String,
user_password:String,
rest_endpoint:String)
These parameters are filled automatically if you are using a Flickr object
otherwise, if you are instantiating a FlickrPhotos, object you have to enter the parameters
Parameters
api_key: :
(required) The api_key of the application
user_email: :
(optional) The email to use on methods that requires user authentication
user_password::
(optional) The email to use on methods that requires user authentication
rest_endpoint::
(optional) The rest endpoint url
Instance properties
onGetInfo
onGetInfo:Function
(read,write)callback function, called at the end of a getInfo method
See also
onGetSizes
onGetSizes:Function
(read,write)callback function, called at the end of a getSizess method
See also
photo_info
photo_info:Object
(read)response
response:XML
(read)last xml returned from server
sizes
sizes:Array
(read)Instance methods
getInfo
public function getInfo (
photo_id:String)
Get information about a photo.
photo_info:
dateuploaded, ownerId, ownerUsername, ownerRealName, ownerLocation, title, description, ispublic,
isfamily, isfriend, cancomment, canaddmeta, comments, notes (id, author, authorname, x, y, w, h,note), tags
Parameters
user_email: :
(Required) The email used to authenticate on Flickr
user_password::
(Required) The password used to authenticate on Flickr
photo_id: :
(Required) The is of the photo to fetch information for.
Usage
my_flickr = new Flickr(APIKEY); my_flickr.photos.onGetInfo = function(error,obj){ if(!error){ trace(obj.photo_info.dateuploaded) trace(obj.photo_info.ownerId) trace(obj.photo_info.ownerUsername) trace(obj.photo_info.ownerRealName) trace(obj.photo_info.ownerLocation) trace(obj.photo_info.title) trace(obj.photo_info.description) trace(obj.photo_info.ispublic) trace(obj.photo_info.isfamily) trace(obj.photo_info.isfriend) trace(obj.photo_info.cancomment) trace(obj.photo_info.canaddmeta) trace(obj.photo_info.comments) trace(obj.photo_info.notes[0].id) trace(obj.photo_info.notes[0].author) trace(obj.photo_info.notes[0].authorname) trace(obj.photo_info.notes[0].x) trace(obj.photo_info.notes[0].y) trace(obj.photo_info.notes[0].w) trace(obj.photo_info.notes[0].h) trace(obj.photo_info.notes[0].note) trace(obj.photo_info.tags[0]) }else{ trace(error) } }; my_flickr.photos.getInfo(PHOTOID);
getSizes
public function getSizes (
photo_id:String)
Returns the available sizes for a photo.
sizes:
label, width, height, source, url
Parameters
photo_id::
(Required) The id of the photo to fetch size information for.
Usage
my_flickr = new Flickr(APIKEY); my_flickr.photos.onGetSizes = function(error,obj){ if(!error){ trace(obj.sizes[0].label) trace(obj.sizes[0].width) trace(obj.sizes[0].height) trace(obj.sizes[0].source) trace(obj.sizes[0].url) }else{ trace(error) } }; my_flickr.photos.getSizes(PHOTOID);