aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Kummerlaender2016-03-15 12:45:29 +0100
committerAdrian Kummerlaender2016-03-15 12:45:29 +0100
commit3f78384a7e6b15b865e6ea90a7a78aca9af0cdd2 (patch)
treed61adeaab8183e58e489fd87be372e05d9fa528c
parentd6b841990783e6b563a3c07df8a5d711c56ef438 (diff)
downloadblog.kummerlaender.eu-3f78384a7e6b15b865e6ea90a7a78aca9af0cdd2.tar
blog.kummerlaender.eu-3f78384a7e6b15b865e6ea90a7a78aca9af0cdd2.tar.gz
blog.kummerlaender.eu-3f78384a7e6b15b865e6ea90a7a78aca9af0cdd2.tar.bz2
blog.kummerlaender.eu-3f78384a7e6b15b865e6ea90a7a78aca9af0cdd2.tar.lz
blog.kummerlaender.eu-3f78384a7e6b15b865e6ea90a7a78aca9af0cdd2.tar.xz
blog.kummerlaender.eu-3f78384a7e6b15b865e6ea90a7a78aca9af0cdd2.tar.zst
blog.kummerlaender.eu-3f78384a7e6b15b865e6ea90a7a78aca9af0cdd2.zip
Add _Telebot_ project page
-rw-r--r--source/00_content/pages/projects/telebot.md36
1 files changed, 36 insertions, 0 deletions
diff --git a/source/00_content/pages/projects/telebot.md b/source/00_content/pages/projects/telebot.md
new file mode 100644
index 0000000..a29e27e
--- /dev/null
+++ b/source/00_content/pages/projects/telebot.md
@@ -0,0 +1,36 @@
+# Telebot
+
+…is a basic Chicken Scheme module to ease the development of Bots interfacing with the Telegram Bot API.
+
+In this context _basic_ means that the module currently consists of barely more than raw HTTP API calls hidden behind analogously named functions and JSON deserialization provided by the _http-client_ respectively _medea_ eggs.
+
+The maintanance of these API wrappers is simplified by an appropriate _Scheme_ macro that reduces the implementation of new API methods to basically slightly rewriting the [documentation].
+
+_Telebot_ is available under the terms of the MIT license on [Github] and [cgit].
+
+## Documentation
+
+All _basic_ API wrappers are named the same as their method name and require the bot's token as their first argument. Further parameters are expected as named key value pairs. Note that the library currently only verifies that all required parameters are supplied at all while type verification is left to _Telegram's_ server side logic.
+
+~~~
+(sendMessage token
+ chat_id: chat_id
+ text: text)
+~~~
+{:.language-lisp}
+
+All API wrappers return the raw deserialized JSON results as to not limit the options for further parsing unnecessarily.
+
+The only non-API wrapper provided by this library is `pollUpdates` which enables passing updates acquired via long polling of `getUpdates` to an arbitrary function as follows:
+
+~~~
+(pollUpdates token
+ (lambda (u)
+ (begin (print-message u)
+ (echo-message u))))
+~~~
+{:.language-lisp}
+
+[documentation]: https://core.telegram.org/bots/api
+[Github]: https://github.com/KnairdA/telebot/
+[cgit]: https://code.kummerlaender.eu/Telebot/