Packagecom.yahoo.social.methodgroups
Classpublic class StatusRequest
InheritanceStatusRequest Inheritance YOSMethodBase Inheritance flash.events.EventDispatcher

A wrapper for the Status API.


Example
   // retrieve the sessioned user
   var user:YahooUser = _session.getSessionedUser();
   
   // add presence response event listeners
   user.presence.addEventListener(YahooResultEvent.GET_STATUS_SUCCESS, handleGetStatusSuccess);
   user.presence.addEventListener(YahooResultEvent.GET_STATUS_FAILURE, handleGetStatusFailure);
   user.presence.getStatus();
  
   function handleGetStatusSuccess(event:YahooResultEvent):void
   {
    var status:Object = event.data;
       var message:String = status.message;
    // do something
   }
  
   function handleGetStatusFailure(event:YahooResultEvent):void
   {
    // there was an error fetching the data
       // do something  
   }
  

See also

http://developer.yahoo.com/social/rest_api_guide/status_api.html


Public Properties
 PropertyDefined by
 Inheritedconsumer : OAuthConsumer
An OAuthConsumer object containing consumer key and secret values.
YOSMethodBase
 Inheritedtoken : OAuthToken
An OAuthToken object containing access token key and secret values This value is only used if a user is not defined when signing a request with OAuth.
YOSMethodBase
 Inheriteduser : YahooUser
The user referenced in all data requests.
YOSMethodBase
Protected Properties
 PropertyDefined by
 Inherited$consumer : OAuthConsumer
An OAuthConsumer object containing consumer key and secret values.
YOSMethodBase
 Inherited$format : String = "json"
The response format to apply to all requests.
YOSMethodBase
 Inherited$hostname : String
The hostname to be used in constructing URLs for all requests.
YOSMethodBase
 Inherited$oauthRequestType : String
The name of the OAuth request type used for all requests in this class.
YOSMethodBase
 Inherited$token : OAuthToken
An OAuthToken object containing access token key and secret values.
YOSMethodBase
 Inherited$useExplicitEncoding : Boolean = true
Determines if the request parameters in the signature base string should be encoded using encodeURIComponent when signing the request.
YOSMethodBase
 Inherited$user : YahooUser
The YahooUser to reference in all requests.
YOSMethodBase
 Inherited$version : String = "v1"
The version of the API.
YOSMethodBase
 InheritedOAUTH_HOSTNAME : String = "api.login.yahoo.com"
[static] The hostname for the Yahoo login service (OAuth) API.
YOSMethodBase
 InheritedOAUTH_REALM : String = "yahooapis.com"
[static] The name of the OAuth realm for Yahoo! web-services.
YOSMethodBase
Public Methods
 MethodDefined by
  
Class constructor.
StatusRequest
  
getStatus():void
Retrieves the current status message for this user.
StatusRequest
Protected Methods
 MethodDefined by
 Inherited
decodeJSON(s:String):*
A simple wrapper of the JSON::decode function.
YOSMethodBase
 Inherited
encodeJSON(o:Object):String
A simple wrapper of the JSON::encode function.
YOSMethodBase
 Inherited
Returns an object containing the required or default request parameters.
YOSMethodBase
 Inherited
getResponseStatusOk(status:int):Boolean
Returns true if the status code is 200.
YOSMethodBase
 Inherited
handleSecurityError(response:Object):void
Dispatches a SECURITY_ERROR event.
YOSMethodBase
 Inherited
sendRequest(httpMethod:String, url:String, callback:Object, args:Object = null, headers:Array = null):void
Signs the request with OAuth credentials then sends the request to the web-service with the supplied callbacks.
YOSMethodBase
Events
 EventSummaryDefined by
   Dispatched when the getStatus request fails.StatusRequest
   Dispatched when the getStatus request executes successfully.StatusRequest
 Inherited Dispatched when a request fails due to a security error.YOSMethodBase
Protected Constants
 ConstantDefined by
 InheritedAPPSTORE_WS_HOSTNAME : String = "appstore.apps.yahooapis.com"
[static] The hostname for the Yahoo Application Platform data store.
YOSMethodBase
 InheritedSOCIAL_WS_HOSTNAME : String = "social.yahooapis.com"
[static] The hostname for Yahoo Social APIs.
YOSMethodBase
 InheritedYQL_HOSTNAME : String = "query.yahooapis.com"
[static] The hostname for the YQL API.
YOSMethodBase
Constructor detail
StatusRequest()constructor
public function StatusRequest()

Class constructor. Creates a new StatusRequest object for the provided user.

Method detail
getStatus()method
public function getStatus():void

Retrieves the current status message for this user.


Example
   
   

Event detail
getStatusFailureevent 
Event object type: YahooResultEvent

Dispatched when the getStatus request fails.

getStatusSuccessevent  
Event object type: YahooResultEvent

Dispatched when the getStatus request executes successfully.