tgbot-cpp
Loading...
Searching...
No Matches
TgBot::Bot Class Reference

This object holds other objects specific for this bot instance. More...

#include <Bot.h>

Public Member Functions

 Bot (std::string token, const HttpClient &httpClient=_getDefaultHttpClient(), std::string url="https://api.telegram.org")
const std::string & getToken () const
const Api & getApi () const
EventBroadcaster & getEvents ()
const EventHandler & getEventHandler () const

Detailed Description

This object holds other objects specific for this bot instance.

Definition at line 20 of file Bot.h.

Constructor & Destructor Documentation

◆ Bot()

TgBot::Bot::Bot ( std::string token,
const HttpClient & httpClient = _getDefaultHttpClient(),
std::string url = "https://api.telegram.org" )
explicit

Member Function Documentation

◆ getApi()

const Api & TgBot::Bot::getApi ( ) const
inline
Returns
Object which can execute Telegram Bot API methods.

Definition at line 35 of file Bot.h.

◆ getEventHandler()

const EventHandler & TgBot::Bot::getEventHandler ( ) const
inline
Returns
Object which handles new update objects. Usually it's only needed for TgLongPoll, TgWebhookLocalServer and TgWebhookTcpServer objects.

Definition at line 49 of file Bot.h.

◆ getEvents()

EventBroadcaster & TgBot::Bot::getEvents ( )
inline
Returns
Object which holds all event listeners.

Definition at line 42 of file Bot.h.

◆ getToken()

const std::string & TgBot::Bot::getToken ( ) const
inline
Returns
Token for accessing api.

Definition at line 28 of file Bot.h.


The documentation for this class was generated from the following file: