Packagecom.yahoo.social.methodgroups
Classpublic class ProfileRequest
InheritanceProfileRequest Inheritance YOSMethodBase Inheritance flash.events.EventDispatcher

A wrapper for the Profiles API.


Example
   // retrieve the sessioned user
   var user:YahooUser = _session.getSessionedUser();
   
   // add profile response event listeners
   user.profile.addEventListener(YahooResultEvent.GET_PROFILE_SUCCESS, handleGetProfileSuccess);
   user.profile.addEventListener(YahooResultEvent.GET_PROFILE_FAILURE, handleGetProfileFailure);
   user.profile.getPresence();
  
   function handleGetProfileSuccess(event:YahooResultEvent):void
   {
    var profile:Object = event.data;
    // do something
   }
  
   function handleGetProfileFailure(event:YahooResultEvent):void
   {
    // there was an error fetching the data
       // do something 
   }
  

See also

http://developer.yahoo.com/social/rest_api_guide/extended-profile-resource.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
  type : String = "null"
The resource type determines the kind of profile information returned.
ProfileRequest
 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.
ProfileRequest
  
getConnectionProfiles(start:int = 0, count:int = 10):void
Retrieves the profiles of all the users connections.
ProfileRequest
  
getProfile():void
Loads the profile information for this user.
ProfileRequest
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 getConnectionProfiles request fails.ProfileRequest
   Dispatched when the getConnectionProfiles request executes successfully.ProfileRequest
   Dispatched when the loadProfile request fails.ProfileRequest
   Dispatched when the loadProfile request executes successfully.ProfileRequest
 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
Property detail
typeproperty
public var type:String = "null"

The resource type determines the kind of profile information returned. Default is null (extended profile). Acceptable values are tinyusercard, usercard, idcard, works and schools.

Constructor detail
ProfileRequest()constructor
public function ProfileRequest()

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

Method detail
getConnectionProfiles()method
public function getConnectionProfiles(start:int = 0, count:int = 10):void

Retrieves the profiles of all the users connections.

Parameters
start:int (default = 0) — Defines the starting point of the search.
 
count:int (default = 10) — Defines the number of profiles to return.
getProfile()method 
public function getProfile():void

Loads the profile information for this user.

Event detail
getConnectionProfilesFailureevent 
Event object type: YahooResultEvent

Dispatched when the getConnectionProfiles request fails.

getConnectionProfilesSuccessevent  
Event object type: YahooResultEvent

Dispatched when the getConnectionProfiles request executes successfully.

getProfileFailureevent  
Event object type: YahooResultEvent

Dispatched when the loadProfile request fails.

getProfileSuccessevent  
Event object type: YahooResultEvent

Dispatched when the loadProfile request executes successfully.