Skip to content

Function: fetchOnePage() ​

fetchOnePage<T>(endpointURL, params, userAgent): Effect<PageResult<T>, FetchError | ResponseParseError>

Defined in: packages/fetch-one-api-page/src/index.ts:152

Fetch one page of results from an API endpoint.

Type Parameters ​

T ​

T

Parameters ​

endpointURL ​

URL

The base URL of the API endpoint

params ​

Query

Parameters to add to the URL

userAgent ​

string

The name of the application making the request

Returns ​

Effect<PageResult<T>, FetchError | ResponseParseError>

An Effect that resolves to the JSON response with rate limit info or an error

Throws ​

If the fetch function fails