class Srcom::Api::Categories

Defined in:

srcr/apis/categories.cr

Constant Summary

Log = Srcom::Log.for("categories")

Class Method Summary

Class Method Detail

def self.find_by_id(id : String) : Srcom::Category #

Finds a Category by its id.


[View source]
def self.get_records(id : String, top : Int32 = 3, skip_empty : Bool = false, page_size : Int32 = 200) : PageIterator(Leaderboard) #

Gets the Leaderboard with the top N runs for the Category with the given id, skipping over empty Leaderboards if skip_empty is true.

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

NOTE For full game categories, this will only contain one element. For individual level categories a Leaderboard is returned for each level for which this category is applicable.


[View source]
def self.get_variables(id : String, order_by : String? = nil, sort_direction : String? = nil) : Array(Variable) #

Gets all Variables applicable to the Category specified by its id.

Possible values for order_by: "name", "mandatory", "pos", or "user-defined", with "pos" being the default.

Possbile values for sort_direction: "desc" or "asc", with "asc" being the default.


[View source]