Provides functionality for handling paged results. See the OCI docs on pagination for the details on how this works.
Provides functionality for handling paged results. See the OCI [docs on pagination](https://docs.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine#ariaid-title13) for the details on how this works.
(paged-request f & args)
Wraps the given client request in a paged request, suitable to be passed on to
paginate
. The input f
is assumed to be an n-arity function that accepts
request parameters and returns a deref
-able response. Typically this will be
some function that is exposed by the OCI libraries, and that accepts the Martian
context and an extra arguments map. The arity of the function is at least one,
or the size of args
.
If extra arguments are given, they are passed to f
. If a page is passed into
the request fn, it is assoc
-ed into the last argument.
Note that this does not handle error responses, that's up to f
.
Wraps the given client request in a paged request, suitable to be passed on to `paginate`. The input `f` is assumed to be an n-arity function that accepts request parameters and returns a `deref`-able response. Typically this will be some function that is exposed by the OCI libraries, and that accepts the Martian context and an extra arguments map. The arity of the function is at least one, or the size of `args`. If extra arguments are given, they are passed to `f`. If a page is passed into the request fn, it is `assoc`-ed into the last argument. Note that this does not handle error responses, that's up to `f`.
(paged-route r)
Adds pagination query arguments to the route schema
Adds pagination query arguments to the route schema
(paginate req-fn & [item-fn])
Repeatedly invokes req-fn
, assuming it returns a http response that
contains a :body
and optionally headers that indicate whether there
is a next page or not. Returns a lazy seq of the response items.
Repeatedly invokes `req-fn`, assuming it returns a http response that contains a `:body` and optionally headers that indicate whether there is a next page or not. Returns a lazy seq of the response items.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close