ReadGroupEntity
Read an entity in the group.
Service | Operation |
---|---|
group | READ_GROUP_ENTITY |
Method Parameters
Parameter | Description |
---|---|
groupId | ID of the group |
entityId | ID of the entity |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
string groupId = "a-group-id";
string entityId = "a-group-entity-id";
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.Group.ReadGroupEntity(groupId, entityId, successCallback, failureCallback);
const char *groupId = "a-group-id";
const char *entityId = "a-group-entity-id";
_bc->getGroup()->readGroupEntity(groupId, entityId, this);
NSString *groupId = @"a-group-id";
NSString *entityId = @"a-group-entity-id";
BCCompletionBlock successBlock; // define callback
BCErrorCompletionBlock failureBlock; // define callback
[[_bc groupService] readGroupEntity:groupId
entityId:entityId
completionBlock:successBlock
errorCompletionBlock:failureBlock
cbObject:nil];
String groupId = "a-group-id";
String entityId = "a-group-entity-id";
this; // implements IServerCallback
_bc.getGroup().readGroupEntity(groupId, 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 groupId = "a-group-id";
var entityId = "a-group-entity-id";
_bc.group.readGroupEntity(groupId, entityId, result =>
{
var status = result.status;
console.log(status + " : " + JSON.stringify(result, null, 2));
});
var groupId = "a-group-id";
var entityId = "a-group-entity-id";
ServerResponse result = await _bc.groupService.readGroupEntity(groupId:groupId, entityId:entityId);
if (result.statusCode == 200) {
print("Success");
} else {
print("Failed ${result.error['status_message'] ?? result.error}");
}
var groupId = "a-group-id";
var entityId = "a-group-entity-id";
var groupProxy = bridge.getGroupServiceProxy();
var postResult = groupProxy.readGroupEntity(groupId, entityId);
if (postResult.status == 200) {
// Success!
}
{
"service": "group",
"operation": "READ_GROUP_ENTITY",
"data": {
"groupId": "a-group-id",
"entityId": "a-group-entity-id"
}
}
JSON Response
{
"status": 200,
"data": {
"gameId": "20595",
"groupId": "fee55a37-5e86-43e8-942e-06bcbe1b701e",
"entityId": "91cfece7-debb-4698-ba6b-cd2cb432458d",
"ownerId": null,
"entityType": "BLUE",
"createdAt": 1462812680359,
"updatedAt": 1462812680359,
"version": 1,
"data": {},
"acl": {
"member": 2,
"other": 1
},
"_serverTime": 1637946319239
}
}