getSelectionList
Get Selection List
Retrieve a page of game selections and their localized names. Use a returned selectionId with the getGameList overload to retrieve games in that selection.
Call after SUDOP.initSDK succeeds. User authentication is not required.
Method Declaration
java
public static void getSelectionList(SUDOPSelectionListParams params,
SUDOPSelectionListCallback callback);Parameters
| Parameter | Type | Description |
|---|---|---|
| params | SUDOPSelectionListParams | Optional. Pass null for page 0, 10 records per page, and the server default language. |
| callback | SUDOPSelectionListCallback | Result callback. No request is sent if null. |
SUDOPSelectionListParams
| Field | Type | Default | Description |
|---|---|---|---|
| pageNo | int | 0 | Zero-based page number. Values below 0 are treated as 0. |
| pageSize | int | 10 | Records per page. Values less than or equal to 0 are treated as 10. |
| language | String | null | Optional BCP 47 language tag, such as en-US. null or an empty string uses the server default. |
Result Callback
java
public interface SUDOPSelectionListCallback {
void onSuccess(SUDOPSelectionListResult result);
void onFailure(int retCode, String retMsg);
}On success, the callback returns a paginated result. On failure, it returns an error code (retCode) and description (retMsg).
SUDOPSelectionListResult
| Field | Type | Description |
|---|---|---|
| pageNo | int | Current zero-based page number. |
| pageSize | int | Records per page. |
| total | int | Total number of selections. |
| records | List<SUDOPSelectionListItem> | Selections on the current page. |
SUDOPSelectionListItem
| Field | Type | Description |
|---|---|---|
| selectionId | String | Selection ID. |
| name | Map<String, String> | Localized selection names keyed by language tag; default identifies the default name. |
Example
java
SUDOPSelectionListParams params = new SUDOPSelectionListParams();
params.language = "en-US";
SUDOP.getSelectionList(params, new SUDOPSelectionListCallback() {
@Override
public void onSuccess(SUDOPSelectionListResult result) {
for (SUDOPSelectionListItem item : result.records) {
Log.i("SUDOP", "Selection ID: " + item.selectionId + ", name: " + item.name);
}
}
@Override
public void onFailure(int retCode, String retMsg) {
Log.e("SUDOP", "Failed to get selections: " + retCode + ", " + retMsg);
}
});