Package com.treescrub.spedran.data
Class Game
- java.lang.Object
-
- com.treescrub.spedran.data.Resource
-
- com.treescrub.spedran.data.IdentifiableResource
-
- com.treescrub.spedran.data.Game
-
public class Game extends IdentifiableResource
A game which has a leaderboard on SRC.
This class is immutable and thread-safe.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAbbreviation()Gets the unique shortened name that is used by SRC.GameAssetsgetAssets()Gets theGameAssetsfor this game.intgetBoostsReceived()Gets the current boosts for this game on SRC.GameCategoriesRequestgetCategories()Gets a newGameCategoriesRequestbuilder object to request categories for this game.Optional<Instant>getCreationTime()Returns anInstantwith the time this game was added to SRC.List<String>getDevelopers()Gets aListof developer IDs that developed this game.Optional<String>getDiscordLink()Gets a Discord invite link to the official Discord server for this game, if it exists.intgetDistinctBoosters()Gets the number of unique supporters currently boosting this game.List<String>getEngines()Gets aListof engine IDs that this game runs in.List<String>getGametypes()Gets aListof all gametype IDs that describe this game.List<String>getGenres()Gets aListof genre IDs that this game is in.GameLevelsRequestgetLevels()Gets a newGameLevelsRequestbuilder object to request levels for this game.Map<String,ModeratorType>getModerators()Gets aMapof user IDs as keys and moderator types as values.NamesgetNames()Gets aNamesobject with the names for this game.List<String>getPlatforms()Gets aListof platform IDs that this game is on.List<String>getPublishers()Gets aListof publisher IDs that published this game.GameRecordsRequestgetRecords()Gets a newGameRecordsRequestbuilder object to request records for this game.List<String>getRegions()Gets aListof region IDs that this game is in.LocalDategetReleaseDate()Gets the date when this game was released.GameRomhacksRequestgetRomhacks()Gets a newGameRomhacksRequestbuilder object to request romhacks (derived games) for this game.Optional<GameRuleset>getRuleset()Gets aGameRulesetobject with the game-wide rules.RunsRequestgetRuns()Gets a newRunsRequestbuilder object to request all runs for this game.GameVariablesRequestgetVariables()Gets a newGameVariablesRequestbuilder object to request variables for this game.StringgetWebLink()Gets a link to this game on SRC.StringtoString()-
Methods inherited from class com.treescrub.spedran.data.IdentifiableResource
equals, getId, hashCode
-
-
-
-
Method Detail
-
getRuns
public RunsRequest getRuns()
Gets a newRunsRequestbuilder object to request all runs for this game.- Returns:
- a
RunsRequestbuilder
-
getCategories
public GameCategoriesRequest getCategories()
Gets a newGameCategoriesRequestbuilder object to request categories for this game.- Returns:
- a
GameCategoriesRequestbuilder
-
getLevels
public GameLevelsRequest getLevels()
Gets a newGameLevelsRequestbuilder object to request levels for this game.- Returns:
- a
GameLevelsRequestbuilder
-
getRecords
public GameRecordsRequest getRecords()
Gets a newGameRecordsRequestbuilder object to request records for this game.- Returns:
- a
GameRecordsRequestbuilder
-
getRomhacks
public GameRomhacksRequest getRomhacks()
Gets a newGameRomhacksRequestbuilder object to request romhacks (derived games) for this game.- Returns:
- a
GameRomhacksRequestbuilder
-
getVariables
public GameVariablesRequest getVariables()
Gets a newGameVariablesRequestbuilder object to request variables for this game.- Returns:
- a
GameVariablesRequestbuilder
-
getNames
public Names getNames()
Gets aNamesobject with the names for this game.- Returns:
- a
Namesof this game's names
-
getBoostsReceived
public int getBoostsReceived()
Gets the current boosts for this game on SRC.- Returns:
- current boosts used on this game
- See Also:
- SRC Supporter FAQ
-
getDistinctBoosters
public int getDistinctBoosters()
Gets the number of unique supporters currently boosting this game.- Returns:
- total unique users that have boosted this game
- See Also:
- SRC Supporter FAQ
-
getAbbreviation
public String getAbbreviation()
Gets the unique shortened name that is used by SRC.- Returns:
- the shortened game title
-
getWebLink
public String getWebLink()
Gets a link to this game on SRC.- Returns:
- a link to this game on SRC
-
getDiscordLink
public Optional<String> getDiscordLink()
Gets a Discord invite link to the official Discord server for this game, if it exists.- Returns:
- an
Optionalwith an invitation link to this game's Discord server
-
getReleaseDate
public LocalDate getReleaseDate()
Gets the date when this game was released.- Returns:
- a
LocalDatedescribing when this game was released
-
getRuleset
public Optional<GameRuleset> getRuleset()
Gets aGameRulesetobject with the game-wide rules.- Returns:
- an
Optionalwith aGameRuleset
-
getGametypes
public List<String> getGametypes()
Gets aListof all gametype IDs that describe this game.- Returns:
- an unmodifiable
Listof gametype IDs - See Also:
Gametype,Spedran.getGametype(String)
-
getPlatforms
public List<String> getPlatforms()
Gets aListof platform IDs that this game is on.- Returns:
- an unmodifiable
Listof platform IDs - See Also:
Platform,Spedran.getPlatform(String)
-
getRegions
public List<String> getRegions()
Gets aListof region IDs that this game is in.- Returns:
- an unmodifiable
Listof region IDs - See Also:
Region,Spedran.getRegion(String)
-
getGenres
public List<String> getGenres()
Gets aListof genre IDs that this game is in.- Returns:
- an unmodifiable
Listof genre IDs - See Also:
Genre,Spedran.getGenre(String)
-
getEngines
public List<String> getEngines()
Gets aListof engine IDs that this game runs in.- Returns:
- an unmodifiable
Listof engine IDs - See Also:
Engine,Spedran.getEngine(String)
-
getDevelopers
public List<String> getDevelopers()
Gets aListof developer IDs that developed this game.- Returns:
- an unmodifiable
Listof developer IDs - See Also:
Developer,Spedran.getDeveloper(String)
-
getPublishers
public List<String> getPublishers()
Gets aListof publisher IDs that published this game.- Returns:
- an unmodifiable
Listof publisher IDs - See Also:
Publisher,Spedran.getPublisher(String)
-
getModerators
public Map<String,ModeratorType> getModerators()
Gets aMapof user IDs as keys and moderator types as values.- Returns:
- an unmodifiable
Mapof user IDs to moderator types - See Also:
User,Spedran.getUser(String)
-
getCreationTime
public Optional<Instant> getCreationTime()
Returns anInstantwith the time this game was added to SRC.Games added before this field was implemented will return an empty Optional.
- Returns:
- an
Optionalwith anInstantdescribing when this game was added to SRC
-
getAssets
public GameAssets getAssets()
Gets theGameAssetsfor this game.- Returns:
- a
GameAssetsobject
-
-