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
Level
given 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
Level
given by its id. -
.get_records(id : String, top : Int32 = 3, skip_empty : Bool = false, page_size : Int32 = 200) : PageIterator(Leaderboard)
Gets the
Leaderboard
s with the top N runs for theLevel
with the given id, skipping over emptyLeaderboard
s 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 Leaderboard
s with the top N runs for the Level
with the given id,
skipping over empty Leaderboard
s 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 Variable
s 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".