Class LeaderboardRequest
- java.lang.Object
-
- com.treescrub.spedran.SingleResourceRequest<Leaderboard>
-
- com.treescrub.spedran.requests.builders.LeaderboardRequest
-
public class LeaderboardRequest extends SingleResourceRequest<Leaderboard>
A request builder to get a specificLeaderboard.
-
-
Constructor Summary
Constructors Constructor Description LeaderboardRequest(Game game, Category category)LeaderboardRequest(Game game, Category category, Level level)LeaderboardRequest(String game, String category)LeaderboardRequest(String game, String category, String level)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LeaderboardRequestbeforeDate(String date)Restricts the results to runs done before or on this date.LeaderboardRequestonlyEmulators()Restricts the results to runs done on an emulator.LeaderboardRequestonlyRealDevices()Restricts the results to runs done on hardware (that is, not an emulator).LeaderboardRequestplatform(Platform platform)Restricts the results to runs done on the givenPlatform.LeaderboardRequestplatform(String id)Restricts the results to runs done on the givenPlatform.LeaderboardRequestregion(Region region)Restricts the results to runs done on the givenRegion.LeaderboardRequestregion(String id)Restricts the results to runs done on the givenRegion.LeaderboardRequesttiming(TimingType timingType)Sorts the leaderboard by the timing type.LeaderboardRequesttop(int topPlaces)LeaderboardRequestvariable(Variable variable, String valueId)Restricts the results to runs with the givenVariableset to the given variable value.LeaderboardRequestvariable(String id, String value)Restricts the results to runs with the givenVariableset to the given variable value.LeaderboardRequestvideosOnly()Restricts the results to runs with videos specified.-
Methods inherited from class com.treescrub.spedran.SingleResourceRequest
complete
-
-
-
-
Method Detail
-
top
public LeaderboardRequest top(int topPlaces)
-
platform
public LeaderboardRequest platform(String id)
Restricts the results to runs done on the givenPlatform.- Parameters:
id- the platform ID- Returns:
- this
LeaderboardRequestbuilder
-
platform
public LeaderboardRequest platform(Platform platform)
Restricts the results to runs done on the givenPlatform.- Parameters:
platform- the platform- Returns:
- this
LeaderboardRequestbuilder
-
region
public LeaderboardRequest region(String id)
Restricts the results to runs done on the givenRegion.- Parameters:
id- the region ID- Returns:
- this
LeaderboardRequestbuilder
-
region
public LeaderboardRequest region(Region region)
Restricts the results to runs done on the givenRegion.- Parameters:
region- the region- Returns:
- this
LeaderboardRequestbuilder
-
onlyEmulators
public LeaderboardRequest onlyEmulators()
Restricts the results to runs done on an emulator.- Returns:
- this
LeaderboardRequestbuilder
-
onlyRealDevices
public LeaderboardRequest onlyRealDevices()
Restricts the results to runs done on hardware (that is, not an emulator).- Returns:
- this
LeaderboardRequestbuilder
-
videosOnly
public LeaderboardRequest videosOnly()
Restricts the results to runs with videos specified.- Returns:
- this
LeaderboardRequestbuilder
-
timing
public LeaderboardRequest timing(TimingType timingType)
Sorts the leaderboard by the timing type.- Parameters:
timingType- the type to sort by- Returns:
- this
LeaderboardRequestbuilder
-
beforeDate
public LeaderboardRequest beforeDate(String date)
Restricts the results to runs done before or on this date.- Parameters:
date- the date in ISO 8601 format- Returns:
- this
LeaderboardRequestbuilder
-
variable
public LeaderboardRequest variable(String id, String value)
Restricts the results to runs with the givenVariableset to the given variable value.- Parameters:
id- the variable IDvalue- the variable value ID- Returns:
- this
LeaderboardRequestbuilder
-
variable
public LeaderboardRequest variable(Variable variable, String valueId)
Restricts the results to runs with the givenVariableset to the given variable value.- Parameters:
variable- the variablevalueId- the variable value ID- Returns:
- this
LeaderboardRequestbuilder
-
-