Skip to content

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 ​

ParameterTypeDescription
paramsSUDOPSelectionListParamsOptional. Pass null for page 0, 10 records per page, and the server default language.
callbackSUDOPSelectionListCallbackResult callback. No request is sent if null.

SUDOPSelectionListParams ​

FieldTypeDefaultDescription
pageNoint0Zero-based page number. Values below 0 are treated as 0.
pageSizeint10Records per page. Values less than or equal to 0 are treated as 10.
languageStringnullOptional 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 ​

FieldTypeDescription
pageNointCurrent zero-based page number.
pageSizeintRecords per page.
totalintTotal number of selections.
recordsList<SUDOPSelectionListItem>Selections on the current page.

SUDOPSelectionListItem ​

FieldTypeDescription
selectionIdStringSelection ID.
nameMap<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);
    }
});