Skip to main content
Version: 5.7.0

GetUserItem

Retrieves the identified user item from the server. If includeDef is true, response includes associated itemDef with language fields limited to the current or default language.

ServiceOperation
userItemsGET_USER_ITEM

Method Parameters

ParameterDescription
itemIdThe unique id of the user item.
includeDefIf true, the associated item definition will be included in the response.

Usage

http://localhost:3000
string itemId = "aaa-bbb-ccc-ddd";
bool includeDef = true;
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.UserItemsService.GetUserItem(itemId, includeDef, successCallback, failureCallback);
JSON Response
{
"data": {
"item": {
"itemId": "2f100f95-60cd-436e-b973-e33cbc6b3728",
"defId": "medal_bronze_2",
"quantity": 1,
"usesLeft": null,
"coolDownStart": -1,
"recoveryStart": -1,
"itemData": {},
"giftedTo": null,
"giftedFrom": null,
"blockId": null,
"createdAt": 1566849320462,
"updatedAt": 1566849320462,
"version": 1,
"maxUses": null,
"coolDownUntil": -1,
"recoveryUntil": -1,
"itemDef": {
"defId": "medal_bronze_2",
"name": "Medium Bronze Medal",
"desc": "",
"type": "ITEM",
"category": "collectable",
"tags": [
"medal"
],
"buyPrice": {},
"sellPrice": {},
"image": null,
"resourceGroup": null,
"resourceTag": null,
"meta": {},
"pState": "PUBLISHED",
"publishedAt": 1566585957049,
"stackable": false,
"consumable": false,
"uses": null,
"coolDownSecs": 0,
"recoverySecs": 0,
"activatable": false,
"statusName": null,
"activeSecs": null,
"tradable": false,
"blockchain": false,
"blockchainDefId": null
}
}
},
"status": 200
}