@aqilcont/osu-api-extended
TypeScript icon, indicating that this package has built-in type declarations

2.0.3 • Public • Published

osu-api-extended

npm npm bundle size npm NPM

Features

  • [x] api v1
  • [x] api v2
  • [x] TypeScript support
  • [x] Openable replay file

Installation

npm i @aqilcont/osu-api-extended

Usage

Links

Initialization

const { V1, V2, mods, tools } = require('osu-api-extended');
const v1 = new V1('YOUR_OSU_KEY');
//const v2 = new V2('YOUR_CLIENT_ID', 'YOUR_CLIENT_SECRET');

API v1

(async () => {
  try {
    let beatmap = await v1.beatmap({ b: 2632763 });
    console.log(beatmap.date.update);
  } catch (err) {
    console.error(err);
  }
})();

TypeScript support

https://i.imgur.com/VXKhD3q.gif

Endpoints

Api v1

v1.beatmap();

Get beatmap data

v1.best();

Get user best scores

v1.match();

Get match data

v1.recent();

Get recent user scores

v1.replay();

Download replay file of the score

v1.scores();

Get scores of user ob beatmap

v1.user();

Get user data


Tools

tools.country();

Get country name by code

tools.accuracy();

Calculate accuracy from hits

tools.diffFile();

Download beatmap file

tools.calc();

Remote pp calculation (std only)

tools.rank();

Calculate rank from hits


Mods

mods.id();

Get name of mods from id

mods.name();

Get id of mods from name

Package Sidebar

Install

npm i @aqilcont/osu-api-extended

Weekly Downloads

0

Version

2.0.3

License

MIT

Unpacked Size

113 kB

Total Files

21

Last publish

Collaborators

  • aqilcont