ScoreSaber. Players

Allows interaction with the ScoreSaber Player API endpoints

Methods

(static) basicInfoById(playerId) → {Promise.<Array>}

Returns basic player info

Parameters:
NameTypeDescription
playerIdstring

Player ID

Returns:

Returns a Promise with basic info on a player

Type: 
Promise.<Array>

(static) count(search, countries) → {Promise.<Array>}

Returns an integer value of the number of players based on filters

Parameters:
NameTypeDescription
searchstring

Query for specific terms

countriesArray

Filter by ISO 3166-1 alpha-2 code

Returns:

Returns a Promise with a integer of the number of players found matching filtered results

Type: 
Promise.<Array>

(static) fullInfoById(playerId) → {Promise.<Array>}

Returns full player info

Parameters:
NameTypeDescription
playerIdstring

Player ID

Returns:

Returns a Promise with full info on a player

Type: 
Promise.<Array>

(static) get(search, page, countries, withMetadata) → {Promise.<Array>}

Gets a list of players based on filters

Parameters:
NameTypeDescription
searchstring

Query for specific terms

pagenumber

Page of result

countriesArray

Filter by ISO 3166-1 alpha-2 code

withMetadataboolean

True by default. Returns total number of results, page number, and items per page

Returns:

Returns a Promise with a list of players based on filters

Type: 
Promise.<Array>

(static) scoresById(playerId, limit, sort) → {Promise.<Array>}

Returns a list of a players scores

Parameters:
NameTypeDescription
playerIdstring

Player ID

limitnumber

Maximum number of results to be returned

sortstring

The sort order. Valid values are "top" and "recent".

Returns:

Returns a Promise with full info on a player

Type: 
Promise.<Array>