struct Srcom::Game
- Srcom::Game
- Struct
- Value
- Object
Overview
Has shorthand methods to getting the resources that the Link
s in #links
point to.
Does not cover the Link
to get the applicable Level
s, Category
s, or Variable
s,
since those are already embedded.
NOTE Also does not cover romhacks, since the endpoint is deprecated and synonymous with derived-games.
Included Modules
- JSON::Serializable
Defined in:
srcr/mappings/game/game.crConstructors
Instance Method Summary
- #abbreviation : String
- #abbreviation=(abbreviation : String)
- #assets : Game::Assets
- #assets=(assets : Game::Assets)
- #base_game : Game | Nil
- #categories : Array(Category)
- #categories=(categories : Array(Category))
- #created : Time | Nil
- #created=(created : Time | Nil)
- #derived_games(page_size : Int32 = 200) : Srcom::Api::PageIterator(Game)
- #developers : Array(Developer)
- #developers=(developers : Array(Developer))
- #engines : Array(Engine)
- #engines=(engines : Array(Engine))
- #gametypes : Array(Game::Gametype)
- #gametypes=(gametypes : Array(Game::Gametype))
- #genres : Array(Genre)
- #genres=(genres : Array(Genre))
- #id : String
- #id=(id : String)
-
#leaderboard : Leaderboard
Returns the
Leaderboard
for theCategory
that is first shown when thisGame
is visited on speedrun.com. - #levels : Array(Level)
- #levels=(levels : Array(Level))
- #links : Array(Link)
- #links=(links : Array(Link))
- #moderators : Array(User)
- #moderators=(moderators : Array(User))
-
#name
Shorthand for
Name#international
. - #names : Game::Name
- #names=(names : Game::Name)
- #platforms : Array(Platform)
- #platforms=(platforms : Array(Platform))
- #publishers : Array(Publisher)
- #publishers=(publishers : Array(Publisher))
-
#records(top : Int32 = 3, scope : String = "all", miscellaneous : Bool = true, skip_empty : Bool = false, page_size : Int32 = 200) : Srcom::Api::PageIterator(Leaderboard)
Gets every
Leaderboard
with the top N runs for thisGame
, skipping over emptyLeaderboard
s if skip_empty istrue
. - #regions : Array(Region)
- #regions=(regions : Array(Region))
- #release_date : Time
- #release_date=(release_date : Time)
- #released : Int32
- #released=(released : Int32)
- #romhack : Bool
- #romhack=(romhack : Bool)
- #ruleset : Game::Ruleset
- #ruleset=(ruleset : Game::Ruleset)
- #runs(page_size : Int32 = 200) : Srcom::Api::PageIterator(Run)
- #series : Array(Series)
- #variables : Array(Variable)
- #variables=(variables : Array(Variable))
- #weblink : String
- #weblink=(weblink : String)
Constructor Detail
Instance Method Detail
Returns the Leaderboard
for the Category
that is first shown when this Game
is visited
on speedrun.com.
Shorthand for Name#international
.
NOTE This method is present on all things that have the international
+ japanese
name structure.
Gets every Leaderboard
with the top N runs for this Game
, skipping over empty
Leaderboard
s if skip_empty is true
.
If miscellaneous is set to false
, only Leaderboard
s for non-miscellaneous categories will
be returned. If it is set to true
Leaderboard
s for both miscellaneous and non-miscellaneous
categories will be returned.
This method defaults to getting everything, as it is doubtful a single Game
will have
truly that many Leaderboard
s.
NOTE This can result in more than N runs per Leaderboard
, as ties can occur.
Gets all Run
s completed in this Game
.
Defaults to getting all of them since there shouldn't be an absurd amount of Run´s in a single
Game`.