Class GameRecordsRequest
- java.lang.Object
-
- com.treescrub.spedran.ResourceCollectionRequest<Leaderboard>
-
- com.treescrub.spedran.requests.builders.game.GameRecordsRequest
-
public class GameRecordsRequest extends ResourceCollectionRequest<Leaderboard>
A request builder to get records for a givenGame.
-
-
Constructor Summary
Constructors Constructor Description GameRecordsRequest(Game game)GameRecordsRequest(String id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GameRecordsRequestmiscellaneous(boolean includeMiscellaneous)Sets whether miscellaneous categories should be returned.GameRecordsRequestscope(String recordsScope)Sets the scope type.GameRecordsRequestskipEmpty(boolean skipEmptyRecords)Sets whether record entries without any runs should be kept.GameRecordsRequesttop(int topPlaces)Sets the number of places to return.-
Methods inherited from class com.treescrub.spedran.ResourceCollectionRequest
complete
-
-
-
-
Method Detail
-
top
public GameRecordsRequest top(int topPlaces)
Sets the number of places to return.This will return more than
valueruns per leaderboard if there are ties.- Parameters:
topPlaces- the top places to filter for, clamped to>= 1- Returns:
- this
GameRecordsRequestbuilder
-
scope
public GameRecordsRequest scope(String recordsScope)
Sets the scope type.Valid values are:
"full-game","levels", and"all".Full-game scope returns only full-game categories. Levels scope returns only individual levels. All returns everything and is the default scope.
- Parameters:
recordsScope- the scope to get records in- Returns:
- this
GameRecordsRequestbuilder
-
miscellaneous
public GameRecordsRequest miscellaneous(boolean includeMiscellaneous)
Sets whether miscellaneous categories should be returned.Defaults to
true.- Parameters:
includeMiscellaneous- whether to include miscellaneous categories in the results- Returns:
- this
GameRecordsRequestbuilder
-
skipEmpty
public GameRecordsRequest skipEmpty(boolean skipEmptyRecords)
Sets whether record entries without any runs should be kept.- Parameters:
skipEmptyRecords-trueto skip empty records;falseotherwise- Returns:
- this
GameRecordsRequestbuilder
-
-