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(), const std::string &url="https://api.telegram.org")
 
const std::string & getToken () const
 
const ApigetApi () const
 
EventBroadcastergetEvents ()
 
const EventHandlergetEventHandler () const
 

Detailed Description

This object holds other objects specific for this bot instance.

Definition at line 21 of file Bot.h.

Constructor & Destructor Documentation

◆ Bot()

TgBot::Bot::Bot ( std::string token,
const HttpClient & httpClient = _getDefaultHttpClient(),
const 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 36 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 50 of file Bot.h.

◆ getEvents()

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

Definition at line 43 of file Bot.h.

◆ getToken()

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

Definition at line 29 of file Bot.h.


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