| Package | com.yahoo.social.methodgroups |
| Class | public class ProfileRequest |
| Inheritance | ProfileRequest YOSMethodBase flash.events.EventDispatcher |
// 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
| 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 | |
| type : String = "null"
The resource type determines the kind of profile information returned.
| ProfileRequest | ||
![]() | user : YahooUser
The user referenced in all data requests.
| YOSMethodBase | |
| Method | Defined 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 | ||
| Event | Summary | Defined 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 | |||
![]() | Dispatched when a request fails due to a security error. | YOSMethodBase | ||
| type | property |
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.
| ProfileRequest | () | constructor |
public function ProfileRequest()Class constructor. Creates a new ProfileRequest object for the provided user.
| getConnectionProfiles | () | method |
public function getConnectionProfiles(start:int = 0, count:int = 10):voidRetrieves the profiles of all the users connections.
Parametersstart: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():voidLoads the profile information for this user.
| getConnectionProfilesFailure | event |
| getConnectionProfilesSuccess | event |
YahooResultEvent
Dispatched when the getConnectionProfiles request executes successfully.
| getProfileFailure | event |
| getProfileSuccess | event |