Class RunsRequest
- java.lang.Object
-
- com.treescrub.spedran.ResourceCollectionRequest<Run>
-
- com.treescrub.spedran.requests.builders.run.RunsRequest
-
public class RunsRequest extends ResourceCollectionRequest<Run>
A request builder to get allRuns matching the set filters.
-
-
Constructor Summary
Constructors Constructor Description RunsRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RunsRequestcategory(Category category)Restricts the results to runs played in the givenCategory.RunsRequestcategory(String id)Restricts the results to runs played in the givenCategory.RunsRequestemulated(boolean isEmulated)Restricts the results to runs that are on emulators, or runs that are not on an emulator.RunsRequestgame(Game game)Restricts the results to runs in the givenGame.RunsRequestgame(String id)Restricts the results to runs in the givenGame.RunsRequestguest(Guest guest)Restricts the results to runs that the givenGuesthas participated in.RunsRequestguest(String name)Restricts the results to runs that the givenGuesthas participated in.RunsRequestlevel(Level level)Restricts the results to runs played on the givenLevel.RunsRequestlevel(String id)Restricts the results to runs played on the givenLevel.RunsRequestplatform(Platform platform)Restricts the results to runs played on the givenPlatform.RunsRequestplatform(String id)Restricts the results to runs played on the givenPlatform.RunsRequestregion(Region region)Restricts the results to runs played on the givenRegion.RunsRequestregion(String id)Restricts the results to runs played on the givenRegion.RunsRequestsortByCategory()Sorts the results by the creation time ofCategorys.RunsRequestsortByDate()Sorts the results by the date of the run.RunsRequestsortByEmulation()Sorts the results by theRunSystem.isEmulated()boolean flag.RunsRequestsortByGame()Sorts the results by the creation time ofGames.RunsRequestsortByLevel()Sorts the results by the creation time ofLevels.RunsRequestsortByPlatform()Sorts the results by the creation time ofPlatforms.RunsRequestsortByRegion()Sorts the results by the creation time ofRegions.RunsRequestsortBySubmissionDate()Sorts the results by the submission time of the run.RunsRequestsortByVerificationDate()Sorts the results by the time that the run was rejected or verified.RunsRequestsortByVerificationStatus()Sorts the results by the verification status.RunsRequestsortDirection(SortDirection direction)Sets the direction (ascending or descending) of the sorting.RunsRequeststatus(SubmissionStatus submissionStatus)Restricts the results to runs with the providedSubmissionStatus.RunsRequestuser(User user)Restricts the results to runs that the givenUserhas participated in.RunsRequestuser(String id)Restricts the results to runs that the givenUserhas participated in.RunsRequestverifier(User user)Restricts the results to runs that the givenUserhas rejected or verified.RunsRequestverifier(String id)Restricts the results to runs that the givenUserhas rejected or verified.-
Methods inherited from class com.treescrub.spedran.ResourceCollectionRequest
complete
-
-
-
-
Method Detail
-
user
public RunsRequest user(String id)
Restricts the results to runs that the givenUserhas participated in.- Parameters:
id- the user ID- Returns:
- this
RunsRequestbuilder
-
user
public RunsRequest user(User user)
Restricts the results to runs that the givenUserhas participated in.- Parameters:
user- the user- Returns:
- this
RunsRequestbuilder
-
guest
public RunsRequest guest(String name)
Restricts the results to runs that the givenGuesthas participated in.- Parameters:
name- the guest's name- Returns:
- this
RunsRequestbuilder
-
guest
public RunsRequest guest(Guest guest)
Restricts the results to runs that the givenGuesthas participated in.- Parameters:
guest- the guest- Returns:
- this
RunsRequestbuilder
-
verifier
public RunsRequest verifier(String id)
Restricts the results to runs that the givenUserhas rejected or verified.- Parameters:
id- the ID of the verifier- Returns:
- this
RunsRequestbuilder
-
verifier
public RunsRequest verifier(User user)
Restricts the results to runs that the givenUserhas rejected or verified.- Parameters:
user- the verifier- Returns:
- this
RunsRequestbuilder
-
game
public RunsRequest game(String id)
Restricts the results to runs in the givenGame.- Parameters:
id- the game ID- Returns:
- this
RunsRequestbuilder
-
game
public RunsRequest game(Game game)
Restricts the results to runs in the givenGame.- Parameters:
game- the game- Returns:
- this
RunsRequestbuilder
-
level
public RunsRequest level(String id)
Restricts the results to runs played on the givenLevel.- Parameters:
id- the level ID- Returns:
- this
RunsRequestbuilder
-
level
public RunsRequest level(Level level)
Restricts the results to runs played on the givenLevel.- Parameters:
level- the level- Returns:
- this
RunsRequestbuilder
-
category
public RunsRequest category(String id)
Restricts the results to runs played in the givenCategory.- Parameters:
id- the category ID- Returns:
- this
RunsRequestbuilder
-
category
public RunsRequest category(Category category)
Restricts the results to runs played in the givenCategory.- Parameters:
category- the category- Returns:
- this
RunsRequestbuilder
-
platform
public RunsRequest platform(String id)
Restricts the results to runs played on the givenPlatform.- Parameters:
id- the platform ID- Returns:
- this
RunsRequestbuilder
-
platform
public RunsRequest platform(Platform platform)
Restricts the results to runs played on the givenPlatform.- Parameters:
platform- the platform- Returns:
- this
RunsRequestbuilder
-
region
public RunsRequest region(String id)
Restricts the results to runs played on the givenRegion.- Parameters:
id- the region ID- Returns:
- this
RunsRequestbuilder
-
region
public RunsRequest region(Region region)
Restricts the results to runs played on the givenRegion.- Parameters:
region- the region- Returns:
- this
RunsRequestbuilder
-
emulated
public RunsRequest emulated(boolean isEmulated)
Restricts the results to runs that are on emulators, or runs that are not on an emulator.- Parameters:
isEmulated- restrict based on emulator used- Returns:
- this
RunsRequestbuilder
-
status
public RunsRequest status(SubmissionStatus submissionStatus)
Restricts the results to runs with the providedSubmissionStatus.- Parameters:
submissionStatus- the verification status to filter for- Returns:
- this
RunsRequestbuilder
-
sortByGame
public RunsRequest sortByGame()
Sorts the results by the creation time ofGames.- Returns:
- this
RunsRequestbuilder
-
sortByCategory
public RunsRequest sortByCategory()
Sorts the results by the creation time ofCategorys.- Returns:
- this
RunsRequestbuilder
-
sortByLevel
public RunsRequest sortByLevel()
Sorts the results by the creation time ofLevels.- Returns:
- this
RunsRequestbuilder
-
sortByPlatform
public RunsRequest sortByPlatform()
Sorts the results by the creation time ofPlatforms.- Returns:
- this
RunsRequestbuilder
-
sortByRegion
public RunsRequest sortByRegion()
Sorts the results by the creation time ofRegions.- Returns:
- this
RunsRequestbuilder
-
sortByEmulation
public RunsRequest sortByEmulation()
Sorts the results by theRunSystem.isEmulated()boolean flag.- Returns:
- this
RunsRequestbuilder
-
sortByDate
public RunsRequest sortByDate()
Sorts the results by the date of the run.- Returns:
- this
RunsRequestbuilder
-
sortBySubmissionDate
public RunsRequest sortBySubmissionDate()
Sorts the results by the submission time of the run.- Returns:
- this
RunsRequestbuilder
-
sortByVerificationStatus
public RunsRequest sortByVerificationStatus()
Sorts the results by the verification status.- Returns:
- this
RunsRequestbuilder
-
sortByVerificationDate
public RunsRequest sortByVerificationDate()
Sorts the results by the time that the run was rejected or verified.- Returns:
- this
RunsRequestbuilder
-
sortDirection
public RunsRequest sortDirection(SortDirection direction)
Sets the direction (ascending or descending) of the sorting.- Parameters:
direction- the sort direction- Returns:
- this
RunsRequestbuilder
-
-