api/api.service.ts
Properties |
Methods |
constructor(client: FetchClient)
|
||||||
Parameters :
|
addInterceptor | ||||||||||||
addInterceptor(interceptor: HttpInterceptor, id?: string)
|
||||||||||||
Allows to intercept requests performed via the FetchClient requests.
Parameters :
Returns :
string
The id of the interceptor (same as provided id if one was provided, otherwise an id will be generated). |
excludePermissionCall |
excludePermissionCall()
|
Can be added to a pipe to exclude any permission call. Permission calls are PUT request with only an id in it, to verify if the user has access to this managed object.
Returns :
MonoTypeOperatorFunction<ApiCall>
The operator to be added to a pipe. |
hasInterceptor | ||||||||
hasInterceptor(id: string)
|
||||||||
Checks if an interceptor with a given id exists.
Parameters :
Returns :
boolean
|
hookRequest | ||||||||
hookRequest(hookFilter: (call: ApiCall) => void)
|
||||||||
Allows to hook into the requests performed by the FetchClient. This is meant to be used to react on the requests, not for manipulation of the requests.
Parameters :
Returns :
Observable<ApiCall>
An Observable of the filtered requests. |
hookResponse | ||||||||
hookResponse(hookFilter: (call: ApiCall) => void)
|
||||||||
Allows to hook into the responses received by the FetchClient. This is meant to be used to react on the responses, not for manipulation of the responses.
Parameters :
Returns :
Observable<ApiCall>
An Observable of the filtered responses. |
onFinish | ||||||
onFinish(call: ApiCall)
|
||||||
Parameters :
Returns :
void
|
onStart | ||||||
onStart(call: ApiCall)
|
||||||
Parameters :
Returns :
void
|
removeInterceptor | ||||||||
removeInterceptor(id: string)
|
||||||||
Allows to remove a previously added interceptor by it's id.
Parameters :
Returns :
boolean
true if an interceptor existed and has been removed, or false if id does not exist. |
resolveData | ||||||
resolveData(call: ApiCall)
|
||||||
Type parameters :
|
||||||
Resolves data from an API call response.
Parameters :
Returns :
Promise<literal type>
A Promise containing an object with resolved data, method, and URL. |
calls |
Type : Observable<ApiCall>
|