EndpointStoreclass

new EndpointStore<P, R>(endpoint: Endpoint<P, R>, payload: P, provider: APIProvider<P, R>)
ParamType
endpointEndpoint<P, R>
The endpoint to call. required
payloadP
The payload to call the endpoint with. required
providerAPIProvider<P, R>
The API provider to call the endpoint through. required
Return
EndpointStore<P, R>
Store that loads and tracks the result of calling a single API endpoint with a fixed payload, through an APIProvider.
PropertyType
.providerAPIProvider<P, R>
The API provider this store calls the endpoint through. required readonly
.endpointEndpoint<P, R>
The endpoint this store calls to fetch its result. required readonly

Store that loads and tracks the result of calling a single API endpoint with a fixed payload, through an APIProvider.

Examples

const store = new EndpointStore(endpoint, payload, provider);
 const result = await store; // R