class Srcom::Api::Users

Defined in:

srcr/apis/users.cr

Constant Summary

Log = Srcom::Log.for("users")

Class Method Summary

Class Method Detail

def self.find_by(lookup : String | Nil = nil, name : String | Nil = nil, twitch : String | Nil = nil, hitbox : String | Nil = nil, twitter : String | Nil = nil, speedrunslive : String | Nil = nil, order_by : String | Nil = nil, sort_direction : String | Nil = nil, page_size : Int32 = 200) : PageIterator(User) #

Searches through all Users 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.


[View source]
def self.find_by_id(id : String) : Srcom::User #

Finds a User by the given id or user name.


[View source]
def self.get_pbs(id : String, top : Int32 | Nil = nil, series : String | Nil = nil, game : String | Nil = 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.

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.


[View source]