-
Notifications
You must be signed in to change notification settings - Fork 15
v2.scores.download_v3
ck edited this page Oct 6, 2024
·
1 revision
async
Downloads a score by given parameters.
const { auth, v2 } = require('osu-api-extended');
async function main() {
try {
await auth.login({
type: 'lazer',
login: login,
password: password,
cachedTokenPath: './test.json' // path to the file your auth token will be saved (to prevent osu!api spam)
});
const result = await v2.scores.download({
id: 3427873257,
file_path: './cache/replay.osr'
});
if (result.error != null) {
console.log(result.error);
return;
};
console.log(result);
} catch (error) {
console.log(error);
};
};
main();
Parameter | Type | Description |
---|---|---|
params.id | number | |
params.mode? | Modes_names | |
params.file_path | string |
export interface ScoresDownloadResponse {
status: string
destination: string
elapsed_time: number
}