Skip to content

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.

Authentication

const { auth } = require('osu-api-extended');
await auth.login_lazer(username, password);

Function

await v2.notifications.list(max_id)

Parameters

Parameter Type Description
max_id string Maximum id fetched. Can be used to load earlier notifications. Defaults to no limit (fetch latest notifications)

Response

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;
}

[v3.x.x] Documentation


[v2.x.x] Documentation

Clone this wiki locally