@aqilcont/osu-api-extended
v2.0.3
Published
Package for advanced work with 'osu' api
Downloads
7
Maintainers
Readme
osu-api-extended
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
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