|
| 1 | +/** |
| 2 | + * Gate API v4 |
| 3 | + * Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user\'s behalf. |
| 4 | + * |
| 5 | + |
| 6 | + * |
| 7 | + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). |
| 8 | + * https://openapi-generator.tech |
| 9 | + * Do not edit the class manually. |
| 10 | + */ |
| 11 | + |
| 12 | +/* tslint:disable:no-unused-locals */ |
| 13 | +import { AccountDetail } from '../model/accountDetail'; |
| 14 | +import { ObjectSerializer } from '../model/models'; |
| 15 | +import { ApiClient } from './apiClient'; |
| 16 | +import { AxiosRequestConfig, AxiosResponse } from 'axios'; |
| 17 | + |
| 18 | +// =============================================== |
| 19 | +// This file is autogenerated - Please do not edit |
| 20 | +// =============================================== |
| 21 | + |
| 22 | +export class AccountApi { |
| 23 | + protected client: ApiClient; |
| 24 | + |
| 25 | + constructor(client?: ApiClient) { |
| 26 | + if (client) { |
| 27 | + this.client = client; |
| 28 | + } else { |
| 29 | + this.client = new ApiClient(); |
| 30 | + } |
| 31 | + } |
| 32 | + |
| 33 | + /** |
| 34 | + * |
| 35 | + * @summary Get account detail |
| 36 | + */ |
| 37 | + public async getAccountDetail(): Promise<{ response: AxiosResponse; body: AccountDetail }> { |
| 38 | + const localVarPath = this.client.basePath + '/account/detail'; |
| 39 | + const localVarQueryParameters: any = {}; |
| 40 | + const localVarHeaderParams: any = (<any>Object).assign({}, this.client.defaultHeaders); |
| 41 | + const produces = ['application/json']; |
| 42 | + // give precedence to 'application/json' |
| 43 | + if (produces.indexOf('application/json') >= 0) { |
| 44 | + localVarHeaderParams.Accept = 'application/json'; |
| 45 | + } else { |
| 46 | + localVarHeaderParams.Accept = produces.join(','); |
| 47 | + } |
| 48 | + |
| 49 | + const config: AxiosRequestConfig = { |
| 50 | + method: 'GET', |
| 51 | + params: localVarQueryParameters, |
| 52 | + headers: localVarHeaderParams, |
| 53 | + url: localVarPath, |
| 54 | + }; |
| 55 | + |
| 56 | + const authSettings = ['apiv4']; |
| 57 | + return this.client.request<AccountDetail>(config, 'AccountDetail', authSettings); |
| 58 | + } |
| 59 | +} |
0 commit comments