Class: BaseAPI
Types.BaseAPI
This is the base class for all generated API classes.
Hierarchy
BaseAPI
Constructors
constructor
• new BaseAPI(configuration?
)
Parameters
Name | Type | Default value |
---|---|---|
configuration | Configuration | DefaultConfig |
Methods
withMiddleware
▸ withMiddleware<T
>(this
, ...middlewares
): T
Type parameters
Name | Type |
---|---|
T | extends BaseAPI <T > |
Parameters
Name | Type |
---|---|
this | T |
...middlewares | Middleware [] |
Returns
T
withPostMiddleware
▸ withPostMiddleware<T
>(this
, ...postMiddlewares
): T
Type parameters
Name | Type |
---|---|
T | extends BaseAPI <T > |
Parameters
Name | Type |
---|---|
this | T |
...postMiddlewares | (undefined | (context : ResponseContext ) => Promise <void | Response >)[] |
Returns
T
withPreMiddleware
▸ withPreMiddleware<T
>(this
, ...preMiddlewares
): T
Type parameters
Name | Type |
---|---|
T | extends BaseAPI <T > |
Parameters
Name | Type |
---|---|
this | T |
...preMiddlewares | (undefined | (context : RequestContext ) => Promise <void | FetchParams >)[] |
Returns
T