getGameListWithSelectionId:options:completion:
Get Games in a Selection
Retrieve a page of games in a specific selection. Obtain selection IDs using getSelectionListWithOptions:completion:.
Call after initializeWithConfiguration:completion: succeeds; user authentication is not required.
Method Declaration
objectivec
+ (void)getGameListWithSelectionId:(NSString *)selectionId
options:(nullable SUDOPGameListOptions *)options
completion:(nullable void(^)(SUDOPGameListResult *_Nullable result,
NSError *_Nullable error))completion;Parameters and Return Values
| Parameter | Type | Required | Description |
|---|---|---|---|
| selectionId | NSString * | Yes | Selection ID. Must not be empty. |
| options | SUDOPGameListOptions * | No | Pagination and language options. Pass nil for page 0, 10 records per page, and the server default language. |
| completion | Block | No | Returns SUDOPGameListResult on success or NSError on failure. |
SUDOPGameListOptions, SUDOPGameListResult, and SUDOPGameListItem are the same models used by the original game-list method.
Example
objectivec
NSString *selectionId = @"123"; // Replace with an actual selection ID
SUDOPGameListOptions *options = [[SUDOPGameListOptions alloc] init];
options.language = @"en-US";
[SUDOP getGameListWithSelectionId:selectionId
options:options
completion:^(SUDOPGameListResult * _Nullable result,
NSError * _Nullable error) {
if (error) {
NSLog(@"Failed to get selection games: %@", error.localizedDescription);
return;
}
NSLog(@"Games in this selection: %ld", (long)result.total);
}];