top-client
Version:
a client for taobao open platform.
25 lines (24 loc) • 647 B
TypeScript
import { AxiosResponse } from 'axios';
declare type AppConfig = {
app_key: string;
app_secret: string;
access_token: string;
};
declare type ApiParam = {
[index: string]: any;
};
declare class TaobaoClient {
basicParam: Record<string, string>;
apiUrl: string;
appsecret: string;
constructor(config: AppConfig);
/**
* Invoke API
*
* @param {String} method API Name
* @param {Object} apiParam API Business parameters
* @return {Promise<AxiosResponse>} axios response
*/
invoke(method: string, apiParam: ApiParam): Promise<AxiosResponse['data']>;
}
export default TaobaoClient;