This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-04
Channels
- # aleph (8)
- # aws (14)
- # babashka (37)
- # beginners (30)
- # calva (5)
- # cider (4)
- # clj-kondo (21)
- # cljsrn (4)
- # clojure (234)
- # clojure-denmark (1)
- # clojure-europe (10)
- # clojure-france (10)
- # clojure-italy (4)
- # clojure-nl (17)
- # clojure-sanfrancisco (1)
- # clojure-spec (8)
- # clojure-uk (44)
- # clojurescript (20)
- # cursive (9)
- # datascript (2)
- # datomic (5)
- # emacs (9)
- # fulcro (50)
- # graalvm (32)
- # jackdaw (18)
- # leiningen (1)
- # malli (10)
- # meander (10)
- # nrepl (10)
- # off-topic (15)
- # pathom (20)
- # re-frame (14)
- # reagent (37)
- # reitit (7)
- # ring (1)
- # shadow-cljs (102)
- # test-check (6)
- # tree-sitter (15)
- # vim (4)
- # xtdb (2)
- # yada (1)
In Javascript API they’re in client specific data files, eg. aws-sdk-js/apis/logs-2014-03-28.paginators.json
there is a function being considered for inclusion in clojure 1.11 that helps with pagination @lgouger
(defn filter-log-events
"Issues a CloudWatch Logs query (with the filter syntax {$...}, not the CW Insights syntax.
Collects all pages of results.
`client` is an aws-api client
`request` argument is passed directly as the initial request to the :FilterLogEvents op"
[client request]
(iteration (fn [token]
(aws/invoke client
{:op :FilterLogEvents
:request (if token {:nextToken token} request)}))
:kf :nextToken))
If so, there is this: https://github.com/iann0036/aws-pagination-rules. Not sure how accurate it is.
yeah, different apis use different names for nextToken in the request and response and where the results are. For example S3's listObjectsV2 vs logs DescribeLogGroups
"ListObjectsV2": {
"input_token": "ContinuationToken",
"limit_key": "MaxKeys",
"output_token": "NextContinuationToken",
"result_key": [
"Contents",
"CommonPrefixes"
]
}
and
"DescribeLogGroups": {
"input_token": "nextToken",
"limit_key": "limit",
"output_token": "nextToken",
"result_key": "logGroups"
}