Skip to main content
Version: 5.7.0

IncrementGlobalEntityData

Partial increment of global entity data field items. Partial set of items incremented as specified.

ServiceOperation
globalEntityINCREMENT_GLOBAL_ENTITY_DATA

Method Parameters

ParameterDescription
entityIdThe id of the entity to update
jsonEntityDataThe entity's data object

Usage

http://localhost:3000
string entityId = "a-entity-id";
string jsonEntityData = "{\"field1\":-1.5,\"field2\":{\"field2-1\":6,\"field2-new\":63.6},\"field3-new\":3}";
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.GlobalEntityService.IncrementGlobalEntityData(entityId, jsonEntityData, successCallback, failureCallback);
JSON Response
{
"status": 200,
"data": {
"gameId": "123456",
"entityId": "14281c38-abf6-4ca2-8436-b2bdwas8d5a9a",
"ownerId": "784cc6c6-4569-4d75-bd10-62dwa8ae0218",
"entityType": "test",
"entityIndexedId" : "indexTest",
"version": 2,
"data": {
"test": 1234
},
"acl": {
"other": 1
},
"expiresAt": 1449861422588,
"timeToLive": 34567,
"createdAt": 1449861388021,
"updatedAt": 1449861388021
}
}