com.abiquo.api.resources.TwitxrResource Class Reference

This class represents a TwitxrResource, and it exposes the Twitxr API to the grid. More...

Inherits ResourceInstance.

List of all members.

Public Member Functions

 TwitxrResource ()
 Creates a new TwitxrResource with the default values.
 TwitxrResource (ResourceInstance resourceInstance)
 Creates a new TwitxrResource based on a generic ResourceInstance.
Job checkStringLocation (String place)
 Creates a new Job which once executed, checks if the place passed as parameter is a valid location or not.
Job getFriendsTimeline (String user, String since)
 Creates a new Job which once executed, returns the posts for the requested user and all the people that he follows.
Job getPublicTimeline ()
 Creates a new Job which once executed, returns the latest 20 posts in the general Twitxr timeline.
Job getUserData (String user)
 Creates a new Job which once executed, returns the profile data of the user.
Job getUserReplies (String since)
 Creates a new Job which once executed, returns the replies for the requested user.
Job getUserTimeline (String user)
 Creates a new Job which once executed, returns the posts for the requested user.
Job getUserTimeline (String user, String since)
 Creates a new Job which once executed, returns the posts of the requested user.
Job postUpdate (String text, String place)
 Creates a new Job which once executed, allows you to post your Twitxr updates.
Job setCredentials (String userName, String password)
 Creates a new Job which once executed, login the user into Twitxr.

Static Public Member Functions

static TwitxrResource cast (ResourceInstance resourceInstance)
 Converts a generic ResourceInstance into a new one of type TwitxrResource.

Static Public Attributes

static final String ID = "Twitxr"
 String containing the identifier for this resource.


Detailed Description

This class represents a TwitxrResource, and it exposes the Twitxr API to the grid.

See also:
http://www.twitxr.com/public_api for more information
Note:
XML description of the resource:
 <!-- All method requires authentication by default. -->
 <?xml version="1.0" encoding="utf-8"?>
 <Resource xmlns="http://www.abiquo.com/schema/Domain.xsd" LocalId="Twitxr">
 	<FunctionalityList >
		<Functionality LocalId="setCredentials" ReturnType="void">
	 			<AttributeList>
	 				<Attribute Name="username"     Type="string" />
	 				<Attribute Name="md5password"  Type="string" />
	 			</AttributeList>
	 	</Functionality>
	
	 <Functionality LocalId="getUserData" ReturnType="void">
	 	<AttributeList>
	 		<Attribute Name="user" Type="string" />
	 	</AttributeList>
	 </Functionality>
	
	 <Functionality LocalId="getUserTimeline" ReturnType="void">
	 	<AttributeList>
	 		<Attribute Name="user"   Type="string" />
	 		<Attribute Name="since"  Type="string" />
	 		<Attribute Name="page"   Type="int"    />
	 	</AttributeList>
	 </Functionality>
	
	 <Functionality LocalId="getFriendsTimeline" ReturnType="void">
	 	<AttributeList>
	 		<Attribute Name="user"   Type="string" />
	 		<Attribute Name="since"  Type="string" />
	 		<Attribute Name="page"   Type="int"    />
	 	</AttributeList>
	 </Functionality>
	
	 <Functionality LocalId="getPublicTimeline" ReturnType="void" />
	
	 <Functionality LocalId="getUserReplies" ReturnType="void">
	 	<AttributeList>
	 		<Attribute Name="since"  Type="string" />
	 		<Attribute Name="page"   Type="int"    />
	 	</AttributeList>
	 </Functionality>
	
	 <Functionality LocalId="checkStringLocation" ReturnType="void">
	 	<AttributeList>
	 		<Attribute Name="place" Type="string" />
	 	</AttributeList>
	 </Functionality>
	
	 <Functionality LocalId="postUpdate" ReturnType="void">
	 	<AttributeList>
			<Attribute Name="text"       Type="string" />
		 	<Attribute Name="image"      Type="string" />
		 	<Attribute Name="latitude"   Type="string" />
		 	<Attribute Name="longitude"  Type="string" />
		 	<Attribute Name="cid"        Type="string" />
		 	<Attribute Name="lac"        Type="string" />
		 	<Attribute Name="place"      Type="string" />
	 	</AttributeList>
	 </Functionality>	
 </FunctionalityList>
 
 </Resource>
 
 

The methods and attributes description has been taken from official Twitxr API documentation.


Constructor & Destructor Documentation

com.abiquo.api.resources.TwitxrResource.TwitxrResource ( ResourceInstance  resourceInstance  ) 

Creates a new TwitxrResource based on a generic ResourceInstance.

Parameters:
resourceInstance The generic ResourceInstance


Member Function Documentation

static TwitxrResource com.abiquo.api.resources.TwitxrResource.cast ( ResourceInstance  resourceInstance  )  [static]

Converts a generic ResourceInstance into a new one of type TwitxrResource.

Parameters:
resourceInstance The generic ResourceInstance
Returns:
The resultant TwitxrResource

Job com.abiquo.api.resources.TwitxrResource.checkStringLocation ( String  place  ) 

Creates a new Job which once executed, checks if the place passed as parameter is a valid location or not.

Parameters:
The location to validate
Returns:
The Job containing information about the demand

Job com.abiquo.api.resources.TwitxrResource.getFriendsTimeline ( String  user,
String  since 
)

Creates a new Job which once executed, returns the posts for the requested user and all the people that he follows.

Parameters:
user The user we want to get the posts
since The starting date for the posts list
Returns:
The Job containing information about the demand

Job com.abiquo.api.resources.TwitxrResource.getPublicTimeline (  ) 

Creates a new Job which once executed, returns the latest 20 posts in the general Twitxr timeline.

Note:
This method does not require authentication.
Returns:
The Job containing information about the demand

Job com.abiquo.api.resources.TwitxrResource.getUserData ( String  user  ) 

Creates a new Job which once executed, returns the profile data of the user.

Parameters:
user The name of the Twitxr user
Returns:
The Job containing information about the demand

Job com.abiquo.api.resources.TwitxrResource.getUserReplies ( String  since  ) 

Creates a new Job which once executed, returns the replies for the requested user.

Parameters:
since Narrows the returned results to just the posts created after the specified timestamp (Numeric UNIX timestamp, optional).
Returns:
The Job containing information about the demand

Job com.abiquo.api.resources.TwitxrResource.getUserTimeline ( String  user  ) 

Creates a new Job which once executed, returns the posts for the requested user.

Note:
This method does not require authentication.
Parameters:
user The name of the Twitxr user
Returns:
The Job containing information about the demand

Job com.abiquo.api.resources.TwitxrResource.getUserTimeline ( String  user,
String  since 
)

Creates a new Job which once executed, returns the posts of the requested user.

Note:
This method does not requires authentication
Parameters:
user The user for the Twitxr account
since The starting date of the timeline
Returns:
The Job containing information about the demand

Job com.abiquo.api.resources.TwitxrResource.postUpdate ( String  text,
String  place 
)

Creates a new Job which once executed, allows you to post your Twitxr updates.

Parameters:
text The text of the post (remember, less than 140 chars or it will be shortened). UTF-8 encoded string. Optional parameter (just ignore it to post an update without text, but in this case you should have a valid image parameter (we don't like blank posts ;) )
place The geographical place of the post (UTF-8 encoded string). Twitxr prefers Google Maps string formats (City,Country / Address,City,Country and so on)
Returns:
The Job containing information about the demand

Job com.abiquo.api.resources.TwitxrResource.setCredentials ( String  userName,
String  password 
)

Creates a new Job which once executed, login the user into Twitxr.

It is only needed for methods that requires authentication.

Parameters:
userName The user of the Twitxr account
password The password for the Twitxr user
Returns:
The Job containing information about the demand


Member Data Documentation

final String com.abiquo.api.resources.TwitxrResource.ID = "Twitxr" [static]

String containing the identifier for this resource.

Note:
To avoid misspellings when provision a resource, you should use this constant ID instead of a manually typed string.


The documentation for this class was generated from the following file:

Generated on Mon Sep 15 20:13:10 2008 for FrameworkAPI by  doxygen 1.5.5