opensocial.DataRequest
- Method
- opensocial.DataRequest.add
- opensocial.DataRequest.newFetchActivitiesRequest
- opensocial.DataRequest.newFetchPeopleRequest
- opensocial.DataRequest.newFetchPersonAppDataRequest
- opensocial.DataRequest.newFetchPersonRequest
- opensocial.DataRequest.newRemovePersonAppDataRequest
- opensocial.DataRequest.newUpdatePersonAppDataRequest
- opensocial.DataRequest.send
- opensocial.DataRequest.DataRequestFields
- opensocial.DataRequest.FilterType
- opensocial.DataRequest.PeopleRequestFields
- opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS
- opensocial.DataRequest.PeopleRequestFields.SORT_ORDER
- opensocial.DataRequest.PeopleRequestFields.FILTER
- opensocial.DataRequest.PeopleRequestFields.FILTER_OPTIONS
- opensocial.DataRequest.PeopleRequestFields.FIRST
- opensocial.DataRequest.PeopleRequestFields.MAX
- opensocial.DataRequest.SortOrder
Method
opensocial.DataRequest.add
Acquires data from the server or adds items to be updated.
Parameter
Name |
Type |
Description |
---|---|---|
request |
Object |
Data to be acquired or updated |
opt_key |
String |
Key connected to the response data |
Return value
None
Sample
opensocial.DataRequest.newFetchActivitiesRequest
Not supported.
opensocial.DataRequest.newFetchPeopleRequest
Creates a request to acquire Mobatomo (Friend) information. During processing, a Collection Object is returned.
Parameter
Name |
Type |
Description |
---|---|---|
idSpec |
opensocial.IdSpec |
IdSpec that identifies the Mobatomo (Friend) to be acquired |
opt_params |
Map.<opensocial.DataRequest.PeopleRequestFields|Object> |
Parameters to be added to the request |
Return value
Type |
Description |
---|---|
Object |
Request object |
Sample
opensocial.DataRequest.newFetchPersonAppDataRequest
Creates a request to acquire application data. During processing, a Map<PersonId, Map<String, Object>> object is returned.
Parameter
Name |
Type |
Description |
---|---|---|
idSpec |
opensocial.IdSpec |
IdSpec that identifies the Mobatomo to be acquired |
keys |
Array.<String> | String |
Key for requesting data. Either keyname array, single key name, or "*" |
opt_params |
Map.<opensocial.DataRequest.DataRequestFields|Object> |
Parameters to be added to the request |
Return value
Type |
Description |
---|---|
Object |
Request object |
Sample
opensocial.DataRequest.newFetchPersonRequest
Creates a request to acquire the profile of the specified user. During processing, a Person object is returned.
Parameter
Name |
Type |
Description |
---|---|---|
id |
String |
The user ID to be acquired, or the VIEWER or OWNER PersonID |
opt_params |
Map.<opensocial.DataRequest.PeopleRequestFields|Object> |
Parameters to be added to the request. Supports PROFILE_DETAILS. |
Return value
Type |
Description |
---|---|
Object |
Request object |
Sample
opensocial.DataRequest.newRemovePersonAppDataRequest
Creates a request to delete VIEWER application data. During processing, nothing is returned.
Parameter
Name |
Type |
Description |
---|---|---|
id |
String |
Only VIEWER can be specified |
keys |
Array.<String>|String |
Key for requesting data. Either keyname array, single key name, or "*" |
Return value
Type |
Description |
---|---|
Object |
Request object |
Sample
opensocial.DataRequest.newUpdatePersonAppDataRequest
Creates a request to update VIEWER application data. Processing, nothing is returned.
Parameter
Name |
Type |
Description |
---|---|---|
id |
String |
Only VIEWER can be specified. |
key |
String |
Key for requesting data. Alphabetical characters (A-Z, a-z), numerical characters (0-9), underscores (_), periods (.), and hyphens (-) may be included. |
Return value
Type |
Description |
---|---|
Object |
Request object |
Sample
opensocial.DataRequest.send
Sends a data request to the server.
Parameter
Name |
Type |
Description |
---|---|---|
opt_callback |
Function |
The callback function that calls the response from the server as a parameter. |
Return value
None
Sample
opensocial.DataRequest.DataRequestFields
opensocial.DataRequest.DataRequestFields.ESCAPE_TYPE
Not supported.
opensocial.DataRequest.FilterType
opensocial.DataRequest.FilterType.ALL
Not supported.
opensocial.DataRequest.FilterType.HAS_APP
This is used as an opensocial.DataRequestFields.FILTER value. When this filter is applied, only the data of users who have installed the application will be acquired.
Sample
opensocial.DataRequest.FilterType.TOP_FRIENDS
Not supported.
opensocial.DataRequest.FilterType.IS_FRIENDS_WITH
Not supported.
opensocial.DataRequest.PeopleRequestFields
opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS
It assigns the profile information to be acquired in newFetchPersonRequest, newFetchPeopleRequest, and so on.
Sample
opensocial.DataRequest.PeopleRequestFields.SORT_ORDER
Not supported.
opensocial.DataRequest.PeopleRequestFields.FILTER
A value is assigned from opensocial.DataRequest.FilterType. Currently, only opensocial.DataRequest.FilterType.HAS_APP is supported.
opensocial.DataRequest.PeopleRequestFields.FILTER_OPTIONS
Not supported.
opensocial.DataRequest.PeopleRequestFields.FIRST
The starting position of people data acquisition is assigned using natural numbers. Normally, it is used for paging data that is acquired at the same time as opensocial.DataRequest.PeopleRequestFields.MAX. The default value is 1.
In the following sample, the people data to be acquired is first split into 5 per page, and then the data of the 5 people on the third page from the top is acquired. If the assigned number of data units does not exist on the pertinent page, just enough data is acquired so that it can be returned.
Sample
opensocial.DataRequest.PeopleRequestFields.MAX
The maximum number of people data acquisitions is assigned using natural numbers. Normally, it is used for paging data that is acquired at the same time as opensocial.DataRequest.PeopleRequestFields.FIRST. The default value is 20.
opensocial.DataRequest.SortOrder
opensocial.DataRequest.SortOrder.TOP_FRIENDS
Not supported.
opensocial.DataRequest.SortOrder.NAME
Not supported.
Revision History
- 12/2010
- Initial Release.