class Srcom::Api::Users
- Srcom::Api::Users
- Reference
- Object
Defined in:
srcr/apis/users.crConstant Summary
-
Log =
Srcom::Log.for("users")
Class Method Summary
-
.find_by(lookup : String? = nil, name : String? = nil, twitch : String? = nil, hitbox : String? = nil, twitter : String? = nil, speedrunslive : String? = nil, order_by : String? = nil, sort_direction : String? = nil, page_size : Int32 = 200) : PageIterator(User)
Searches through all
User
s using the given query parameters. -
.find_by_id(id : String) : Srcom::User
Finds a
User
by the given id or user name. -
.get_pbs(id : String, top : Int32? = nil, series : String? = nil, game : String? = nil) : Array(Srcom::PBRun)
Gets the personal bests of the
User
with the given id, where id can be either a real ID or a username.
Class Method Detail
Searches through all User
s using the given query parameters.
Using lookups performs an exact-match search across all usernames, URLs and social profiles.
Searching by name searches for the substring across usernames and URLs.
All other parameters search across users' names on the respective platform.
Possible values for order_by: "name.jap", "name.int", "signup", or "role", with the default being "name.int".
Possible values for sort_direction: "desc" or "asc", with the default being "asc".
BUG Not specifying any filters will currently cause the request to always fail, as simply searching across users is disabled on speedrun.com's side.
NOTE When using lookup all other filters are disabled.
NOTE All search parameters are case-insensitive.
Gets the personal bests of the User
with the given id, where id can be either a real ID
or a username.
Providing top will only return runs of rank top or better.
If series or game are given, only runs done in that Series
/ Game
are returned. Both
of these can be provided as a real ID or their respective abbreviation.