Skip to main content
Version: 5.7.0

GetUserItemsPageOffset

Retrieves the page of user's inventory from the server based on the encoded context. If includeDef is true, response includes associated itemDef with each user item, with language fields limited to the current or default language.

ServiceOperation
userItemsGET_USER_ITEMS_PAGE_OFFSET

Method Parameters

ParameterDescription
contextThe context string returned from the server from a previous call to SysGetCatalogItemsPage or SysGetCatalogItemsPageOffset.
pageOffsetThe positive or negative page offset to fetch. Uses the last page retrieved using the context string to determine a starting point.
includeDefIf true, the associated item definition will be included in the response.

Usage

http://localhost:3000
string context = "eyJzZWFyY2hDcml0ZXJpYSI6eyJlbnRpdHlUeXBlIjp7IiRyZWdleCI6Ii4qaWxkLioiLCIkb3B0";
int pageOffset = 1;
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.GetUserItemsPageOffset(context, pageOffset, includeDef, successCallback, failureCallback);
JSON Response
{
"data": {
"context": "eyJzZWFyY2hDcml0ZXJpYSI6eyJnYW1lSWQiOiIyMzQwMyIsInBsYXllcklkIjoiZW4iLCJnaWZ0ZWRUbyI6bnVsbH0sInNvcnRDcml0ZXJpYSI6eyJjcmVhdGVkQXQiOjEsInVwZGF0ZWRBdCI6LTF9LCJwYWdpbmF0aW9uIjp7InJvd3NQZXJQYWdlIjo1MCwicGFnZU51bWJlciI6Mn0sIm9wdGlvbnMiOm51bGx9",
"results": {
"count": 0,
"page": 2,
"items": [],
"moreAfter": false,
"moreBefore": false
}
},
"status": 200
}