ReadFriendsEntities
Returns entities of all friends based on type and/or subtype.
Service | Operation |
---|---|
friend | READ_FRIENDS_ENTITIES |
Method Parameters
Parameter | Description |
---|---|
entityType | Type of entities to retrieve |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
string entityType = "entityType";
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.ReadFriendsEntities(entityType, successCallback, failureCallback);
const char *entityType = "entityType";
_bc->getFriendService()->readFriendsEntities(entityType, this);
NSString *entityType = @"entityType";
BCCompletionBlock successBlock; // define callback
BCErrorCompletionBlock failureBlock; // define callback
[[_bc friendService] readFriendsEntities:entityType
completionBlock:successBlock
errorCompletionBlock:failureBlock
cbObject:nil];
String entityType = "entityType";
this; // implements IServerCallback
_bc.getFriendService().readFriendsEntities(entityType, 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 entityType = "entityType";
_bc.friend.readFriendsEntities(entityType, result =>
{
var status = result.status;
console.log(status + " : " + JSON.stringify(result, null, 2));
});
var entityType = "entityType";
ServerResponse result = await _bc.friendService.readFriendsEntities(entityType:entityType);
if (result.statusCode == 200) {
print("Success");
} else {
print("Failed ${result.error['status_message'] ?? result.error}");
}
var entityType = "entityType";
var friendProxy = bridge.getFriendServiceProxy();
var postResult = friendProxy.readFriendsEntities(entityType);
if (postResult.status == 200) {
// Success!
}
{
"service": "friend",
"operation": "READ_FRIENDS_ENTITIES",
"data": {
"entityType": "entityType"
}
}
JSON Response
{
"status": 200,
"data": {
"results": [
{
"userId": "bb05182d-ff0c-4740-ae65-4342452e74949",
"entities": [
{
"entityId": "bb05182d-ff0c-4740-ae65-4827534949",
"entityType": "PlayerData",
"version": 99,
"data": {
"ACCOUNT_CREATION_TIME": 1353011574029,
"ALL_TIME_SCORE": 1003750,
"FIRST_PLAY_TIME": 1430338388347
},
"acl": {
"other": 1
},
"createdAt": 1425909205616,
"updatedAt": 1430338431696
}
]
}
]
}
}