xxtelebot
1.4.1.0
A simple Telegram Bot implementation in C++
|
Contains Telegram bot API methods. More...
#include <api.h>
Public Member Functions | |
api_types::Message | sendMessage (const std::string &chatId, const std::string &text, const types::ParseMode &=types::ParseMode::DEFAULT, const bool &disableWebPagePreview=false, const bool &disableNotification=false, const types::ReplyMarkup &replyMarkup="") const |
api_types::Message | sendMessage (const std::string &chatId, const std::string &text, const int &replyToMessageId, const types::ParseMode &=types::ParseMode::DEFAULT, const bool &disableWebPagePreview=false, const bool &disableNotification=false, const types::ReplyMarkup &replyMarkup="") const |
api_types::Message | forwardMessage (const std::string &chatId, const std::string &fromChatId, const int &messageId, const bool &disableNotification=false) const |
api_types::Message | sendPhoto (const std::string &chatId, const std::string &photo, const types::FileSource &source=types::FileSource::EXTERNAL, const std::string &mimeType="", const std::string &caption="", const bool &disableNotification=false, const int &replyToMessageId=-1, const types::ReplyMarkup &replyMarkup="") const |
api_types::Message | sendAudio (const std::string &chatId, const std::string &audio, const types::FileSource &source=types::FileSource::EXTERNAL, const std::string &mimeType="", const std::string &caption="", const int &duration=-1, const std::string &performer="", const std::string &title="", const bool &disableNotification=false, const int &replyToMessageId=-1, const types::ReplyMarkup &replyMarkup="") const |
api_types::Message | sendDocument (const std::string &chatId, const std::string &document, const types::FileSource &source=types::FileSource::EXTERNAL, const std::string &mimeType="", const std::string &caption="", const bool &disableNotification=false, const int &replyToMessageId=-1, const types::ReplyMarkup &replyMarkup="") const |
api_types::Message | sendVideo (const std::string &chatId, const std::string &video, const types::FileSource &source=types::FileSource::EXTERNAL, const std::string &mimeType="", const int &duration=-1, const int &width=-1, const int &height=-1, const std::string &caption="", const bool &supportsStreaming=false, const bool &disableNotification=false, const int &replyToMessageId=-1, const types::ReplyMarkup &replyMarkup="") const |
api_types::Message | sendVoice (const std::string &chatId, const std::string &voice, const types::FileSource &source=types::FileSource::EXTERNAL, const std::string &caption="", const int &duration=-1, const bool &disableNotification=false, const int &replyToMessageId=-1, const types::ReplyMarkup &replyMarkup="") const |
api_types::Message | sendVideoNote (const std::string &chatId, const std::string &videoNote, const types::FileSource &source=types::FileSource::EXTERNAL, const std::string &caption="", const int &duration=-1, const bool &disableNotification=false, const int &replyToMessageId=-1, const types::ReplyMarkup &replyMarkup="") const |
api_types::Message | sendLocation (const std::string &chatId, const double &latitude, const double &longitude, const int &liveLocation=-1, const bool &disableNotification=false, const int &replyToMessageId=-1, const types::ReplyMarkup &replyMarkup="") const |
api_types::Message | sendVenue (const std::string &chatId, const double &latitude, const double &longitude, const std::string &title, const std::string &address, const std::string &foursquareType="", const std::string &foursquareId="", const bool &disableNotification=false, const int &replyToMessageId=-1, const types::ReplyMarkup &replyMarkup="") const |
api_types::Message | sendContact (const std::string &chatId, const std::string &phoneNumber, const std::string &firstName, const std::string &vCard="", const std::string &lastName="", const bool &disableNotification=false, const int &replyToMessageId=-1, const types::ReplyMarkup &replyMarkup="") const |
api_types::Message | sendSticker (const std::string &chatId, const std::string &sticker, const types::FileSource &source=types::FileSource::EXTERNAL, const bool &disableNotification=false, const int &replyToMessageId=-1, const types::ReplyMarkup &replyMarkup="") const |
api_types::Message | sendInvoice (const int &chatId, const types::Invoice &invoice, const bool &disableNotification=false, const int &replyToMessageId=-1) const |
Please refer to tgbot::methods::types::Invoice struct. | |
api_types::Message | sendInvoice (const int &chatId, const types::Invoice &invoice, const types::InlineKeyboardMarkup &replyMarkup, const bool &disableNotification=false, const int &replyToMessageId=-1) const |
Please refer to tgbot::methods::types::Invoice struct. | |
std::vector< api_types::Message > | sendMediaGroup (const std::string &chatId, const std::vector< tgbot::types::Ptr< types::InputMedia >> &media, const bool &disableNotification=false, const int &replyToMessageId=-1) const |
api_types::Message | sendGame (const int &chatId, const std::string &gameShortName, const bool &disableNotification=false, const int &replyToMessageId=-1, const types::ReplyMarkup &replyMarkup="") const |
api_types::Message | sendPoll (const std::string &chatId, const std::string &question, const std::vector< std::string > &options, const bool &disableNotification=false, const int &replyToMessageId=-1, const types::ReplyMarkup &replyMarkup="") const |
tgbot::types::Poll | stopPoll (const std::string &chatId, const int &messageId, const types::ReplyMarkup &replyMarkup="") const |
api_types::Message | setGameScore (const std::string &userId, const int &score, const std::string &inlineMessageId, const bool &force=false, const bool &disableEditMessage=false) const |
api_types::Message | setGameScore (const std::string &userId, const int &score, const int &chatId, const int &messageId, const bool &force=false, const bool &disableEditMessage=false) const |
std::vector< api_types::GameHighScore > | getGameHighScores (const int &userId, const std::string &inlineMessageId) const |
std::vector< api_types::GameHighScore > | getGameHighScores (const int &userId, const int &chatId, const int &messageId) const |
bool | answerShippingQuery (const std::string &shippingQueryId, const std::string &errorMessage) const |
Use this overload if the shipping query cannot proceed. | |
bool | answerShippingQuery (const std::string &shippingQueryId, const std::vector< types::ShippingOption > &shippingOptions) const |
Use this overload if the shipping query CAN proceed. | |
bool | answerPreCheckoutQuery (const std::string &preCheckoutQueryId, const std::string &errorMessage) const |
Use this overload if the checkout phase can take place. | |
bool | answerPreCheckoutQuery (const std::string &preCheckoutQueryId) const |
Use this overload if the checkout phase CANNOT take place. | |
api_types::StickerSet | getStickerSet (const std::string &name) const |
api_types::File | uploadStickerFile (const int &userId, const std::string &pngSticker, const types::FileSource &source=types::FileSource::EXTERNAL) const |
bool | createNewStickerSet (const int &userId, const std::string &name, const std::string &title, const std::string &emoji, const std::string &pngSticker, const types::FileSource &source=types::FileSource::EXTERNAL) const |
bool | createNewStickerSet (const int &userId, const std::string &name, const std::string &title, const std::string &emoji, const std::string &pngSticker, const api_types::MaskPosition &maskPosition, const types::FileSource &source=types::FileSource::EXTERNAL) const |
bool | addStickerToSet (const int &userId, const std::string &name, const std::string &emoji, const std::string &pngSticker, const types::FileSource &source=types::FileSource::EXTERNAL) const |
bool | addStickerToSet (const int &userId, const std::string &name, const std::string &emoji, const std::string &pngSticker, const api_types::MaskPosition &maskPosition, const types::FileSource &source=types::FileSource::EXTERNAL) const |
bool | setStickerPositionInSet (const std::string &sticker, const int &position) const |
bool | deleteStickerFromSet (const std::string &sticker) const |
bool | sendChatAction (const std::string &chatId, const types::ChatAction &action) const |
bool | kickChatMember (const std::string &chatId, const int &userId, const int &untilDate=-1) const |
bool | unbanChatMember (const std::string &chatId, const int &userId) const |
bool | restrictChatMember (const std::string &chatId, const int &userId, const types::ChatMemberRestrict &permissions, const int &untilDate=-1) const |
bool | promoteChatMember (const std::string &chatId, const int &userId, const types::ChatMemberPromote &permissions) const |
std::string | exportChatInviteLink (const std::string &chatId) const |
bool | setChatPhoto (const std::string &chatId, const std::string &filename, const std::string &mimeType) const |
bool | deleteChatPhoto (const std::string &chatId) const |
bool | setChatTitle (const std::string &chatId, const std::string &title) const |
bool | setChatDescription (const std::string &chatId, const std::string &description) const |
bool | pinChatMessage (const std::string &chatId, const std::string &messageId, const bool &disableNotification=false) const |
bool | unpinChatMessage (const std::string &chatId) const |
bool | leaveChat (const std::string &chatId) const |
bool | answerCallbackQuery (const std::string &callbackQueryId, const std::string &text="", const bool &showAlert=false, const std::string &url="", const int &cacheTime=0) const |
bool | answerInlineQuery (const std::string &inlineQueryId, const std::vector<::tgbot::types::Ptr< types::InlineQueryResult >> &results, const int &cacheTime=0, const bool &isPersonal=true, const std::string &nextOffset="", const std::string &switchPmText="", const std::string &switchPmParameter="") const |
api_types::Message | editMessageText (const std::string &inlineMessageId, const std::string &text, const types::ParseMode &parseMode=types::ParseMode::DEFAULT, const bool &disableWebPagePreview=false) const |
api_types::Message | editMessageText (const std::string &inlineMessageId, const types::InlineKeyboardMarkup &replyMarkup, const std::string &text, const types::ParseMode &parseMode=types::ParseMode::DEFAULT, const bool &disableWebPagePreview=false) const |
api_types::Message | editMessageText (const std::string &chatId, const std::string &messageId, const std::string &text, const types::ParseMode &parseMode=types::ParseMode::DEFAULT, const bool &disableWebPagePreview=false) const |
api_types::Message | editMessageText (const std::string &chatId, const std::string &messageId, const types::InlineKeyboardMarkup &replyMarkup, const std::string &text, const types::ParseMode &parseMode=types::ParseMode::DEFAULT, const bool &disableWebPagePreview=false) const |
api_types::Message | editMessageReplyMarkup (const std::string &inlineMessageId, const types::InlineKeyboardMarkup &replyMarkup) const |
api_types::Message | editMessageReplyMarkup (const std::string &chatId, const std::string &messageId, const types::InlineKeyboardMarkup &replyMarkup) const |
api_types::Message | editMessageCaption (const std::string &chatId, const std::string &messageId, const std::string &caption) const |
api_types::Message | editMessageCaption (const std::string &inlineMessageId, const std::string &caption) const |
api_types::Message | editMessageCaption (const std::string &chatId, const std::string &messageId, const types::InlineKeyboardMarkup &replyMarkup, const std::string &caption) const |
api_types::Message | editMessageCaption (const std::string &inlineMessageId, const types::InlineKeyboardMarkup &replyMarkup, const std::string &caption) const |
api_types::Message | editMessageLiveLocation (const double &longitude, const double &latitude, const int &chatId, const int &messageId, const types::ReplyMarkup &replyMarkup="") const |
api_types::Message | editMessageLiveLocation (const double &longitude, const double &latitude, const std::string &inlineMessageId, const types::ReplyMarkup &replyMarkup="") const |
api_types::Message | editMessageMedia (const std::string &inlineMessageId, const types::InputMedia &media, const types::ReplyMarkup &replyMarkup="") const |
api_types::Message | editMessageMedia (const std::string &chatId, const int &messageId, const types::InputMedia &media, const types::ReplyMarkup &replyMarkup="") const |
api_types::Message | stopMessageLiveLocation (const int &chatId, const int &messageId, const types::ReplyMarkup &replyMarkup="") const |
api_types::Message | stopMessageLiveLocation (const std::string &inlineMessageId, const types::ReplyMarkup &replyMarkup="") const |
bool | setChatStickerSet (const int &chatId, const std::string &stickerSetName) const |
bool | setChatStickerSet (const std::string &chatId, const std::string &stickerSetName) const |
bool | deleteChatStickerSet (const int &chatId) const |
bool | deleteChatStickerSet (const std::string &chatId) const |
bool | deleteMessage (const std::string &chatId, const std::string &messageId) const |
api_types::User | getMe () const |
api_types::File | getFile (const std::string &fileId) const |
api_types::Chat | getChat (const std::string &chatId) const |
std::vector< api_types::ChatMember > | getChatAdministrators (const std::string &chatId) const |
unsigned | getChatMembersCount (const std::string &chatId) const |
api_types::ChatMember | getChatMember (const std::string &chatId, const int &userId) const |
api_types::UserProfilePhotos | getUserProfilePhotos (const int &userId, const unsigned &offset=0, const unsigned &limit=100) const |
bool | deleteWebhook () const |
api_types::WebhookInfo | getWebhookInfo () const |
bool | setWebhook (const std::string &url, const int &maxConnections=40, const std::vector< api_types::UpdateType > &allowedUpdates={}) |
bool | setWebhook (const std::string &url, const std::string &certificate, const int &maxConnections=40, const std::vector< api_types::UpdateType > &allowedUpdates={}) |
Logger const & | getLogger () const |
Logger & | getLogger () |
Protected Member Functions | |
Api (const std::string &token) | |
Api (const std::string &token, const std::vector< api_types::UpdateType > &allowedUpdates, const int &timeout, const int &limit) | |
Api (const std::string &token, const std::string &url, const int &maxConnections, const std::vector< api_types::UpdateType > &allowedUpdates) | |
Api (const std::string &token, const std::string &url, const std::string &certificate, const int &maxConnections, const std::vector< api_types::UpdateType > &allowedUpdates) | |
int | getUpdates (void *c, std::vector< api_types::Update > &updates) |
Protected Attributes | |
std::string | urlWebhook {""} |
Contains Telegram bot API methods.