osu-api-extended
Version:
Advanced osu! api wrapper cover all V2 and V1 endpoints, and provide useful tools
45 lines (44 loc) • 1.42 kB
TypeScript
export { beatmaps_download as download_beatmaps } from "../api/v2/beatmaps_download";
export { calculate_accuracy } from "./accuracy";
export { calculate_mods } from "./mods";
export { country_details } from "./country";
export { calculate_rank } from "./rank";
export { calculate_total_passed_objects, calculate_hits } from "./objects";
export { calculate_net_pp } from "./net-pp";
export declare const calculate_pp: () => any;
/**
* Builder that returns a link an 'user', a score, a beatmap, etc.
*
*
*
* ### Parameters
* - `params._direct?` - Return osu direct link for type `beatmap` and `beatmapset`
* - `params.mode?` - Return legacy link for type `score`
* - `params.type` - Type of the link
* - `params.value` - Link url value, for example `beatmap id` or `user id`
*
*
*
* ### Usage Example
* ```js
* const { tools } = require('osu-api-extended');
*
* function main() {
* try {
* const result = tools.build_url({ type: 'beatmap', value: 4397592 });
*
* console.log(result);
* } catch (error) {
* console.log(error);
* };
* };
*
* main();
* ```
*/
export declare const build_url: (params: {
_direct?: boolean;
mode?: 'osu' | 'fruits' | 'mania' | 'taiko';
type: 'beatmap' | 'beatmapset' | 'editor_timing' | 'news' | 'match' | 'avatar' | 'user' | 'badge' | 'score';
value: any;
}) => string;