-
Notifications
You must be signed in to change notification settings - Fork 16
v2.users.events_v3
ck edited this page Oct 6, 2024
·
2 revisions
GET
/v2/events
async
Retrieves a list of user events by given parameters.
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.users.events()
if (result.error != null) {
console.log(result.error);
return;
};
console.log(result);
} catch (error) {
console.log(error);
};
};
main();
Parameter | Type | Description |
---|---|---|
params.type? | ('achievement' | 'beatmapPlaycount' |
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 |
Parameter | Type | Description |
---|---|---|
r | any |
import { Modes_names } from "../index";
export enum ActionType {
Rank = 'rank',
Achievement = 'achievement',
BeatmapsetUpload = 'beatmapsetUpload',
BeatmapsetUpdate = 'beatmapsetUpdate',
UsernameChange = 'usernameChange',
UserSupportFirst = 'userSupportFirst',
UserSupportAgain = 'userSupportAgain',
BeatmapsetRevive = 'beatmapsetRevive',
BeatmapsetApprove = 'beatmapsetApprove',
}
export interface UsersEventsResponse {
events: Event[];
cursor: Cursor;
cursor_string: string;
}
export interface Cursor {
event_id: number;
}
export interface Event {
created_at: string;
createdAt: string;
id: number;
type: 'achievement' | 'beatmapPlaycount' | 'beatmapsetApprove' | 'beatmapsetDelete' | 'beatmapsetRevive' | 'beatmapsetUpdate' | 'beatmapsetUpload' | 'rank' | 'userSupportAgain' | 'userSupportFirst' | 'userSupportGift' | 'usernameChange';
scoreRank?: string;
rank?: number;
mode?: Modes_names;
beatmap?: Beatmap;
user?: User;
achievement?: Achievement;
beatmapset?: Beatmapset;
approval?: string;
}
export interface Beatmap {
title: string;
url: string;
}
export interface User {
username: string;
url: string;
previousUsername?: string;
}
export interface Achievement {
icon_url: string;
id: number;
name: string;
grouping: string;
ordering: number;
slug: string;
description: string;
mode: Modes_names;
instructions: any;
}
export interface Beatmapset {
title: string
url: string
}