(is-paginated-endpoint? url)
Determines if the given URL represents a paginated endpoint.
For auto-pagination we want to include:
/v1/<resource>
or with a trailing slash)/search
.This function assumes that full-url
includes the base URL (e.g. 'https://api.stripe.com').
Adjust the regex as needed if your API domain is different.
Determines if the given URL represents a paginated endpoint. For auto-pagination we want to include: - All GET calls to a base resource listing endpoint (which typically have a form like `/v1/<resource>` or with a trailing slash) - All endpoints ending with `/search`. This function assumes that `full-url` includes the base URL (e.g. 'https://api.stripe.com'). Adjust the regex as needed if your API domain is different.
(paginate method url params options make-request-fn)
Handles pagination for Stripe API requests.
Parameters:
Returns: If :auto-paginate? is true, returns a lazy sequence of all items across all pages. Otherwise, returns the result of a single API call.
Handles pagination for Stripe API requests. Parameters: - method: The HTTP method (:get, :post, etc.) - url: The API endpoint URL - params: The request parameters - options: Additional options, including :auto-paginate? - make-request-fn: A function that makes a single API request Returns: If :auto-paginate? is true, returns a lazy sequence of all items across all pages. Otherwise, returns the result of a single API call.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close