1.1.9 • Published 4 years ago
node-osu-api v1.1.9
node-osu-api
Simplifies working with osu! api v1
Installation
npm install node-osu-api
Constructor
const osuApi = new osu.Api(process.env.osuApiKey);
getBeatmaps
osuApi.getBeatmaps({ b: '1969946' }).then(beatmaps => {
console.log(beatmaps);
});
getUser
osuApi.getUser({ u: 'seneaL' }).then(user => {
console.log(user);
});
getScores && Calculate stats with mods
osuApi.getScores({ b: `728001`, u: `seneaL`}).then(scores => {
osuApi.diffCalculate(scores[0].beatmap.difficulty, 72).then(recalc => {
console.log(scores[0]);
console.log(recalc);
});
});
getUserRecent
osuApi.getUserRecent({ u: 'seneaL'}).then(scores => {
console.log(scores);
});
getUserBest
osuApi.getUserBest({ u: 'seneaL' }).then(scores => {
console.log(scores);
});
License
MIT