Packagecom.yahoo.social.methodgroups
Classpublic class ApplicationRequest
InheritanceApplicationRequest Inheritance YOSMethodBase Inheritance flash.events.EventDispatcher

A wrapper over the YAP developer APIs which manages the cached content inside YahooSmallView.


Example
   YahooSession.YAP_VIEWER = "$viewerGuid";
   
   var session:YahooSession = new YahooSession(CONSUMER_KEY, CONSUMER_SECRET);
  
   var content:String = "Hello <yml:name uid=\"viewer\"/> from Flex 3";
  
   session.application.addEventListener(YahooResultEvent.SET_SMALL_VIEW_SUCCESS, handleSetSmallView);
   session.application.setSmallView(YahooSession.YAP_VIEWER, content);
  
   function handleSetSmallView(event:YahooResultEvent):void
   {
    trace(event.type);
    // yay!
   }
  



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.
ApplicationRequest
  
setSmallView(guid:String, content:String):void
Sets the small view for the user given by the GUID.
ApplicationRequest
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
 Inherited Dispatched when a request fails due to a security error.YOSMethodBase
   Dispatched when the setSmallView request encounters an error.ApplicationRequest
   Dispatched when the setSmallView request executes successfully.ApplicationRequest
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
ApplicationRequest()constructor
public function ApplicationRequest()

Class constructor. Creates a new ApplicationRequest object.

Method detail
setSmallView()method
public function setSmallView(guid:String, content:String):void

Sets the small view for the user given by the GUID. Supports only HTML and YML Lite

Parameters
guid:String — The GUID of the targetted user.
 
content:String — HTML and YML Lite contents.
Event detail
setSmallViewFailureevent 
Event object type: YahooResultEvent

Dispatched when the setSmallView request encounters an error.

setSmallViewSuccessevent  
Event object type: YahooResultEvent

Dispatched when the setSmallView request executes successfully.