struct

Srcom::Game

Inherits JSON::Serializable / Struct / Value / Object

Has shorthand methods to getting the resources that the Links in #links point to. Does not cover the Link to get the applicable Levels, Categorys, or Variables, since those are already embedded.

NOTE: Also does not cover romhacks, since the endpoint is deprecated and synonymous with derived-games.

Constructors

new(pull : JSON::PullParser)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

abbreviation
Source
abbreviation=(abbreviation : String)
Source
assets
Source
assets=(assets : Game::Assets)
Source
base_game

Returns the Game this Game is derived from, if it is a derived game.

Source
categories
Source
categories=(categories : Array(Category))
Source
created
Source
created=(created : Time | Nil)
Source
derived_games(page_size : Int32 = 200) : Srcom::Api::PageIterator(Game)

Returns all Games derived from this Game.

Source
developers
Source
developers=(developers : Array(Developer))
Source
engines
Source
engines=(engines : Array(Engine))
Source
gametypes
Source
gametypes=(gametypes : Array(Game::Gametype))
Source
genres
Source
genres=(genres : Array(Genre))
Source
id=(id : String)
Source
leaderboard

Returns the Leaderboard for the Category that is first shown when this Game is visited on speedrun.com.

Source
levels
Source
levels=(levels : Array(Level))
Source
moderators
Source
moderators=(moderators : Array(User))
Source
name

Shorthand for Name#international.

NOTE: This method is present on all things that have the international + japanese name structure.

Source
names
Source
names=(names : Game::Name)
Source
platforms
Source
platforms=(platforms : Array(Platform))
Source
publishers
Source
publishers=(publishers : Array(Publisher))
Source
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 this Game, skipping over empty Leaderboards if skip_empty is true.

If miscellaneous is set to false, only Leaderboards for non-miscellaneous categories will be returned. If it is set to true Leaderboards 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 Leaderboards.

NOTE: This can result in more than N runs per Leaderboard, as ties can occur.

Source
regions
Source
regions=(regions : Array(Region))
Source
release_date
Source
release_date=(release_date : Time)
Source
released
Source
released=(released : Int32)
Source
romhack
Source
romhack=(romhack : Bool)
Source
ruleset
Source
ruleset=(ruleset : Game::Ruleset)
Source
runs(page_size : Int32 = 200) : Srcom::Api::PageIterator(Run)

Gets all Runs 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`.

Source
series

Gets all the Series this Game belongs to, if it belongs to any.

NOTE: It is both possible for a game to not be part of a Series, and for it to be part of several.

Source
variables
Source
variables=(variables : Array(Variable))
Source

Nested types