Skip to content
cyperdark edited this page Mar 31, 2023 · 4 revisions

Searches users and wiki pages.

Authentication

const { auth } = require('osu-api-extended');
await auth.login(client_id, client_secret);

Function

await v2.site.search(object)

Parameters

Parameter Type Description
object.mode string all or user or wiki_page
object.query string Search keyword
object.page number Search result page. Ignored for mode all

Response

export interface response {
  user: {
    data: {
      avatar_url: string;
      country_code: string;
      default_group: string;
      id: number;
      is_active: boolean;
      is_bot: boolean;
      is_deleted: boolean;
      is_online: boolean;
      is_supporter: boolean;
      last_visit?: string;
      pm_friends_only: boolean;
      profile_colour?: string;
      username: string;
    }[];
    total: number;
  };
  wiki_page: {
    data: {
      available_locales: string[];
      layout: string;
      locale: string;
      markdown: string;
      path: string;
      subtitle: string;
      tags: [];
      title: string;
    }[];
    total: number;
  };
}

[v3.x.x] Documentation


[v2.x.x] Documentation

Clone this wiki locally