| Package | com.yahoo.social.methodgroups |
| Class | public class YOSMethodBase |
| Inheritance | YOSMethodBase flash.events.EventDispatcher |
| Subclasses | ApplicationRequest, AuthorizationRequest, ConnectionsRequest, ContactsRequest, ProfileRequest, StatusRequest, UpdatesRequest, YQL |
| Property | Defined by | ||
|---|---|---|---|
| consumer : OAuthConsumer
An OAuthConsumer object containing consumer key and secret values.
| YOSMethodBase | ||
| token : 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 | ||
| user : YahooUser
The user referenced in all data requests.
| YOSMethodBase | ||
| Property | Defined by | ||
|---|---|---|---|
| $consumer : OAuthConsumer
An OAuthConsumer object containing consumer key and secret values.
| YOSMethodBase | ||
| $format : String = "json"
The response format to apply to all requests.
| YOSMethodBase | ||
| $hostname : String
The hostname to be used in constructing URLs for all requests.
| YOSMethodBase | ||
| $oauthRequestType : String
The name of the OAuth request type used for all requests in this class.
| YOSMethodBase | ||
| $token : OAuthToken
An OAuthToken object containing access token key and secret values.
| YOSMethodBase | ||
| $useExplicitEncoding : Boolean = true
Determines if the request parameters in the signature base string
should be encoded using
encodeURIComponent when signing the request. | YOSMethodBase | ||
| $user : YahooUser
The YahooUser to reference in all requests.
| YOSMethodBase | ||
| $version : String = "v1"
The version of the API.
| YOSMethodBase | ||
| OAUTH_HOSTNAME : String = "api.login.yahoo.com" [static]
The hostname for the Yahoo login service (OAuth) API.
| YOSMethodBase | ||
| OAUTH_REALM : String = "yahooapis.com" [static]
The name of the OAuth realm for Yahoo! web-services.
| YOSMethodBase | ||
| Method | Defined by | ||
|---|---|---|---|
|
YOSMethodBase(user:YahooUser = null)
Constructor
Creates a new YOSMethodBase object.
| YOSMethodBase | ||
| Method | Defined by | ||
|---|---|---|---|
|
decodeJSON(s:String):*
A simple wrapper of the JSON::decode function.
| YOSMethodBase | ||
|
encodeJSON(o:Object):String
A simple wrapper of the JSON::encode function.
| YOSMethodBase | ||
|
getDefaultArguments():Object
Returns an object containing the required or default request parameters.
| YOSMethodBase | ||
|
getResponseStatusOk(status:int):Boolean
Returns true if the status code is 200.
| YOSMethodBase | ||
|
handleSecurityError(response:Object):void
Dispatches a
SECURITY_ERROR event. | YOSMethodBase | ||
|
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 | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| Dispatched when a request fails due to a security error. | YOSMethodBase | |||
| Constant | Defined by | ||
|---|---|---|---|
| APPSTORE_WS_HOSTNAME : String = "appstore.apps.yahooapis.com" [static]
The hostname for the Yahoo Application Platform data store.
| YOSMethodBase | ||
| SOCIAL_WS_HOSTNAME : String = "social.yahooapis.com" [static]
The hostname for Yahoo Social APIs.
| YOSMethodBase | ||
| YQL_HOSTNAME : String = "query.yahooapis.com" [static]
The hostname for the YQL API.
| YOSMethodBase | ||
| $consumer | property |
protected var $consumer:OAuthConsumerAn OAuthConsumer object containing consumer key and secret values.
| $format | property |
protected var $format:String = "json"The response format to apply to all requests.
| $hostname | property |
protected var $hostname:StringThe hostname to be used in constructing URLs for all requests.
| $oauthRequestType | property |
protected var $oauthRequestType:StringThe name of the OAuth request type used for all requests in this class.
| $token | property |
protected var $token:OAuthTokenAn OAuthToken object containing access token key and secret values.
| $useExplicitEncoding | property |
protected var $useExplicitEncoding:Boolean = true
Determines if the request parameters in the signature base string
should be encoded using encodeURIComponent when signing the request.
| $user | property |
protected var $user:YahooUserThe YahooUser to reference in all requests.
| $version | property |
protected var $version:String = "v1"The version of the API.
| consumer | property |
consumer:OAuthConsumer [read-write]An OAuthConsumer object containing consumer key and secret values. If you wish to make a 2-legged OAuth request, do not pass a YahooUser in the constructor and set this value with your consumer credentials.
Implementation public function get consumer():OAuthConsumer
public function set consumer(value:OAuthConsumer):void
See also
| OAUTH_HOSTNAME | property |
protected static var OAUTH_HOSTNAME:String = "api.login.yahoo.com"The hostname for the Yahoo login service (OAuth) API.
| OAUTH_REALM | property |
protected static var OAUTH_REALM:String = "yahooapis.com"The name of the OAuth realm for Yahoo! web-services.
| token | property |
token:OAuthToken [read-write]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. If you wish to make a 3-legged OAuth request, do not pass a YahooUser in the constructor and set this value with your access token credentials.
Implementation public function get token():OAuthToken
public function set token(value:OAuthToken):void
See also
| user | property |
user:YahooUser [read-write]The user referenced in all data requests.
Implementation public function get user():YahooUser
public function set user(value:YahooUser):void
| YOSMethodBase | () | constructor |
public function YOSMethodBase(user:YahooUser = null)Constructor Creates a new YOSMethodBase object. This is the base class for all YOS API wrappers.
Parametersuser:YahooUser (default = null) |
| decodeJSON | () | method |
protected function decodeJSON(s:String):*A simple wrapper of the JSON::decode function.
Parameterss:String |
* |
See also
| encodeJSON | () | method |
protected function encodeJSON(o:Object):StringA simple wrapper of the JSON::encode function.
Parameterso:Object |
String |
See also
| getDefaultArguments | () | method |
protected function getDefaultArguments():ObjectReturns an object containing the required or default request parameters.
ReturnsObject |
| getResponseStatusOk | () | method |
protected function getResponseStatusOk(status:int):BooleanReturns true if the status code is 200. (AIR-Only) Will also return true if the code is 0 to bypass the browser not providing an http status code.
Parametersstatus:int |
Boolean |
| handleSecurityError | () | method |
protected function handleSecurityError(response:Object):void
Dispatches a SECURITY_ERROR event.
response:Object |
| sendRequest | () | method |
protected function sendRequest(httpMethod:String, url:String, callback:Object, args:Object = null, headers:Array = null):voidSigns the request with OAuth credentials then sends the request to the web-service with the supplied callbacks.
ParametershttpMethod:String |
|
url:String |
|
callback:Object |
|
args:Object (default = null) |
|
headers:Array (default = null) |
| securityError | event |
| APPSTORE_WS_HOSTNAME | constant |
protected static const APPSTORE_WS_HOSTNAME:String = "appstore.apps.yahooapis.com"The hostname for the Yahoo Application Platform data store.
| SOCIAL_WS_HOSTNAME | constant |
protected static const SOCIAL_WS_HOSTNAME:String = "social.yahooapis.com"The hostname for Yahoo Social APIs.
| YQL_HOSTNAME | constant |
protected static const YQL_HOSTNAME:String = "query.yahooapis.com"The hostname for the YQL API.