-
Notifications
You must be signed in to change notification settings - Fork 16
v2.beatmap.discussions.votes
cyperdark edited this page Mar 31, 2023
·
5 revisions
Return votes (+discussions, users) from beatmap set discussions
const { auth } = require('osu-api-extended');
await auth.login(client_id, client_secret);
await v2.beatmap.discussions.votes(object)
Parameter | Type | Description |
---|---|---|
object.beatmapset_discussion_id | number |
id of beatmap set id |
object.limit | number |
Maximum number of results |
object.page | number |
Search page |
object.receiver | number |
id of the user |
object.score | number |
1 for up vote, -1 for down vote |
object.sort | string |
id_desc or id_asc
|
object.user | number |
id of the user |
export interface response {
discussions: {
id: number;
beatmapset_id: number;
beatmap_id?: number;
user_id: number;
deleted_by_id?: string;
message_type: string;
parent_id?: string;
timestamp?: number;
resolved: boolean;
can_be_resolved: boolean;
can_grant_kudosu: boolean;
created_at: string;
updated_at: string;
deleted_at?: string;
last_post_at: string;
kudosu_denied: boolean;
}[];
users: {
avatar_url: string;
country_code: string;
default_group: string;
id: number;
is_active: boolean;
is_bot: boolean;
is_deleted: boolean;
is_online: boolean;
is_supporter: boolean;
last_visit?: string;
pm_friends_only: boolean;
profile_colour?: string;
username: string;
groups: {
colour: string;
has_listing: boolean;
has_playmodes: boolean;
id: number;
identifier: string;
is_probationary: boolean;
name: string;
short_name: string;
playmodes: string[];
}[];
}[];
votes: {
beatmapset_discussion_id: number;
created_at: string;
id: number;
score: number;
updated_at: string;
user_id: number;
}[];
cursor: string;
cursor_string: string;
}