This is a generated PagerDuty API client. It uses PagerDuty's OpenAPI specification and the openapi-generator tool.
[pager-duty-api "2.0"](require '[pager-duty-api.core :refer [with-api-context set-api-context]])
;; set a token. Note the required "Token token=" prefix.
(def my-pagerduty-token "xxxyyyzzz")
(set-api-context
{:auths {"api_key" (str "Token token=" my-pagerduty-token)}})
;; try calling an API
(require '[pager-duty-api.api.teams :as teams])
;; get all teams
(teams/teams-get)
;; get teams matching a query
(teams/teams-get {:query "frontend"})brew install openapi-generatoropenapi-generator help
openapi-generator help generate
openapi-generator config-help -g clojureObtain a fresh copy of the spec and commit this to the repo to keep it in sync with generated source:
curl -o openapi.json https://api-reference.pagerduty.com/output.jsonopenapi-generator generate -i openapi.json -c gen-config.json -l clojure -o clientcd client && lein install; cd ..cd client && lein deploy; cd ..