Skip to main content
Version: 5.7.0

IncrementSharedUserEntityData

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

ServiceOperation
entityINCREMENT_SHARED_USER_ENTITY_DATA

Method Parameters

ParameterDescription
entityIdThe id of the entity to update
targetProfileIdProfile ID of the entity owner
jsonDataThe entity's data object

Usage

http://localhost:3000
string entityId = "a-entity-id";
string targetProfileId = "a-profile-id";
string jsonData = "{\"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.EntityService.IncrementSharedUserEntityData(entityId, targetProfileId, jsonData, successCallback, failureCallback);
JSON Response
{
"status": 200,
"data": {
"acl": {
"other": 0
},
"createdAt": 1467014334065,
"data": {
"test": 2466
},
"entityId": "ffa29930-4a33-420e-9beb-fdfdd0190750",
"entityType": "Test",
"gameId": "20001",
"playerId": "6a63c968-c102-4a5a-8336-68b2150f369f",
"updatedAt": 1467014334065,
"version": 2
}
}