UNPKG

osu-api-extended

Version:

Advanced osu! api wrapper cover all V2 and V1 endpoints, and provide useful tools

45 lines (44 loc) 1.14 kB
import { IError } from "../types"; import { Mod } from "../types/mods"; import { ModsResponse } from "../types/tools"; export declare const ModsToName: (modsNumber: number, order?: boolean) => string; type Response = ModsResponse & IError; /** * Get mods short name or mods number by giving one of them * *   * * ### Parameters * - `mods` - Number / Name / Array of { acronym: "EZ" } * - `order?` - Transform mods from DTHD to HDDT * *   * * ### Usage Example * ```js * const { tools } = require('osu-api-extended'); * * function main() { * try { * const result = tools.calculate_mods('HDDT'); * // or * const result = tools.calculate_mods(72); * // or * const result = tools.calculate_mods([{ acronym: "EZ" }]); * if (result.error != null) { * console.log(result.error); * return; * }; * * * console.log(result); * } catch (error) { * console.log(error); * }; * }; * * main(); * ``` */ export declare const calculate_mods: (mods: Mod[] | string | number, order?: boolean) => Response; export {};