Liking cljdoc? Tell your friends :D

telegrambot-lib.http

Formats and sends the HTTP request to the Telegram Bot API.

Formats and sends the HTTP request to the Telegram Bot API.
raw docstring

bot-apiclj

Telegram Bot API URL.

Telegram Bot API URL.
sourceraw docstring

clientcljmultimethod

Send HTTP requests to the URL. Methods supported:

  • POST
Send HTTP requests to the URL. Methods supported:
- POST
sourceraw docstring

ex->parsed-respclj

(ex->parsed-resp ex)

Uniformly transform an Exception into a map to return.

Uniformly transform an `Exception` into a map to return.
sourceraw docstring

gen-urlclj

(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`.
sourceraw docstring

parse-respclj

(parse-resp resp)

Parse the JSON response body into a keywordized map.

Parse the JSON response body into a keywordized map.
sourceraw docstring

requestcljmultimethod

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.
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.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close