-
Notifications
You must be signed in to change notification settings - Fork 16
v2.beatmaps.packs.details_v3
ck edited this page Oct 6, 2024
·
2 revisions
async
Retrieves a beatmap pack by given ID.
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.packs.details('ST265');
if (result.error != null) {
console.log(result.error);
return;
};
console.log(result);
} catch (error) {
console.log(error);
};
};
main();
Parameter | Type | Description |
---|---|---|
pack_tag | string | |
addons.legacy_only? | boolean | |
addons.apiVersion? | '20240130' | '99999999' |
addons.authKey? | string | |
addons.timeout_ms? | number | |
addons.ignoreSessionRefresh? | boolean |
export interface BeatmapsPacksDetailsResponse {
author: string
date: string
name: string
no_diff_reduction: boolean
ruleset_id: any
tag: string
url: string
beatmapsets: Beatmapset[]
user_completion_data: UserCompletionData
}
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?: number
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
}
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
required: number
}
export interface Availability {
download_disabled: boolean
more_information: any
}
export interface UserCompletionData {
completed: boolean
beatmapset_ids: any[]
}