FlickrTest
Inherits from:none (FlickrTest is a root class)
- Version: 1.0
- Author: Fabricio Zuardi
- Classpath: com.zuardi.flickr.FlickrTest
- File last modified: Saturday, 04 September 2004, 09:41:42
FlickrTest
last update 08/29/2004Summary
Constructor
Constructor
FlickrTest
function FlickrTest (
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
onEcho
onEcho:Function
(read,write)callback function, called at the end of a echo method
See also
onTestLogin
onTestLogin:Function
(read,write)callback function, called at the end of a login method
See also
params
params:Array
(read)a list of parameters, resulted from a echo method call
is an Array of objects, each object has the following attributes
name, value
See also
response
response:XML
(read)last xml returned from server
user_id
user_id:String
(read)username
username:String
(read)Instance methods
echo
public function echo (
params)
A testing method which echo's all paramaters back in the response.
the results are stored in the params attribute
Usage
my_flickr = new Flickr(APIKEY);
my_flickr.test.onEcho = function(error,obj){
if(!error){
trace(obj.params[2].name)
trace(obj.params[2].value)
trace(obj.params[3].name)
trace(obj.params[3].value)
}else{
trace(error)
}
};
my_flickr.test.echo({test:1,foo:"bar"});
login
public function login (
)
A testing method which checks if the caller is logged in then returns their username.
the results are stored in the attributes user_id and username
Usage
my_flickr = new Flickr(APIKEY); my_flickr.test.onTestLogin = function(error,obj){ if(!error){ trace(obj.user_id) trace(obj.username) }else{ trace(error) } }; my_flickr.test.login();