UNPKG

osu-api-extended

Version:

Advanced osu! api wrapper for v1 and v2, with extra stuff

18 lines (17 loc) 1.07 kB
import { types as user_types } from '../types/v2_user_me_details'; import { osu_mode, auth_scopes } from './types'; interface _login { access_token: string; expires_in: number; } export declare let cache_v1: string; export declare let cache_v2: string; export declare const set_v1: (v: string) => string; export declare const set_v2: (v: string) => string; export declare const re_login: () => Promise<boolean>; export declare const login_lazer: (username: string, password: string) => Promise<_login>; export declare const login: (clientId: number, clientSecret: string, scope: auth_scopes) => Promise<_login>; export declare const authorize_cli: (clientId: number, clientSecret: string, redirectUri: string, scope: auth_scopes, state?: string) => Promise<_login>; export declare const build_url: (clientId: number, redirectUri: string, scope: auth_scopes, state?: string) => string; export declare const authorize: (code: string, gamemode: osu_mode, clientId: number, clientSecret: string, redirectUri: string) => Promise<user_types>; export {};