Telecraft is a powerful and flexible C++ library designed to simplify interactions with the Telegram API. It provides a robust framework for creating, managing, and sending HTTP requests, tailored specifically for Telegram's needs.
- Modular Design: Easily extendable components allow for customized request generation and management.
- Type Safety: Strong typing ensures safer code and fewer runtime errors.
- Easy Integration: Simple to integrate with existing projects.
- Customizable Builders: Define and use various builders for different request parameters and bodies.
- Error Handling: Comprehensive error checking and handling mechanisms. (in future)
- C++20 or later: Telecraft utilizes modern C++ features.
- CMake: To build the project.
-
Clone the Repository:
git clone https://github.com/yourusername/telecraft.git cd telecraft
-
Build the Project:
mkdir build cd build cmake .. make
Telecraft is designed to simplify the process of interacting with the Telegram API by providing flexible and customizable components. Here’s a brief overview of how you can use Telecraft:
- Setup HTTP Management: Manage HTTP headers and other related fields.
- Define Method Builders: Create method builders for different Telegram API methods. These builders help in constructing the request body and managing its content.
- Generate and Send Requests: Use the
RequestGenerator
andRequestComponentManager
to build and send HTTP requests to the Telegram API.
To extend Telecraft for your own use case, you can create custom method builders for various Telegram API methods. The modular design of Telecraft allows you to add new features and functionalities with ease.