Get user beatmaps

The users.getUserBeatmaps method on a Client instance makes a GET request to the users/{user}/beatmapsets/{type} endpoint and returns an array of a user’s beatmapsets.

Example

const beatmapsets = await api.users.getUserBeatmaps(14544646, 'favourite', {
  query: {
    limit: 2
  }
});

Parameters

ParameterTypeOptionalDescription
usernumberID of the user to get their beatmapsets
typeUserBeatmapsTypeType of beatmapsets
optionsGetUserBeatmapsOptions

options.query

ParameterTypeOptionalDescription
limitnumberLimit number of results
offsetnumberPagination offset

Returns

If type is set to most_played:

Promise<BeatmapPlaycount[]>;

Types

If type is set to anything else:

Promise<
  (Beatmapset & {
    beatmaps: (Beatmap & {
      checksum: string | null;
    })[];
  })[]
>;

Types

Possible Exceptions

See the error handling documentation for more information.

  • invalid_json_syntax
  • network_error
  • unexpected_response

Notice that something is missing? Found a typo? Think something's incomplete? Or think that something can be explained better? Feel free to open a pull request or submit an issue on the library's Github repository .