diff --git a/README.md b/README.md index 6a6e02e..cfa4767 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,13 @@ Each API call is a Clojure function, with docstrings outlining required and opti ## Usage -Documentation is available on the project wiki or github pages. The API docs are generated on cljdoc. +For getting started/examples, documentation is available on the project wiki and github pages. - [Wiki](https://github.com/wdhowe/telegrambot-lib/wiki) - [Github pages](https://wdhowe.github.io/telegrambot-lib/) + +For details on the library API, docs are generated on cljdoc. + - [API Docs](https://cljdoc.org/d/telegrambot-lib/telegrambot-lib/CURRENT/api/telegrambot-lib.core) ## License @@ -42,6 +45,6 @@ at . [gh-actions]: https://github.com/wdhowe/telegrambot-lib/actions [cljdoc-badge]: https://cljdoc.org/badge/telegrambot-lib/telegrambot-lib [cljdoc-link]: https://cljdoc.org/d/telegrambot-lib/telegrambot-lib/CURRENT -[clojure-v]: https://img.shields.io/badge/clojure-1.11.2-blue.svg +[clojure-v]: https://img.shields.io/badge/clojure-1.11.3-blue.svg [clojars]: https://clojars.org/telegrambot-lib [clojars-badge]: https://img.shields.io/clojars/v/telegrambot-lib.svg diff --git a/pom.xml b/pom.xml index 1b5b894..105de95 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ telegrambot-lib telegrambot-lib jar - 2.13.0 + 2.14.0 telegrambot-lib A library for interacting with the Telegram Bot API. https://github.com/wdhowe/telegrambot-lib @@ -18,7 +18,7 @@ https://github.com/wdhowe/telegrambot-lib scm:git:git://github.com/wdhowe/telegrambot-lib.git scm:git:ssh://git@github.com/wdhowe/telegrambot-lib.git - fc6a4dae6544e6f6d3ad04ab8f80f43ea61c2272 + e47f5e254d0449d65863bb3e21ad00d80728674a src @@ -69,7 +69,7 @@ clj-http clj-http - 3.12.3 + 3.13.0 environ @@ -79,7 +79,7 @@ org.clojure clojure - 1.11.2 + 1.11.3 org.clojure diff --git a/project.clj b/project.clj index 0264f6a..49432aa 100644 --- a/project.clj +++ b/project.clj @@ -1,19 +1,19 @@ -(defproject telegrambot-lib "2.13.0" - +(defproject telegrambot-lib "2.14.0" + ;;; Project Metadata :description "A library for interacting with the Telegram Bot API." :url "https://github.com/wdhowe/telegrambot-lib" :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" :url "https://www.eclipse.org/legal/epl-2.0/"} - + ;;; Dependencies, Plugins - :dependencies [[clj-http "3.12.3"] + :dependencies [[clj-http "3.13.0"] [environ "1.2.0"] - [org.clojure/clojure "1.11.2"] + [org.clojure/clojure "1.11.3"] [org.clojure/core.async "1.6.681"] [org.clojure/tools.logging "1.3.0"] [potemkin "0.4.7"]] - + ;;; Profiles ;; logback-classic must be 1.3.x due to jdk8 support. ;; See: https://github.com/wdhowe/telegrambot-lib/pull/120/commits/015d31621a3fd5a7f69dcf7c230d76d55f7a47c1 @@ -22,25 +22,25 @@ [org.clojure/data.json "2.5.0"]] :plugins [[lein-environ "1.2.0"]] :resource-paths ["env/dev/resources"]} - + ;; Makes the 'local' profile available during REPL jack-in. ;; Loads from profiles.clj (git ignored). :local {} - + ;; A default test dep for json is required in order for cljdoc-analyze to pass. :test {:dependencies [[org.clojure/data.json "2.5.0"] [clj-http-fake/clj-http-fake "1.0.4"]] :plugins [[lein-environ "1.2.0"]] :resource-paths ["env/test/resources"]} - + ;; Profiles for testing json libraries. :data.json {:dependencies [[org.clojure/data.json "2.5.0"]]} - :cheshire {:dependencies [[cheshire "5.13.0"]]} + :cheshire {:dependencies [[cheshire "5.13.0"]]} :jsonista {:dependencies [[metosin/jsonista "0.3.8"]]}} - + ;;; Testing :test-selectors {:default (complement :json) :json :json} - + ;;; Repl :repl-options {:init-ns telegrambot-lib.core}) diff --git a/src/telegrambot_lib/api/methods.clj b/src/telegrambot_lib/api/methods.clj index ca33df2..a18ad37 100644 --- a/src/telegrambot_lib/api/methods.clj +++ b/src/telegrambot_lib/api/methods.clj @@ -599,11 +599,13 @@ - longitude ; long of new location Optional + - live_period ; New period in seconds which the location can be updated, starting from the message send date. + ; If 0x7FFFFFFF is specified, the location can be updated forever. - horizontal_accuracy ; 1-1500 meters radius of uncertainty - heading ; 1-360 degrees direction user is moving - proximity_alert_radius ; 1-100000 meters max distance for proximity alerts - reply_markup ; additional interface options" - {:changed "0.2.0"} + {:changed "2.14.0"} ([this content] (http/request this "editMessageLiveLocation" content)) @@ -811,9 +813,11 @@ - this ; a bot instance - chat_id ; target chat or username (@user) - question ; poll question - - options ; array/list of answer options + - options ; array/list of InputPollOption Optional + - question_parse_mode ; Mode for parsing entities in the question. + - question_entities ; A JSON-serialized list of special entities that appear in the poll question. - business_connection_id ; Unique id of the business connection. - message_thread_id ; id of the target thread of the forum. - is_anonymous ; true if poll is anonymous @@ -830,7 +834,7 @@ - protect_content ; protect content from forwarding/saving - reply_parameters ; Description of the message to reply to - reply_markup ; additional interface options" - {:changed "2.13.0"} + {:changed "2.14.0"} ([this content] (http/request this "sendPoll" content)) @@ -1606,12 +1610,12 @@ "Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). - Returns a Chat object on success. + Returns a ChatFullInfo object on success. Required - this ; a bot instance - chat_id ; target chat or username (@user)" - {:changed "0.2.0"} + {:changed "2.14.0"} content-map?) (defmethod get-chat true @@ -2090,8 +2094,8 @@ (defmethod get-business-connection false [this business_connection_id] - (let [content {:business_connection_id business_connection_id}] - (get-business-connection this content))) + (let [content {:business_connection_id business_connection_id}] + (get-business-connection this content))) (defmulti set-my-commands "Use this method to change the list of the bot's commands. diff --git a/src/telegrambot_lib/core.clj b/src/telegrambot_lib/core.clj index 0dab92e..c6e7a2e 100644 --- a/src/telegrambot_lib/core.clj +++ b/src/telegrambot_lib/core.clj @@ -21,12 +21,12 @@ - Example: `(create \"12345\")` - Alternatively, parameters can be passed as a map instead. - Example: `(create {:bot-token \"12345\"})` - + Optional Parameters - bot-token ; The token id of your bot. (default: load from environment) - async ; Send API requests async or not. (default: false) - bot-api ; The Telegram Bot API URL. (default: official hosted API) - + Returns: A map data structure of a bot config." {:changed "2.10.0"} (fn @@ -35,12 +35,12 @@ (defmethod create true [m] - (merge (conf/cfg) m)) + (merge (conf/cfg) m)) (defmethod create false ([] (create {})) - + ([bot-token] (create {:bot-token bot-token})))