class Srcom::Api::Leaderboards
- Srcom::Api::Leaderboards
- Reference
- Object
Defined in:
srcr/apis/leaderboards.crConstant Summary
-
Log =
Srcom::Log.for("leaderboards")
Class Method Summary
-
.get_full_game_board(game : String, category : String, top : Int32? = nil, platform : String? = nil, region : String? = nil, emulators : Bool? = nil, video_only : Bool = false, timing : String? = nil, date : Time? = nil, vars : Hash(String, String)? = nil) : Srcom::Leaderboard
game
andcategory
can both be ids or abbreviations Gets the fullLeaderboard
for the given game and the given category, where both game and category can be the respective id or abbreviation, and category must represent a per-gameCategory
. -
.get_level_board(game : String, level : String, category : String, top : Int32? = nil, platform : String? = nil, region : String? = nil, emulators : Bool? = nil, video_only : Bool = false, timing : String? = nil, date : Time? = nil, vars : Hash(String, String)? = nil) : Srcom::Leaderboard
game
andcategory
can both be ids or abbreviations Gets the fullLeaderboard
for the given game, the given category and the given *game, all of which can be their respective id or abbreviation, and where category needs to represent a per-levelCategory
.
Class Method Detail
game
and category
can both be ids or abbreviations
Gets the full Leaderboard
for the given game and the given category, where both game
and category can be the respective id or abbreviation, and category must represent
a per-game Category
.
Setting top will restrict each Leaderboard
to only contain the top N runs.
Both platform and region can be set to a Platform
/ Region
id to restrict the Leaderboard
to only containing runs completed on that Platform
/ Region
.
When emulators is set to true
, only runs done on an emulator will be included in the Leaderboard
.
If it is set to false
, only runs not done on an emulator will be included. If it is nil
,
both runs doneon an emulated and runs done on a real system will be included.
If video_only is set to true
, only runs with video proof will be included in the Leaderboard
.
If it is set to false, runs with and without video proof will be included.
Possible values for timing: "realtime", "realtime_noloads", or "ingame". This ranks the runs
on the Leaderboard
by that respective time.
Setting date will result in only runs that were done before the given date being included
in the Leaderboard
.
The vars hash needs to be of the format variable_id => value_id
, which will restrict the Leaderboard
to only include runs that have that Variable
set to that Variable::Values::Value
.
NOTE Giving a value for timing that the given game doesn't support will result in an error.
game
and category
can both be ids or abbreviations
Gets the full Leaderboard
for the given game, the given category and the given *game,
all of which can be their respective id or abbreviation, and where category needs to represent
a per-level Category
.
Setting top will restrict each Leaderboard
to only contain the top N runs.
Both platform and region can be set to a Platform
/ Region
id to restrict the Leaderboard
to only containing runs completed on that Platform
/ Region
.
When emulators is set to true
, only runs done on an emulator will be included in the Leaderboard
.
If it is set to false
, only runs not done on an emulator will be included. If it is nil
,
both runs doneon an emulated and runs done on a real system will be included.
If video_only is set to true
, only runs with video proof will be included in the Leaderboard
.
If it is set to false, runs with and without video proof will be included.
Possible values for timing: "realtime", "realtime_noloads", or "ingame". This ranks the runs
on the Leaderboard
by that respective time.
Setting date will result in only runs that were done before the given date being included
in the Leaderboard
.
The vars hash needs to be of the format variable_id => value_id
, which will restrict the Leaderboard
to only include runs that have that Variable
set to that Variable::Values::Value
.
NOTE Giving a value for timing that the given game doesn't support will result in an error.