Properties
Protected client
client: AxiosInstance
Methods
get
get<T>( url: string , config?: AxiosRequestConfig ) : Promise < T >
Type parameters
Parameters
url: string
config: AxiosRequestConfig = ...
Returns Promise < T >
getBearerToken
getBearerToken( ) : Promise < unknown >
getStream
getStream( url: string , config?: AxiosRequestConfig ) : Promise < StreamEventEmitter >
Parameters
url: string
config: AxiosRequestConfig = ...
Returns Promise < StreamEventEmitter >
post
post<T>( url: string , body: any , config?: AxiosRequestConfig ) : Promise < T >
Type parameters
Parameters
url: string
body: any
config: AxiosRequestConfig = ...
Returns Promise < T >
postForm
postForm<T>( url: string , body: any , config?: AxiosRequestConfig ) : Promise < T >
Type parameters
Parameters
url: string
body: any
config: AxiosRequestConfig = ...
Returns Promise < T >
postStream
postStream( url: string , body: any , config?: AxiosRequestConfig ) : Promise < StreamEventEmitter >
Parameters
url: string
body: any
config: AxiosRequestConfig = ...
Returns Promise < StreamEventEmitter >
put
put<T>( url: string , body: any , config?: AxiosRequestConfig ) : Promise < T >
Type parameters
Parameters
url: string
body: any
config: AxiosRequestConfig = ...
Returns Promise < T >
putForm
putForm<T>( url: string , body: any , config?: AxiosRequestConfig ) : Promise < T >
Type parameters
Parameters
url: string
body: any
config: AxiosRequestConfig = ...
Returns Promise < T >
setBearerToken
setBearerToken( bearerToken: string ) : void
Legend
Constructor
Property
Method
Private property
Private method
The ApiClient used for making API requests to Twitter on behalf of an application. If a bearer token exists in the config, it is automatically added as an authorization header.