๐ banana - thin wrapper over Telegram Bot API written in C++17.
Key Features
- Simple API
- Single interface for both blocking, non-blocking and even coroutine-based operations
- Generic in terms of networking backend (bundled support for
WinAPI
,cpr
andboost::beast
) - Extendable (see custom-connector example)
- Automatically generated from Telegram Bot API 5.0
- Cross-platform (tested on Windows, Linux, macOS)
Example
#include <banana/api.hpp>
#include <banana/connector/default.hpp>
int main(int argc, char** argv) {
banana::connector::default_blocking connector("<TG_BOT_TOKEN>")
banana::api::send_message(connector, { "@smertig", "Hello, world!" });
}