FlickrBlogs
Inherits from:none (FlickrBlogs is a root class)
- Version: 1.0
- Author: Fabricio Zuardi
- Classpath: com.zuardi.flickr.FlickrBlogs
- File last modified: Saturday, 04 September 2004, 09:38:40
FlickrBlogs
last update 08/25/2004Summary
Constructor
Instance properties
Constructor
FlickrBlogs
function FlickrBlogs (
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 FlickrBlogs, 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
list
list:Array
(read)a list of the blogs, resulted from a getList method call
is an Array of objects, each object has the following attributes
id, name, needspassword, url
See also
onListLoaded
onListLoaded:Function
(read,write)callback function, called at the end of a getList method
See also
onPhotoPosted
onPhotoPosted:Function
(read,write)callback function, called at the end of a postPhoto method
See also
response
response:XML
(read)last xml returned from server
Instance methods
getList
public function getList (
user_email:String,
user_password:String)
Get a list of configured blogs for the calling user
entries that can be accessed through the list attribute
Parameters
user_email: :
(required) The email used to authenticate on Flickr
user_password::
(required) The password used to authenticate on Flickr
Usage
my_flickr = new Flickr(APIKEY); my_flickr.blogs.onListLoaded = function(error,obj){ if(!error){ trace(obj.list[0].name) }else{ trace(error) } }; my_flickr.blogs.getList(USEREMAIL,USERPASSWD);
postPhoto
public function postPhoto (
user_email:String,
user_password:String,
blog_id:String,
photo_id:String,
post_title:String,
description:String,
blog_password:String)
Post a photo in the specified blog.
Parameters
user_email: :
(required) The email used to authenticate on Flickr
user_password::
(required) The password used to authenticate on Flickr
blog_id: :
(required) The id of the blog you want to post, you can obtain this id using getList
photo_id: :
(required) The id of your flickr photo you want to post on the blog
post_title: :
(required) The title of the post
description: :
(required) A text to go along with the photo on your blog
blog_password::
(optional) Your blog password, only necessary if you aren't storing it on flickr (needspassword = 1)
Usage
my_flickr = new Flickr(APIKEY); my_flickr.blogs.onPhotoPosted = function(error){ if(!error){ trace("post successful!") }else{ trace(error) } } my_flickr.blogs.postPhoto(USEREMAIL,USERPASSWD,BLOGID,PHOTOID,"Some title","A descrition","your_blog_password")