UNPKG

osu-api-extended

Version:

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

26 lines (25 loc) 1.03 kB
import { IDefaultParams, IError } from "../../types"; import { RoomsScoresSingleResponse } from "../../types/v2/rooms_scores_single"; import { RoomScoresUserHighestResponse } from "../../types/v2/rooms_scores_user_highest"; import { RoomsScoresAllResponse } from "../../types/v2/rooms_scores_all"; type params = ({ type: 'all'; id: number; playlist_id: number; limit?: number; sort?: 'score_asc' | 'score_desc'; cursor_string?: string; } | { type: 'single'; id: number; playlist_id: number; score_id: number; } | { type: 'user_highest'; id: number; playlist_id: number; user_id: number; }); type Response<T extends params['type']> = T extends 'all' ? RoomsScoresAllResponse & IError : T extends 'single' ? RoomsScoresSingleResponse & IError : T extends 'user_highest' ? RoomScoresUserHighestResponse & IError : IError; export declare const rooms_scores: <T extends params>(params: T, addons?: IDefaultParams) => Promise<Response<T["type"]>>; export {};