Skip to content

v2.users.activity_v3

ck edited this page Oct 6, 2024 · 2 revisions

async Retrieves a list of user's recent activities by given parameters.

Usage example

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.activity({ id: 11367222 });
    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.limit? number
params.offset? number
addons.legacy_only? boolean
addons.apiVersion? '20240130' '99999999'
addons.authKey? string
addons.timeout_ms? number
addons.ignoreSessionRefresh? boolean

Response

export interface UsersActivityResponse {
  created_at: string
  createdAt: string
  id: number
  type: string
  mode: string
  beatmap: Beatmap
  user: User
  scoreRank?: string
  rank?: number
}

export interface Beatmap {
  title: string
  url: string
}

export interface User {
  username: string
  url: string
}

[v3.x.x] Documentation


[v2.x.x] Documentation

Clone this wiki locally