@floemia/osu-droid-utils
v0.1.3
Published
Utils for osu!droid and osudroid!rx.
Readme
osu!droid utils!
This is a library that contains tools for osu!droid's main server, as well as osudroid!rx.
Still in development! There may be some issues.
Installation
$ npm i @floemia/osu-droid-utilsUsage
Import
// main server!
import { DroidBanchoUser, DroidBanchoScore } from "@floemia/osu-droid-utils"
// rx server!
import { DroidRXUser } from "@floemia/osu-droid-utils"
// require() is also supported!
Get a user and their scores
- From the main server
// get a user!
const user = await DroidBanchoUser.get({ uid: 177955 });
// or, alernatively:
const user = await DroidBanchoUser.get({ username: "MG_floemia" });
const recent_scores = user.getRecentScores(); // a DroidBanchoScore[]
const top_scores = user.getTopScores(); // another DroidBanchoScore[]- From osudroid!rx:
// get a user!
const user = await DroidRXUser.get({ uid: 12 });
// or, alernatively:
const user = await DroidRXUser.get({ username: "ouigycqhjfw" });
// get the user's scores!
// for osudroid!rx, this is an async method!
const recent_scores = await user.getRecentScores(); // a DroidRXScore[]
const top_scores = await user.getTopScores(); // another DroidRXScore[]Calculate a score's performance values
// considering that score is an instance of DroidScore
// or any of its subclasses
const data = await score.calculate()Convert a score to a full combo
// considering that score is an instance of DroidScore
// or any of its subclasses
// to convert to a FC accurately, score.beatmap must be present!
// call score.getBeatmap() or score.calculate() first.
const score_fc = DroidScore.toFC(score);
// calculate it!
const data_fc = await score_fc.calculate();