1#ifndef TGBOT_TGLONGPOLL_H
2#define TGBOT_TGLONGPOLL_H
25 TgLongPoll(
const Api* api,
const EventHandler* eventHandler, std::int32_t limit, std::int32_t timeout, std::shared_ptr<std::vector<std::string>> allowUpdates);
26 TgLongPoll(
const Bot& bot, std::int32_t limit = 100, std::int32_t timeout = 10,
const std::shared_ptr<std::vector<std::string>>& allowUpdates =
nullptr);
36 std::int32_t _lastUpdateId = 0;
38 std::int32_t _timeout;
39 std::shared_ptr<std::vector<std::string>> _allowUpdates;
41 std::vector<Update::Ptr> _updates;
This class executes telegram api methods. Telegram docs: https://core.telegram.org/bots/api#available...
This object holds other objects specific for this bot instance.
This class handles long polling and updates parsing.
TgLongPoll(const Bot &bot, std::int32_t limit=100, std::int32_t timeout=10, const std::shared_ptr< std::vector< std::string > > &allowUpdates=nullptr)
void start()
Starts long poll. After new update will come, this method will parse it and send to EventHandler whic...
TgLongPoll(const Api *api, const EventHandler *eventHandler, std::int32_t limit, std::int32_t timeout, std::shared_ptr< std::vector< std::string > > allowUpdates)