|
qTbot 0.2.123.6f57966
qTbot is base back end library for your c++ Qt projects.
|
The TelegramUpdate class contains base information about updates from telegram. More...
#include <telegramupdate.h>


Public Types | |
| using | Type = QString |
| Type This is a string value of the telegram update types. | |
Public Member Functions | |
| TelegramUpdate () | |
| TelegramUpdate default constructor. | |
| bool | contains (const Type &type) const |
| contains This method returns true if the update contains the chosen data type. | |
| QSharedPointer< TelegramMsg > | message () const |
| message Returns the message of this update. | |
| QSharedPointer< TelegramMsg > | editedMessage () const |
| editedMessage Returns the edited message of this update. | |
| QJsonObject | channelPost () const |
| channelPost Returns the channel post of this update. | |
| QJsonObject | editedChannelPost () const |
| editedChannelPost Returns the edited channel post of this update. | |
| QJsonObject | inlineQueryUpdate () const |
| inlineQueryUpdate Returns the inline query of this update. | |
| QJsonObject | chosenInlineResult () const |
| chosenInlineResult Returns the chosen inline result of this update. | |
| QSharedPointer< TelegramInlineKeyBoardCallBack > | callbackQueryUpdate () const |
| callbackQueryUpdate Returns the callback query of this update. | |
| QJsonObject | shippingQueryUpdate () const |
| shippingQueryUpdate Returns the shipping query of this update. | |
| QJsonObject | preCheckuptAueryUpdate () const |
| preCheckuptAueryUpdate Returns the pre-checkout query of this update. | |
| QJsonObject | pollUpdate () const |
| pollUpdate Returns the poll of this update. | |
| QJsonObject | pollAnswerUpdate () const |
| pollAnswerUpdate Returns the poll answer of this update. | |
| QJsonObject | myChatMemberUpdate () const |
| myChatMemberUpdate Returns the my chat member of this update. | |
| QJsonObject | chatMemberUpdate () const |
| chatMemberUpdate Returns the chat member of this update. | |
| QJsonObject | chatJoinRequestUpdate () const |
| chatJoinRequestUpdate Returns the chat join request of this update. | |
| unsigned long long | updateId () const override |
| updateId Returns the update ID. | |
| bool | isValid () const override |
| isValid returns true if the update is valid else false. | |
| QString | from () const override |
| from This virtual function should return the id of the user that sent this update to the bot. | |
| QVariant | chatId () const override |
| chatId This virtual function should return the id of the chat that sent this update to the bot. | |
| Public Member Functions inherited from qTbot::IJsonBasedUpdate | |
| IJsonBasedUpdate () | |
| IJsonBasedUpdate default constructor. | |
| void | setRawData (const QByteArray &newRawData) override |
| setRawData This method sets a new raw data value. | |
| Public Member Functions inherited from qTbot::iUpdate | |
| iUpdate () | |
| iUpdate default constructor. | |
| const QByteArray & | rawData () const |
| rawData returns the raw data of the update. The raw data is the not parsed value from the server. | |
| Public Member Functions inherited from qTbot::IJsonBasedObject | |
| IJsonBasedObject () | |
| IJsonBasedObject default constructor. | |
| IJsonBasedObject (const QJsonObject &newRawJson) | |
| IJsonBasedObject constructs the object from a raw json value. | |
| const QJsonObject & | rawJson () const |
| rawJson Telegram uses a rest api with json objects. So all received messages are parsed into a json object. | |
| virtual void | setRawJson (const QJsonObject &newRawJson) |
| setRawJson This method sets a new raw json data of the object. | |
Public Attributes | |
| const Type | MessageUpdate = "message" |
| MessageUpdate This is the type of a normal message update. | |
| const Type | EditedMessageUpdate = "edited_message" |
| EditedMessageUpdate This is the type of an edited message update. | |
| const Type | ChannelPostUpdate = "channel_post" |
| ChannelPostUpdate This is the type of a channel post update. | |
| const Type | EditedChannelPostUpdate = "edited_channel_post" |
| EditedChannelPostUpdate This is the type of an edited channel post update. | |
| const Type | InlineQueryUpdate = "inline_query" |
| InlineQueryUpdate This is the type of an inline query update. | |
| const Type | ChosenInlineResultUpdate = "chosen_inline_result" |
| ChosenInlineResultUpdate This is the type of a chosen inline result update. | |
| const Type | CallbackQueryUpdate = "callback_query" |
| CallbackQueryUpdate This is the type of a callback query update. | |
| const Type | ShippingQueryUpdate = "shipping_query" |
| ShippingQueryUpdate This is the type of a shipping query update. | |
| const Type | PreCheckuptAueryUpdate = "pre_checkout_query" |
| PreCheckuptAueryUpdate This is the type of a pre-checkout query update. | |
| const Type | PollUpdate = "poll" |
| PollUpdate This is the type of a poll update. | |
| const Type | PollAnswerUpdate = "poll_answer" |
| PollAnswerUpdate This is the type of a poll answer update. | |
| const Type | MyChatMemberUpdate = "my_chat_member" |
| MyChatMemberUpdate This is the type of a my chat member update. | |
| const Type | ChatMemberUpdate = "chat_member" |
| ChatMemberUpdate This is the type of a chat member update. | |
| const Type | ChatJoinRequestUpdate = "chat_join_request" |
| ChatJoinRequestUpdate This is the type of a chat join request update. | |
The TelegramUpdate class contains base information about updates from telegram.
Definition at line 21 of file telegramupdate.h.
| using qTbot::TelegramUpdate::Type = QString |
Type This is a string value of the telegram update types.
Definition at line 32 of file telegramupdate.h.
| qTbot::TelegramUpdate::TelegramUpdate | ( | ) |
TelegramUpdate default constructor.
Definition at line 13 of file telegramupdate.cpp.
| QSharedPointer< TelegramInlineKeyBoardCallBack > qTbot::TelegramUpdate::callbackQueryUpdate | ( | ) | const |
callbackQueryUpdate Returns the callback query of this update.
Definition at line 53 of file telegramupdate.cpp.

| QJsonObject qTbot::TelegramUpdate::channelPost | ( | ) | const |
channelPost Returns the channel post of this update.
Definition at line 37 of file telegramupdate.cpp.

|
overridevirtual |
chatId This virtual function should return the id of the chat that sent this update to the bot.
Implements qTbot::iUpdate.
Definition at line 101 of file telegramupdate.cpp.
| QJsonObject qTbot::TelegramUpdate::chatJoinRequestUpdate | ( | ) | const |
chatJoinRequestUpdate Returns the chat join request of this update.
Definition at line 85 of file telegramupdate.cpp.

| QJsonObject qTbot::TelegramUpdate::chatMemberUpdate | ( | ) | const |
chatMemberUpdate Returns the chat member of this update.
Definition at line 81 of file telegramupdate.cpp.

| QJsonObject qTbot::TelegramUpdate::chosenInlineResult | ( | ) | const |
chosenInlineResult Returns the chosen inline result of this update.
Definition at line 49 of file telegramupdate.cpp.

| bool qTbot::TelegramUpdate::contains | ( | const Type & | type | ) | const |
contains This method returns true if the update contains the chosen data type.
| type | This is the name of the type |
Definition at line 16 of file telegramupdate.cpp.


| QJsonObject qTbot::TelegramUpdate::editedChannelPost | ( | ) | const |
editedChannelPost Returns the edited channel post of this update.
Definition at line 41 of file telegramupdate.cpp.

| QSharedPointer< TelegramMsg > qTbot::TelegramUpdate::editedMessage | ( | ) | const |
editedMessage Returns the edited message of this update.
Definition at line 28 of file telegramupdate.cpp.

|
overridevirtual |
from This virtual function should return the id of the user that sent this update to the bot.
Implements qTbot::iUpdate.
Definition at line 97 of file telegramupdate.cpp.
| QJsonObject qTbot::TelegramUpdate::inlineQueryUpdate | ( | ) | const |
inlineQueryUpdate Returns the inline query of this update.
Definition at line 45 of file telegramupdate.cpp.

|
overridevirtual |
isValid returns true if the update is valid else false.
Reimplemented from qTbot::IJsonBasedUpdate.
Definition at line 93 of file telegramupdate.cpp.

| QSharedPointer< TelegramMsg > qTbot::TelegramUpdate::message | ( | ) | const |
message Returns the message of this update.
Definition at line 20 of file telegramupdate.cpp.

| QJsonObject qTbot::TelegramUpdate::myChatMemberUpdate | ( | ) | const |
myChatMemberUpdate Returns the my chat member of this update.
Definition at line 77 of file telegramupdate.cpp.

| QJsonObject qTbot::TelegramUpdate::pollAnswerUpdate | ( | ) | const |
pollAnswerUpdate Returns the poll answer of this update.
Definition at line 73 of file telegramupdate.cpp.

| QJsonObject qTbot::TelegramUpdate::pollUpdate | ( | ) | const |
pollUpdate Returns the poll of this update.
Definition at line 69 of file telegramupdate.cpp.

| QJsonObject qTbot::TelegramUpdate::preCheckuptAueryUpdate | ( | ) | const |
preCheckuptAueryUpdate Returns the pre-checkout query of this update.
Definition at line 65 of file telegramupdate.cpp.

| QJsonObject qTbot::TelegramUpdate::shippingQueryUpdate | ( | ) | const |
shippingQueryUpdate Returns the shipping query of this update.
Definition at line 61 of file telegramupdate.cpp.

|
overridevirtual |
updateId Returns the update ID.
Implements qTbot::iUpdate.
Definition at line 89 of file telegramupdate.cpp.

| const Type qTbot::TelegramUpdate::CallbackQueryUpdate = "callback_query" |
CallbackQueryUpdate This is the type of a callback query update.
Definition at line 61 of file telegramupdate.h.
| const Type qTbot::TelegramUpdate::ChannelPostUpdate = "channel_post" |
ChannelPostUpdate This is the type of a channel post update.
Definition at line 45 of file telegramupdate.h.
| const Type qTbot::TelegramUpdate::ChatJoinRequestUpdate = "chat_join_request" |
ChatJoinRequestUpdate This is the type of a chat join request update.
Definition at line 89 of file telegramupdate.h.
| const Type qTbot::TelegramUpdate::ChatMemberUpdate = "chat_member" |
ChatMemberUpdate This is the type of a chat member update.
Definition at line 85 of file telegramupdate.h.
| const Type qTbot::TelegramUpdate::ChosenInlineResultUpdate = "chosen_inline_result" |
ChosenInlineResultUpdate This is the type of a chosen inline result update.
Definition at line 57 of file telegramupdate.h.
| const Type qTbot::TelegramUpdate::EditedChannelPostUpdate = "edited_channel_post" |
EditedChannelPostUpdate This is the type of an edited channel post update.
Definition at line 49 of file telegramupdate.h.
| const Type qTbot::TelegramUpdate::EditedMessageUpdate = "edited_message" |
EditedMessageUpdate This is the type of an edited message update.
Definition at line 41 of file telegramupdate.h.
| const Type qTbot::TelegramUpdate::InlineQueryUpdate = "inline_query" |
InlineQueryUpdate This is the type of an inline query update.
Definition at line 53 of file telegramupdate.h.
| const Type qTbot::TelegramUpdate::MessageUpdate = "message" |
MessageUpdate This is the type of a normal message update.
Definition at line 37 of file telegramupdate.h.
| const Type qTbot::TelegramUpdate::MyChatMemberUpdate = "my_chat_member" |
MyChatMemberUpdate This is the type of a my chat member update.
Definition at line 81 of file telegramupdate.h.
| const Type qTbot::TelegramUpdate::PollAnswerUpdate = "poll_answer" |
PollAnswerUpdate This is the type of a poll answer update.
Definition at line 77 of file telegramupdate.h.
| const Type qTbot::TelegramUpdate::PollUpdate = "poll" |
PollUpdate This is the type of a poll update.
Definition at line 73 of file telegramupdate.h.
| const Type qTbot::TelegramUpdate::PreCheckuptAueryUpdate = "pre_checkout_query" |
PreCheckuptAueryUpdate This is the type of a pre-checkout query update.
Definition at line 69 of file telegramupdate.h.
| const Type qTbot::TelegramUpdate::ShippingQueryUpdate = "shipping_query" |
ShippingQueryUpdate This is the type of a shipping query update.
Definition at line 65 of file telegramupdate.h.