-
Notifications
You must be signed in to change notification settings - Fork 16
v2.beatmaps.discussions.list_v3
ck edited this page Oct 6, 2024
·
2 revisions
async
Retrieves a list of beatmap set discussions.
const { auth, v2 } = require('osu-api-extended');
async function main() {
try {
await auth.login({
type: 'v2',
client_id: CLIENT_ID,
client_secret: CLIENT_SECRET,
cachedTokenPath: './test.json' // path to the file your auth token will be saved (to prevent osu!api spam)
});
const result = await v2.beatmaps.discussions.list({ beatmapset_id: 2084849 });
if (result.error != null) {
console.log(result.error);
return;
};
console.log(result);
} catch (error) {
console.log(error);
};
};
main();
Parameter | Type | Description |
---|---|---|
params.only_unresolved? | boolean | |
params.user? | number | |
params.beatmap_id? | number | |
params.beatmapset_id? | number | |
params.beatmapset_status? | 'all' | 'ranked' |
params.message_types? | ('suggestion' | 'problem' |
params.limit? | number | |
params.sort? | 'id_desc' | 'id_asc' |
params.cursor_string? | string | |
addons.legacy_only? | boolean | |
addons.apiVersion? | '20240130' | '99999999' |
addons.authKey? | string | |
addons.timeout_ms? | number | |
addons.ignoreSessionRefresh? | boolean |
export interface BeatmapsDiscussionsListResponse {
beatmaps: Beatmap[]
beatmapsets: Beatmapset[]
discussions: Discussion[]
included_discussions: any[]
reviews_config: ReviewsConfig
users: User[]
cursor: Cursor
cursor_string: string
}
export interface Beatmap {
beatmapset_id: number
difficulty_rating: number
id: number
mode: string
status: string
total_length: number
user_id: number
version: string
accuracy: number
ar: number
bpm: number
convert: boolean
count_circles: number
count_sliders: number
count_spinners: number
cs: number
deleted_at?: string
drain: number
hit_length: number
is_scoreable: boolean
last_updated: string
mode_int: number
passcount: number
playcount: number
ranked: number
url: string
checksum?: string
}
export interface Beatmapset {
artist: string
artist_unicode: string
covers: Covers
creator: string
favourite_count: number
hype: any
id: number
nsfw: boolean
offset: number
play_count: number
preview_url: string
source: string
spotlight: boolean
status: string
title: string
title_unicode: string
track_id: any
user_id: number
video: boolean
bpm: number
can_be_hyped: boolean
deleted_at: any
discussion_enabled: boolean
discussion_locked: boolean
is_scoreable: boolean
last_updated: string
legacy_thread_url: string
nominations_summary: NominationsSummary
ranked: number
ranked_date: string
storyboard: boolean
submitted_date: string
tags: string
availability: Availability
has_favourited: boolean
}
export interface Covers {
cover: string
"cover@2x": string
card: string
"card@2x": string
list: string
"list@2x": string
slimcover: string
"slimcover@2x": string
}
export interface NominationsSummary {
current: number
eligible_main_rulesets: string[]
required_meta: RequiredMeta
}
export interface RequiredMeta {
main_ruleset: number
non_main_ruleset: number
}
export interface Availability {
download_disabled: boolean
more_information: any
}
export interface Discussion {
id: number
beatmapset_id: number
beatmap_id?: number
user_id: number
deleted_by_id: any
message_type: string
parent_id?: number
timestamp?: number
resolved: boolean
can_be_resolved: boolean
can_grant_kudosu: boolean
created_at: string
updated_at: string
deleted_at: any
last_post_at: string
kudosu_denied: boolean
current_user_attributes: CurrentUserAttributes
starting_post: StartingPost
}
export interface CurrentUserAttributes {
vote_score: number
can_moderate_kudosu: boolean
can_resolve: boolean
can_reopen: boolean
can_destroy: boolean
}
export interface StartingPost {
beatmapset_discussion_id: number
created_at: string
deleted_at: any
deleted_by_id: any
id: number
last_editor_id?: number
message: string
system: boolean
updated_at: string
user_id: number
}
export interface ReviewsConfig {
max_blocks: number
}
export interface User {
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: Group[]
}
export interface Group {
colour: string
has_listing: boolean
has_playmodes: boolean
id: number
identifier: string
is_probationary: boolean
name: string
short_name: string
playmodes?: string[]
}
export interface Vote {
beatmapset_discussion_id: number
created_at: string
id: number
score: number
updated_at: string
user_id: number
}
export interface Cursor {
page: number
limit: number
}