AsyncTelegram2
|
#include <AsyncTelegram2.h>
Public Types | |
enum | DocumentType { ZIP , PDF , PHOTO , ANIMATION , AUDIO , VOICE , VIDEO , CSV , JSON } |
enum | FormatStyle { NONE , HTML , MARKDOWN } |
Public Member Functions | |
AsyncTelegram2 (Client &client, uint32_t bufferSize=BUFFER_BIG) | |
~AsyncTelegram2 () | |
bool | begin (void) |
bool | reset (void) |
void | setTelegramToken (const char *token) |
void | setUpdateTime (uint32_t pollingTime) |
bool | getFile (TBDocument &doc) |
MessageType | getNewMessage (TBMessage &message) |
bool | sendMessage (const TBMessage &msg, const char *message, const char *keyboard=nullptr, bool wait=false) |
bool | sendMessage (const TBMessage &msg, const String &message, String keyboard="") |
bool | sendMessage (const TBMessage &msg, const char *message, InlineKeyboard &keyboard) |
bool | sendMessage (const TBMessage &msg, const char *message, ReplyKeyboard &keyboard) |
bool | forwardMessage (const TBMessage &msg, const int64_t to_chatid) |
bool | sendToChannel (const char *channel, const char *message, bool silent=false) |
bool | sendToChannel (const String &channel, const String &message, bool silent) |
bool | sendTo (const int64_t userid, const char *message, const char *keyboard=nullptr) |
bool | sendTo (const int64_t userid, const String &message, String keyboard="") |
bool | sendDocument (int64_t chat_id, Stream &stream, size_t size, DocumentType doc, const char *filename, const char *caption=nullptr) |
bool | sendDocument (const TBMessage &msg, Stream &stream, size_t size, DocumentType doc, const char *filename, const char *caption=nullptr) |
bool | sendPhotoByUrl (const int64_t &chat_id, const char *url, const char *caption) |
bool | sendAnimationByUrl (const int64_t &chat_id, const char *url, const char *caption) |
bool | sendPhoto (const int64_t &chat_id, const char *url, const char *caption) |
bool | sendPhoto (const int64_t &chat_id, const String &url, const String &caption) |
bool | sendPhoto (const TBMessage &msg, const String &url, const String &caption) |
bool | sendPhoto (int64_t chat_id, Stream &stream, size_t size, const char *filename=nullptr, const char *caption=nullptr) |
bool | sendPhoto (const TBMessage &msg, Stream &stream, size_t size, const char *filename, const char *caption=nullptr) |
bool | sendPhoto (int64_t chat_id, uint8_t *data, size_t size, const char *caption=nullptr) |
bool | sendPhoto (const TBMessage &msg, uint8_t *data, size_t size, const char *caption=nullptr) |
bool | sendPhotoByUrl (const int64_t &chat_id, const String &url, const String &caption) |
bool | sendPhotoByUrl (const TBMessage &msg, const String &url, const String &caption) |
bool | sendPhotoByFile (int64_t chat_id, Stream *stream, size_t size) |
bool | endQuery (const TBMessage &msg, const char *message, bool alertMode=false) |
bool | removeReplyKeyboard (const TBMessage &msg, const char *message, bool selective=false) |
const char * | getBotName () |
bool | noNewMessage () |
int64_t | getGroupId (const TBMessage &msg) |
void | addInlineKeyboard (InlineKeyboard *keyb) |
bool | setMyCommands (const String &cmd, const String &desc) |
void | getMyCommands (String &cmdList) |
bool | deleteMyCommands () |
bool | editMessage (int32_t chat_id, int32_t message_id, const String &txt, const String &keyboard) |
bool | editMessage (const TBMessage &msg, const String &txt, const String &keyboard) |
bool | editMessage (int32_t chat_id, int32_t message_id, const String &txt, InlineKeyboard &keyboard) |
bool | editMessage (const TBMessage &msg, const String &txt, InlineKeyboard &keyboard) |
bool | checkConnection () |
void | addSentCallback (SentCallback sentcb, uint32_t timeout=1000) |
void | setFormattingStyle (uint8_t format) |
void | setJsonBufferSize (uint32_t jsonBufferSize) |
Protected Member Functions | |
bool | sendCommand (const char *command, const char *payload, bool blocking=false) |
bool | getUpdates () |
bool | getMe () |
Definition at line 93 of file AsyncTelegram2.h.
Enumerator | |
---|---|
ZIP | |
PHOTO | |
ANIMATION | |
AUDIO | |
VOICE | |
VIDEO | |
CSV | |
JSON |
Definition at line 196 of file AsyncTelegram2.h.
Enumerator | |
---|---|
NONE | |
HTML | |
MARKDOWN |
Definition at line 424 of file AsyncTelegram2.h.
AsyncTelegram2::AsyncTelegram2 | ( | Client & | client, |
uint32_t | bufferSize = BUFFER_BIG |
||
) |
Definition at line 5 of file AsyncTelegram2.cpp.
AsyncTelegram2::~AsyncTelegram2 | ( | ) |
Definition at line 13 of file AsyncTelegram2.cpp.
|
inline |
Definition at line 356 of file AsyncTelegram2.h.
|
inline |
Definition at line 410 of file AsyncTelegram2.h.
bool AsyncTelegram2::begin | ( | void | ) |
Definition at line 52 of file AsyncTelegram2.cpp.
bool AsyncTelegram2::checkConnection | ( | ) |
Definition at line 15 of file AsyncTelegram2.cpp.
bool AsyncTelegram2::deleteMyCommands | ( | ) |
Definition at line 786 of file AsyncTelegram2.cpp.
|
inline |
Definition at line 389 of file AsyncTelegram2.h.
|
inline |
Definition at line 399 of file AsyncTelegram2.h.
bool AsyncTelegram2::editMessage | ( | int32_t | chat_id, |
int32_t | message_id, | ||
const String & | txt, | ||
const String & | keyboard | ||
) |
Definition at line 838 of file AsyncTelegram2.cpp.
|
inline |
Definition at line 394 of file AsyncTelegram2.h.
bool AsyncTelegram2::endQuery | ( | const TBMessage & | msg, |
const char * | message, | ||
bool | alertMode = false |
||
) |
Definition at line 585 of file AsyncTelegram2.cpp.
bool AsyncTelegram2::forwardMessage | ( | const TBMessage & | msg, |
const int64_t | to_chatid | ||
) |
Definition at line 509 of file AsyncTelegram2.cpp.
|
inline |
Definition at line 332 of file AsyncTelegram2.h.
bool AsyncTelegram2::getFile | ( | TBDocument & | doc | ) |
Definition at line 406 of file AsyncTelegram2.cpp.
|
inline |
Definition at line 347 of file AsyncTelegram2.h.
|
protected |
Definition at line 391 of file AsyncTelegram2.cpp.
void AsyncTelegram2::getMyCommands | ( | String & | cmdList | ) |
Definition at line 768 of file AsyncTelegram2.cpp.
MessageType AsyncTelegram2::getNewMessage | ( | TBMessage & | message | ) |
Definition at line 209 of file AsyncTelegram2.cpp.
|
protected |
Definition at line 119 of file AsyncTelegram2.cpp.
bool AsyncTelegram2::noNewMessage | ( | ) |
Definition at line 428 of file AsyncTelegram2.cpp.
bool AsyncTelegram2::removeReplyKeyboard | ( | const TBMessage & | msg, |
const char * | message, | ||
bool | selective = false |
||
) |
Definition at line 597 of file AsyncTelegram2.cpp.
bool AsyncTelegram2::reset | ( | void | ) |
Definition at line 58 of file AsyncTelegram2.cpp.
bool AsyncTelegram2::sendAnimationByUrl | ( | const int64_t & | chat_id, |
const char * | url, | ||
const char * | caption | ||
) |
Definition at line 537 of file AsyncTelegram2.cpp.
|
protected |
Definition at line 71 of file AsyncTelegram2.cpp.
|
inline |
Definition at line 211 of file AsyncTelegram2.h.
bool AsyncTelegram2::sendDocument | ( | int64_t | chat_id, |
Stream & | stream, | ||
size_t | size, | ||
DocumentType | doc, | ||
const char * | filename, | ||
const char * | caption = nullptr |
||
) |
Definition at line 607 of file AsyncTelegram2.cpp.
bool AsyncTelegram2::sendMessage | ( | const TBMessage & | msg, |
const char * | message, | ||
const char * | keyboard = nullptr , |
||
bool | wait = false |
||
) |
Definition at line 444 of file AsyncTelegram2.cpp.
|
inline |
Definition at line 159 of file AsyncTelegram2.h.
|
inline |
Definition at line 164 of file AsyncTelegram2.h.
|
inline |
Definition at line 154 of file AsyncTelegram2.h.
|
inline |
Definition at line 223 of file AsyncTelegram2.h.
|
inline |
Definition at line 228 of file AsyncTelegram2.h.
|
inline |
Definition at line 233 of file AsyncTelegram2.h.
|
inline |
Definition at line 244 of file AsyncTelegram2.h.
|
inline |
Definition at line 273 of file AsyncTelegram2.h.
|
inline |
Definition at line 239 of file AsyncTelegram2.h.
|
inline |
Definition at line 268 of file AsyncTelegram2.h.
|
inline |
Definition at line 290 of file AsyncTelegram2.h.
bool AsyncTelegram2::sendPhotoByUrl | ( | const int64_t & | chat_id, |
const char * | url, | ||
const char * | caption | ||
) |
Definition at line 522 of file AsyncTelegram2.cpp.
|
inline |
Definition at line 280 of file AsyncTelegram2.h.
|
inline |
Definition at line 285 of file AsyncTelegram2.h.
|
inline |
Definition at line 183 of file AsyncTelegram2.h.
|
inline |
Definition at line 190 of file AsyncTelegram2.h.
bool AsyncTelegram2::sendToChannel | ( | const char * | channel, |
const char * | message, | ||
bool | silent = false |
||
) |
Definition at line 552 of file AsyncTelegram2.cpp.
|
inline |
Definition at line 175 of file AsyncTelegram2.h.
|
inline |
Definition at line 429 of file AsyncTelegram2.h.
|
inline |
Definition at line 433 of file AsyncTelegram2.h.
bool AsyncTelegram2::setMyCommands | ( | const String & | cmd, |
const String & | desc | ||
) |
Definition at line 796 of file AsyncTelegram2.cpp.
|
inline |
Definition at line 118 of file AsyncTelegram2.h.
|
inline |
Definition at line 124 of file AsyncTelegram2.h.