struct Srcom::SimpleGame

Overview

Has shorthand methods to getting the resources that the Links in #links point to. Also has shorthand methods to get all the full resources for things that didn't get embedded.

NOTE Not covering the romhacks link, since it is deprecated and synonymous with derived-games.

Included Modules

Defined in:

srcr/mappings/game/simple_game.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]

Instance Method Detail

def abbreviation : String #

[View source]
def abbreviation=(abbreviation : String) #

[View source]
def assets : Game::Assets #

[View source]
def assets=(assets : Game::Assets) #

[View source]
def base_game : Game | Nil #

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


[View source]
def categories(miscellaneous : Bool | Nil = nil) : Array(Category) #

Gets all the Categorys this game can be played in.


[View source]
def created : Time | Nil #

[View source]
def created=(created : Time | Nil) #

[View source]
def derived_games(page_size : Int32 = 200) : Srcom::Api::PageIterator(Game) #

Returns all Games derived from this Game.


[View source]
def developers : Array(String) #

[View source]
def developers=(developers : Array(String)) #

[View source]
def engines : Array(String) #

[View source]
def engines=(engines : Array(String)) #

[View source]
def full_developers : Array(Developer) #

Gets the full Developers that developed this game.


[View source]
def full_engines : Array(Engine) #

Gets the full Engines this game runs on.


[View source]
def full_game : Game #

Gets this SimpleGame as a full Game with everything embedded.


[View source]
def full_gametypes : Array(Game::Gametype) #

Gets the full Gametypes applicable to this game.


[View source]
def full_genres : Array(Genre) #

Gets the full Genres this game belongs to.


[View source]
def full_moderators : Array(User) #

Gets the full Users that moderate this game.


[View source]
def full_platforms : Array(Platform) #

Gets the full Platforms this game runs on.


[View source]
def full_publishers : Array(Publisher) #

Gets the full Publishers that published this game.


[View source]
def full_regions : Array(Region) #

Gets the full Regions this game is available in.


[View source]
def gametypes : Array(String) #

[View source]
def gametypes=(gametypes : Array(String)) #

[View source]
def genres : Array(String) #

[View source]
def genres=(genres : Array(String)) #

[View source]
def id : String #

[View source]
def id=(id : String) #

[View source]
def leaderboard : Leaderboard #

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


[View source]
def levels : Array(Level) #

Gets all the Levels belonging to this game.


[View source]
def links : Array(Link) #

[View source]
def links=(links : Array(Link)) #

[View source]
def moderators : Hash(String, String) #

[View source]
def moderators=(moderators : Hash(String, String)) #

[View source]
def name #

Shorthand for Name#international.

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


[View source]
def names : Game::Name #

[View source]
def names=(names : Game::Name) #

[View source]
def platforms : Array(String) #

[View source]
def platforms=(platforms : Array(String)) #

[View source]
def publishers : Array(String) #

[View source]
def publishers=(publishers : Array(String)) #

[View source]
def 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.

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


[View source]
def regions : Array(String) #

[View source]
def regions=(regions : Array(String)) #

[View source]
def release_date : String #

[View source]
def release_date=(release_date : String) #

[View source]
def released : Int32 #

[View source]
def released=(released : Int32) #

[View source]
def romhack : Bool #

[View source]
def romhack=(romhack : Bool) #

[View source]
def ruleset : Game::Ruleset #

[View source]
def ruleset=(ruleset : Game::Ruleset) #

[View source]
def 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 singleGame`.


[View source]
def series : Array(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.


[View source]
def variables : Array(Variable) #

Gets all the Variables applicable to this game.


[View source]
def weblink : String #

[View source]
def weblink=(weblink : String) #

[View source]