Get discussions
The beatmapsetDiscussions.getDiscussions
method on a Client
instance makes a GET
request to the beatmapsets/discussions
endpoint and returns an object containing a cursor and arrays of beatmaps, discussions and users.
Example
const votes = await api.beatmapsetDiscussions.getDiscussions({
query: {
beatmapset_id: 742961
}
});
Parameters
Parameter | Type | Optional | Description |
---|---|---|---|
options | GetDiscussionsOptions | ✓ |
options.query
Parameter | Type | Optional | Description |
---|---|---|---|
limit | number | ✓ | Max. number of results |
page | number | ✓ | Search result page number |
sort | ‘id_desc’ | ‘id_asc’ | ✓ | Sort posts by newest (id_desc ) or oldest (id_desc ) |
beatmap_id | number | ✓ | ID of the beatmap to get discussions from |
beatmapset_id | number | ✓ | ID of the beatmapset to get discussions from |
beatmapset_status | ‘all’ | ‘ranked’ | ‘qualified’ | ‘disqualified’ | ‘never_qualified’ | ✓ | Specify beatmapset status |
message_types | DiscussionMessageType[] | ✓ | Specify message types, (unset for all) |
only_unresolved | boolean | ✓ | Show only resolved issues? |
user | number | ✓ | ID of the user (official documentation doesn’t specify about what) |
Returns
Promise<{
cursor_string: Cursor;
users: UserCompact[];
discussions: BeatmapsetDiscussion[];
included_discussions: BeatmapsetDiscussion[];
beatmapsets: BeatmapsetCompact[];
beatmaps: (Beatmap & {
checksum: string | null;
})[];
reviews_config: {
max_blocks: number;
};
}>;
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 .