class Srcom::Api::Levels
- Srcom::Api::Levels
- Reference
- Object
Defined in:
srcr/apis/levels.crConstant Summary
-
Log =
Srcom::Log.for("levels")
Class Method Summary
-
.find_by_id(id : String) : Srcom::Level
Gets a
Levelgiven its id. -
.get_categories(id : String, miscellaneous : Bool | Nil = nil, order_by : String | Nil = nil, sort_direction : String | Nil = nil) : Array(Category)
Gets the categories applicable to the
Levelgiven by its id. -
.get_records(id : String, top : Int32 = 3, skip_empty : Bool = false, page_size : Int32 = 200) : PageIterator(Leaderboard)
Gets the
Leaderboards with the top N runs for theLevelwith the given id, skipping over emptyLeaderboards if skip_empty istrue. - .get_variables(id : String, order_by : String | Nil = nil, sort_direction : String | Nil = nil) : Array(Variable)
Class Method Detail
Gets the categories applicable to the Level given by its id.
Possible values for order_by: "name", "miscellaneous", or "pos", with the default being "pos".
Possible values for sort_direction: "desc" or "asc", with the default being "asc".
NOTE If miscellaneous is set to true only miscellaneous categories will be returned.
If it is set to false only non-miscellaneous categories will be returned.
If it is set to nil both miscellaneous and non-miscellaneous categories will be returned.
Gets the Leaderboards with the top N runs for the Level 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 This returns one Leaderboard for each Category that the Level can be played in.
Gets the Variables applicable to the Level given by its id.
Possible values for order_by: "name", "mandatory", "pos" or "user-defined", with the default being "pos".
Possible values for sort_direction: "desc" or "asc", with the default being "asc".