SysGetPageOffset
Retrieves next/prev page of users from server based on the specified query context.
Service | Operation |
---|---|
user | SYS_GET_PAGE_OFFSET |
Method Parameters
Parameter | Description |
---|---|
context | A context JSON object describing the pagination, searchCriteria and sortCriteria options |
pageOffset | +1 for next page, -1 for previous page |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
var context = "eyJzZWFyY2hDcml0ZXJpYSI6eyJnYW1lSWQiOiIyMTc3NCxxx...";
var userProxy = bridge.getUserServiceProxy();
// Use context from previous sysGetPage calls
var context = getPageResults.data.context;
// +1 to go forward a page, -1 to go back
var postResult = userProxy.sysGetPageOffset( context, 1);
if (postResult.status == 200) {
// Success!
}
// Cloud Code only. To view example, switch to the Cloud Code tab
JSON Response
{
"status": 200,
"data": {
"context": "eyJzZWFyY2hDcml0ZXJpYSI6eyJnYW1lSWQiOiIyMTc3NCxxx...",
"results": {
"count": 2,
"page": 2,
"items": [
{
"profileId": "0b53155b-1fc8-4916-XXXX-298379efc67a",
"playerName": "Bats",
"countryCode": "CA",
"timeZoneOffset": -5,
"summaryFriendData": {
"favColor": "black"
},
"emailAddress": "bruce@wayneent.com"
}
],
"moreAfter": false,
"moreBefore": true
}
}
}