ReadFriendEntity
Returns a particular entity of a particular friend.
Service | Operation |
---|---|
friend | READ_FRIEND_ENTITY |
Method Parameters
Parameter | Description |
---|---|
friendId | Profile Id of friend who owns entity. |
entityId | Id of entity to retrieve. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
string friendId = "profileId";
string entityId = "entityId";
SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("Success | {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};
_bc.FriendService.ReadFriendEntity(friendId, entityId, successCallback, failureCallback);
const char *friendId = "profileId";
const char *entityId = "entityId";
_bc->getFriendService()->readFriendEntity(friendId, entityId, this);
NSString *friendId = @"profileId";
NSString *entityId = @"entityId";
BCCompletionBlock successBlock; // define callback
BCErrorCompletionBlock failureBlock; // define callback
[[_bc friendService] readFriendEntity:friendId
entityId:entityId
completionBlock:successBlock
errorCompletionBlock:failureBlock
cbObject:nil];
String friendId = "profileId";
String entityId = "entityId";
this; // implements IServerCallback
_bc.getFriendService().readFriendEntity(friendId, entityId, this);
public void serverCallback(ServiceName serviceName, ServiceOperation serviceOperation, JSONObject jsonData)
{
System.out.print(String.format("Success | %s", jsonData.toString()));
}
public void serverError(ServiceName serviceName, ServiceOperation serviceOperation, int statusCode, int reasonCode, String jsonError)
{
System.out.print(String.format("Failed | %d %d %s", statusCode, reasonCode, jsonError.toString()));
}
var friendId = "profileId";
var entityId = "entityId";
_bc.friend.readFriendEntity(friendId, entityId, result =>
{
var status = result.status;
console.log(status + " : " + JSON.stringify(result, null, 2));
});
var friendId = "profileId";
var entityId = "entityId";
ServerResponse result = await _bc.friendService.readFriendEntity(friendId:friendId, entityId:entityId);
if (result.statusCode == 200) {
print("Success");
} else {
print("Failed ${result.error['status_message'] ?? result.error}");
}
var friendId = "profileId";
var entityId = "entityId";
var friendProxy = bridge.getFriendServiceProxy();
var postResult = friendProxy.readFriendEntity(friendId, entityId);
if (postResult.status == 200) {
// Success!
}
{
"service": "friend",
"operation": "READ_FRIEND_ENTITY",
"data": {
"friendId": "profileId",
"entityId": "entityId"
}
}
JSON Response
{
"status": 200,
"data": {
"entityId": "a3abc2ad-13ee-47a8-86a5-9c0a83f90314",
"entityType": "PlayerData",
"version": 1,
"data": {
"ACCOUNT_CREATION_TIME": 1353011574029,
"ALL_TIME_SCORE": 1090560,
"FIRST_PLAY_TIME": 1372781536842
},
"acl": {
"other": 1
},
"createdAt": 1372901559406,
"updatedAt": 1372901559406
}
}