Packagecom.yahoo.social.methodgroups
Classpublic class ConnectionsRequest
InheritanceConnectionsRequest Inheritance YOSMethodBase Inheritance flash.events.EventDispatcher

A wrapper for the Connections API.


Example
   // retrieve the sessioned user
   var user:YahooUser = _session.getSessionedUser();
   
   // add connections response event listeners
   user.connections.addEventListener(YahooResultEvent.GET_CONNECTIONS_SUCCESS, handleConnectionsSuccess);
   user.connections.addEventListener(YahooResultEvent.GET_CONNECTIONS_FAILURE, handleConnectionsFailure);
   user.connections.getConnections(0,50);
  
   function handleConnectionsSuccess(event:YahooResultEvent):void
   {
    var connections:Array = event.data as Array;
    // do something
   }
  
   function handleConnectionsFailure(event:YahooResultEvent):void
   {
    // do something 
   }
  

See also

http://developer.yahoo.com/social/rest_api_guide/connections.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.
ConnectionsRequest
  
getConnections(start:int, count:int):void
Retrieves a list of connections for this user.
ConnectionsRequest
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 getConnections request fails.ConnectionsRequest
   Dispatched when the getConnections request executes successfully.ConnectionsRequest
 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
ConnectionsRequest()constructor
public function ConnectionsRequest()

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

Method detail
getConnections()method
public function getConnections(start:int, count:int):void

Retrieves a list of connections for this user.

Parameters
start:int — Defines the starting point of the search.
 
count:int — Defines the number of connections to return.
Event detail
getConnectionsFailureevent 
Event object type: YahooResultEvent

Dispatched when the getConnections request fails.

getConnectionsSuccessevent  
Event object type: YahooResultEvent

Dispatched when the getConnections request executes successfully.