Formats and sends the HTTP request to the Telegram Bot API.
Formats and sends the HTTP request to the Telegram Bot API.
Send HTTP requests to the URL. Methods supported:
Send HTTP requests to the URL. Methods supported: - POST
(ex->parsed-resp ex)
Uniformly transform an Exception
into a map to return.
Uniformly transform an `Exception` into a map to return.
(gen-url this path)
Generate the url to use for the http call, given the method path
.
Generate the url to use for the http call, given the method `path`.
(parse-resp resp)
Parse the JSON response body into a keywordized map.
Parse the JSON response body into a keywordized map.
Send the request to the Telegram Bot API path
with an optional content
,
either sync- or asynchronously, depending on the value of the :async
key
of this
(the passed bot instance). A sync version returns an "invocation
result", while an async one returns a one-off channel with an "invocation
result" which is then closed.
The "invocation result" is either:
[:error ex]
entry when the
request was unsuccessful (in terms of the Telegram Bot API), or{:error ex}
map in any other exceptional situation when we are
unable to retrieve the response body.Send the request to the Telegram Bot API `path` with an optional `content`, either sync- or asynchronously, depending on the value of the `:async` key of `this` (the passed bot instance). A sync version returns an "invocation result", while an async one returns a one-off channel with an "invocation result" which is then closed. The "invocation result" is either: - the response body in case the Telegram Bot API request was successful, or - a map composed of the response body and the `[:error ex]` entry when the request was unsuccessful (in terms of the Telegram Bot API), or - just an `{:error ex}` map in any other exceptional situation when we are unable to retrieve the response body.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close