Get discussion votes
The beatmapsetDiscussions.getDiscussionVotes
method on a Client
instance makes a GET
request to the beatmapsets/discussions/votes
endpoint and returns an object containing a cursor and arrays of discussions, users and votes.
Example
const votes = await api.beatmapsetDiscussions.getDiscussionVotes({
query: {
beatmapset_discussion_id: 1816113
}
});
Parameters
Parameter | Type | Optional | Description |
---|---|---|---|
options | GetDiscussionVotesOptions | ✓ |
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 ) |
beatmapset_discussion_id | number | ✓ | ID of the beatmapset discussion |
receiver | number | ✓ | ID of the user receiving the votes |
score | 1 | -1 | ✓ | 1 for up vote, -1 for down vote |
user | number | ✓ | ID of the user giving votes |
Returns
Promise<{
cursor_string: Cursor;
discussions: BeatmapsetDiscussion[];
users: UserCompact[];
votes: DiscussionVote[];
}>;
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 .