FlickrBlogs

Kind of class:class
Inherits from:none
Version:1.0
Author:Fabricio Zuardi
Classpath:com.zuardi.flickr.FlickrBlogs
File last modified:Saturday, 04 September 2004, 10:38:40
FlickrBlogs
last update 08/25/2004

Summary


Constructor
  • 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
Class properties
Instance properties
Instance methods
  • getList (user_email:String, user_password:String)
    • Get a list of configured blogs for the calling user
  • 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.
Event handlers
  • onListLoaded : Function
    • callback function, called at the end of a getList method
  • onPhotoPosted : Function
    • callback function, called at the end of a postPhoto method

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

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)

_blogs

private _blogs:Array
(read)

_email

private _email:String
(read)

_password

private _password:String
(read)

_response

private _response:XML
(read)

_rest_endpoint

private _rest_endpoint:String
(read)

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:

response

response:XML
(read)

last xml returned from server

Instance methods

getList

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

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")

Event handlers

onListLoaded

onListLoaded:Function
(read)

callback function, called at the end of a getList method
See also:

onPhotoPosted

onPhotoPosted:Function
(read)

callback function, called at the end of a postPhoto method
See also: