Class: BeatmapsComponent

Components.BeatmapsComponent()

Beatmap-related API component

Constructor

new BeatmapsComponent()

Source:
Example
api.beatmaps
    .getByBeatmapId('646609')
    .then(console.log);

Methods

getByBeatmapHash(hash, modeopt, limitopt, includeConvertsopt, modsopt) → {Promise.<(Array.<Object>|Array.<Beatmap>)>}

Get beatmaps via the hash of a beatmap.
Parameters:
Name Type Attributes Description
hash String The hash of the beatmap to lookup.
mode Mode <optional>
The gamemode of maps to find.
limit Number <optional>
The limit of maps to find.
includeConverts Converts <optional>
If converts should be included in the lookup.
mods Mods <optional>
Applied mods.
Source:
Returns:
The object array from the API, or Beatmap object array if parsing is enabled.
Type
Promise.<(Array.<Object>|Array.<Beatmap>)>

getByBeatmapId(beatmapId, modeopt, limitopt, includeConvertsopt, modsopt) → {Promise.<(Array.<Object>|Array.<Beatmap>)>}

Get beatmaps via beatmap ID.
Parameters:
Name Type Attributes Description
beatmapId String The beatmap ID to lookup beatmaps from.
mode Mode <optional>
The gamemode of maps to find.
limit Number <optional>
The limit of maps to find.
includeConverts Converts <optional>
If converts should be included in the lookup.
mods Mods <optional>
Applied mods.
Source:
Returns:
The object array from the API, or Beatmap object array if parsing is enabled.
Type
Promise.<(Array.<Object>|Array.<Beatmap>)>

getBySetId(setId, modeopt, limitopt, includeConvertsopt, modsopt) → {Promise.<(Array.<Object>|Array.<Beatmap>)>}

Get beatmaps via beatmap set ID.
Parameters:
Name Type Attributes Description
setId String The set ID to lookup beatmaps from.
mode Mode <optional>
The gamemode of maps to find.
limit Number <optional>
The limit of maps to find.
includeConverts Converts <optional>
If converts should be included in the lookup.
mods Mods <optional>
Applied mods.
Source:
Returns:
The object array from the API, or Beatmap object array if parsing is enabled.
Type
Promise.<(Array.<Object>|Array.<Beatmap>)>

getByUser(user, modeopt, limitopt, includeConvertsopt, lookupTypeopt, modsopt) → {Promise.<(Array.<Object>|Array.<Beatmap>)>}

Get beatmaps via user ID.
Parameters:
Name Type Attributes Description
user String The user to lookup beatmaps from.
mode Mode <optional>
The gamemode of maps to find.
limit Number <optional>
The limit of maps to find.
includeConverts Converts <optional>
If converts should be included in the lookup.
lookupType LookupType <optional>
The type of lookup of the user.
mods Mods <optional>
Applied mods.
Source:
Returns:
The object array from the API, or Beatmap object array if parsing is enabled.
Type
Promise.<(Array.<Object>|Array.<Beatmap>)>

getSince(since, modeopt, limitopt, includeConvertsopt, modsopt) → {Promise.<(Array.<Object>|Array.<Beatmap>)>}

Get beatmaps via their ranked/approval date.
Parameters:
Name Type Attributes Description
since Date | string Minimum approved_date. Date object or MySQL date.
mode Mode <optional>
The gamemode of maps to find.
limit Number <optional>
The limit of maps to find.
includeConverts Converts <optional>
If converts should be included in the lookup.
mods Mods <optional>
Applied mods.
Source:
Returns:
The object array from the API, or Beatmap object array if parsing is enabled.
Type
Promise.<(Array.<Object>|Array.<Beatmap>)>