-
Notifications
You must be signed in to change notification settings - Fork 15
v2.notifications.list
cyperdark edited this page May 23, 2023
·
4 revisions
This endpoint returns a list of the user's unread notifications. Sorted descending by id with limit of 50.
const { auth } = require('osu-api-extended');
await auth.login_lazer(username, password);
await v2.notifications.list(max_id)
Parameter | Type | Description |
---|---|---|
max_id | string |
Maximum id fetched. Can be used to load earlier notifications. Defaults to no limit (fetch latest notifications) |
export interface response {
notifications: {
id: number;
name: string;
created_at: string;
object_type: string;
object_id: number;
source_user_id: number;
is_read: boolean;
details: {
title: string;
username: string;
cover_url: string;
beatmapset_id: number;
title_unicode: string;
type: string;
post_id: number;
};
}[];
stacks: {
category: string;
cursor?: string;
name: string;
object_type: string;
object_id: number;
total: number;
}[];
timestamp: string;
types: {
cursor: {
id: number;
type: string;
};
name: string;
total: number;
}[];
notification_endpoint: string;
}