class Srcom::Api::Categories
- Srcom::Api::Categories
- Reference
- Object
Defined in:
srcr/apis/categories.crConstant Summary
-
Log =
Srcom::Log.for("categories")
Class Method Summary
-
.find_by_id(id : String) : Srcom::Category
Finds a
Category
by its id. -
.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 theCategory
with the given id, skipping over emptyLeaderboard
s if skip_empty istrue
. - .get_variables(id : String, order_by : String? = nil, sort_direction : String? = nil) : Array(Variable)
Class Method Detail
Gets the Leaderboard
with the top N runs for the Category
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 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.
Gets all Variable
s 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.