osu-api-extended
Version:
Advanced osu! api wrapper cover all V2 and V1 endpoints, and provide useful tools
34 lines (33 loc) • 918 B
TypeScript
import { IDefaultParams, IError } from '../types';
export interface RequestType {
(url: string, params: {
method: string;
data?: string;
headers?: {
[key: string]: string;
};
params?: {
[key: string]: any;
};
addons?: IDefaultParams;
}): Promise<any & {
error: string;
}>;
}
export declare const request: RequestType;
/**
* Executes an HTTP request
* @param {string} url The url
* @param {string} dest The file destination
* @returns {Promise<any>} The response
*/
export declare const download: (url: string, dest: string, { _callback, headers, data, params, callback, addons }: {
_callback: boolean;
headers?: {
[key: string]: string;
};
data?: string;
params?: any;
addons?: IDefaultParams;
callback?: Function;
}) => Promise<any & IError>;