Class GamesRequest
- java.lang.Object
-
- com.treescrub.spedran.ResourceCollectionRequest<Game>
-
- com.treescrub.spedran.requests.builders.game.GamesRequest
-
public class GamesRequest extends ResourceCollectionRequest<Game>
A request builder to get allGames matching the set filters.
-
-
Field Summary
Fields Modifier and Type Field Description static intMAX_ITEMS_BULK
-
Constructor Summary
Constructors Constructor Description GamesRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GamesRequestabbreviation(String abbreviation)Search for an exact game abbreviation.GamesRequestasBulk()GamesRequestdeveloper(Developer developer)Restricts the results to games with the givenDeveloper.GamesRequestdeveloper(String id)Restricts the results to games with the givenDeveloper.GamesRequestengine(Engine engine)Restricts the results to games with the givenEngine.GamesRequestengine(String id)Restricts the results to games with the givenEngine.GamesRequestgameType(Gametype gametype)Restricts the results to games with the givenGametype.GamesRequestgameType(String id)Restricts the results to games with the givenGametype.GamesRequestgenre(Genre genre)Restricts the results to games with the givenGenre.GamesRequestgenre(String id)Restricts the results to games with the givenGenre.GamesRequestmoderator(User user)Restricts the results to games where the givenUseris a moderator.GamesRequestmoderator(String id)Restricts the results to games where the givenUseris a moderator.GamesRequestname(String name)Use a fuzzy search to filter game names and abbreviations.GamesRequestplatform(Platform platform)Restricts the results to games with the givenPlatform.GamesRequestplatform(String id)Restricts the results to games with the givenPlatform.GamesRequestpublisher(Publisher publisher)Restricts the results to games with the givenPublisher.GamesRequestpublisher(String id)Restricts the results to games with the givenPublisher.GamesRequestregion(Region region)Restricts the results to games with the givenRegion.GamesRequestregion(String id)Restricts the results to games with the givenRegion.GamesRequestreleaseYear(int year)Restricts the results to games with the given release year.GamesRequestsortByAbbreviation()Sorts the results alphanumerically by the abbreviation of the games.GamesRequestsortByCreationDate()Sorts the results by the creation date of the games on SRC.GamesRequestsortByInternationalName()Sorts the results alphanumerically by the international name of the games.GamesRequestsortByJapaneseName()Sorts the results alphanumerically by the Japanese name of the games.GamesRequestsortByNameSimilarity()Sorts the results by similarity whenname(String)is set.GamesRequestsortByReleaseDate()Sorts the results by the release date of the games.GamesRequestsortDirection(SortDirection direction)Sets the direction (ascending or descending) of the sorting.-
Methods inherited from class com.treescrub.spedran.ResourceCollectionRequest
complete
-
-
-
-
Field Detail
-
MAX_ITEMS_BULK
public static final int MAX_ITEMS_BULK
- See Also:
- Constant Field Values
-
-
Method Detail
-
name
public GamesRequest name(String name)
Use a fuzzy search to filter game names and abbreviations.- Parameters:
name- theStringto search for- Returns:
- this
GamesRequestbuilder
-
abbreviation
public GamesRequest abbreviation(String abbreviation)
Search for an exact game abbreviation.- Parameters:
abbreviation- the abbreviation to search for- Returns:
- this
GamesRequestbuilder
-
releaseYear
public GamesRequest releaseYear(int year)
Restricts the results to games with the given release year.- Parameters:
year- the year a game was released- Returns:
- this
GamesRequestbuilder
-
gameType
public GamesRequest gameType(String id)
Restricts the results to games with the givenGametype.- Parameters:
id- the gametype ID- Returns:
- this
GamesRequestbuilder
-
gameType
public GamesRequest gameType(Gametype gametype)
Restricts the results to games with the givenGametype.- Parameters:
gametype- the gametype- Returns:
- this
GamesRequestbuilder
-
platform
public GamesRequest platform(String id)
Restricts the results to games with the givenPlatform.- Parameters:
id- the platform ID- Returns:
- this
GamesRequestbuilder
-
platform
public GamesRequest platform(Platform platform)
Restricts the results to games with the givenPlatform.- Parameters:
platform- the platform- Returns:
- this
GamesRequestbuilder
-
region
public GamesRequest region(String id)
Restricts the results to games with the givenRegion.- Parameters:
id- the region ID- Returns:
- this
GamesRequestbuilder
-
region
public GamesRequest region(Region region)
Restricts the results to games with the givenRegion.- Parameters:
region- the region- Returns:
- this
GamesRequestbuilder
-
genre
public GamesRequest genre(String id)
Restricts the results to games with the givenGenre.- Parameters:
id- the genre ID- Returns:
- this
GamesRequestbuilder
-
genre
public GamesRequest genre(Genre genre)
Restricts the results to games with the givenGenre.- Parameters:
genre- the genre- Returns:
- this
GamesRequestbuilder
-
engine
public GamesRequest engine(String id)
Restricts the results to games with the givenEngine.- Parameters:
id- the engine ID- Returns:
- this
GamesRequestbuilder
-
engine
public GamesRequest engine(Engine engine)
Restricts the results to games with the givenEngine.- Parameters:
engine- the engine- Returns:
- this
GamesRequestbuilder
-
developer
public GamesRequest developer(String id)
Restricts the results to games with the givenDeveloper.- Parameters:
id- the developer ID- Returns:
- this
GamesRequestbuilder
-
developer
public GamesRequest developer(Developer developer)
Restricts the results to games with the givenDeveloper.- Parameters:
developer- the developer- Returns:
- this
GamesRequestbuilder
-
publisher
public GamesRequest publisher(String id)
Restricts the results to games with the givenPublisher.- Parameters:
id- the publisher ID- Returns:
- this
GamesRequestbuilder
-
publisher
public GamesRequest publisher(Publisher publisher)
Restricts the results to games with the givenPublisher.- Parameters:
publisher- the publisher- Returns:
- this
GamesRequestbuilder
-
moderator
public GamesRequest moderator(String id)
Restricts the results to games where the givenUseris a moderator.- Parameters:
id- the user ID- Returns:
- this
GamesRequestbuilder
-
moderator
public GamesRequest moderator(User user)
Restricts the results to games where the givenUseris a moderator.- Parameters:
user- the user- Returns:
- this
GamesRequestbuilder
-
asBulk
public GamesRequest asBulk()
-
sortByInternationalName
public GamesRequest sortByInternationalName()
Sorts the results alphanumerically by the international name of the games.- Returns:
- this
GamesRequestbuilder
-
sortByJapaneseName
public GamesRequest sortByJapaneseName()
Sorts the results alphanumerically by the Japanese name of the games.- Returns:
- this
GamesRequestbuilder
-
sortByAbbreviation
public GamesRequest sortByAbbreviation()
Sorts the results alphanumerically by the abbreviation of the games.- Returns:
- this
GamesRequestbuilder
-
sortByReleaseDate
public GamesRequest sortByReleaseDate()
Sorts the results by the release date of the games.- Returns:
- this
GamesRequestbuilder
-
sortByCreationDate
public GamesRequest sortByCreationDate()
Sorts the results by the creation date of the games on SRC.- Returns:
- this
GamesRequestbuilder
-
sortByNameSimilarity
public GamesRequest sortByNameSimilarity()
Sorts the results by similarity whenname(String)is set.- Returns:
- this
GamesRequestbuilder
-
sortDirection
public GamesRequest sortDirection(SortDirection direction)
Sets the direction (ascending or descending) of the sorting.- Parameters:
direction- the sort direction- Returns:
- this
GamesRequestbuilder
-
-