Chuvi-w / banana

🍌 Modern C++ Telegram Bot API library

Home Page:https://smertig.github.io/banana/master

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

License: MIT GitHub Actions GitHub Actions

🍌 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 and boost::beast)
  • Extendable (see custom-agent example)
  • Automatically generated from Telegram Bot API 5.3 (thanks ark0f/tg-bot-api)
  • Cross-platform (tested on Windows, Linux, macOS)

Example

#include <banana/api.hpp>
#include <banana/agent/default.hpp>

int main(int argc, char** argv) {
    banana::agent::default_blocking agent("<TG_BOT_TOKEN>");
    banana::api::send_message(agent, { /* .chat_id = */ "@smertig", /* .text = */ "Hello, world!" });
}

Documentation

Latest Release

Master

About

🍌 Modern C++ Telegram Bot API library

https://smertig.github.io/banana/master

License:MIT License


Languages

Language:C++ 90.5%Language:CMake 6.9%Language:Python 2.6%