qTbot
0.2.123.6f57966
qTbot is base back end library for your c++ Qt projects.
Toggle main menu visibility
telegraminlinekeyboardcallback.cpp
Go to the documentation of this file.
1
#include "
telegraminlinekeyboardcallback.h
"
2
3
namespace
qTbot
{
4
5
TelegramInlineKeyBoardCallBack::TelegramInlineKeyBoardCallBack
()
6
{
7
8
}
9
10
TelegramInlineKeyBoardCallBack::TelegramInlineKeyBoardCallBack
(
const
QJsonObject &jsonObject):
11
IJsonBasedObject
(jsonObject) {
12
13
}
14
15
unsigned
long
long
TelegramInlineKeyBoardCallBack::fromId
()
const
{
16
return
rawJson
()[
"from"
][
"id"
].toInteger();
17
}
18
19
bool
TelegramInlineKeyBoardCallBack::isBot
()
const
{
20
return
rawJson
()[
"from"
][
"is_bot"
].toBool();
21
}
22
23
QString
TelegramInlineKeyBoardCallBack::firstName
()
const
{
24
return
rawJson
()[
"from"
][
"first_name"
].toString();
25
}
26
27
QString
TelegramInlineKeyBoardCallBack::lastName
()
const
{
28
return
rawJson
()[
"from"
][
"last_name"
].toString();
29
}
30
31
QString
TelegramInlineKeyBoardCallBack::username
()
const
{
32
return
rawJson
()[
"from"
][
"username"
].toString();
33
}
34
35
QString
TelegramInlineKeyBoardCallBack::languageCode
()
const
{
36
return
rawJson
()[
"from"
][
"language_code"
].toString();
37
}
38
39
QString
TelegramInlineKeyBoardCallBack::callBackData
()
const
{
40
return
rawJson
()[
"data"
].toString();
41
}
42
43
QVariant
TelegramInlineKeyBoardCallBack::messageId
()
const
{
44
return
rawJson
()[
"message"
][
"message_id"
].toVariant();
45
}
46
}
qTbot::IJsonBasedObject::rawJson
const QJsonObject & rawJson() const
rawJson Telegram uses a rest api with json objects. So all received messages are parsed into a json o...
Definition
ijsonbasedobject.cpp:21
qTbot::IJsonBasedObject::IJsonBasedObject
IJsonBasedObject()
IJsonBasedObject default constructor.
Definition
ijsonbasedobject.cpp:12
qTbot::TelegramInlineKeyBoardCallBack::fromId
unsigned long long fromId() const
fromId returns the sender's ID.
Definition
telegraminlinekeyboardcallback.cpp:15
qTbot::TelegramInlineKeyBoardCallBack::TelegramInlineKeyBoardCallBack
TelegramInlineKeyBoardCallBack()
TelegramInlineKeyBoardCallBack default constructor.
Definition
telegraminlinekeyboardcallback.cpp:5
qTbot::TelegramInlineKeyBoardCallBack::callBackData
QString callBackData() const
callBackData line of the call back that was be clicked.
Definition
telegraminlinekeyboardcallback.cpp:39
qTbot::TelegramInlineKeyBoardCallBack::lastName
QString lastName() const
lastName returns the sender's last name.
Definition
telegraminlinekeyboardcallback.cpp:27
qTbot::TelegramInlineKeyBoardCallBack::isBot
bool isBot() const
isBot checks if the sender is a bot.
Definition
telegraminlinekeyboardcallback.cpp:19
qTbot::TelegramInlineKeyBoardCallBack::languageCode
QString languageCode() const
languageCode returns the sender's language code.
Definition
telegraminlinekeyboardcallback.cpp:35
qTbot::TelegramInlineKeyBoardCallBack::messageId
QVariant messageId() const
messageId id of the message when was be presed button.
Definition
telegraminlinekeyboardcallback.cpp:43
qTbot::TelegramInlineKeyBoardCallBack::username
QString username() const
username returns the sender's username.
Definition
telegraminlinekeyboardcallback.cpp:31
qTbot::TelegramInlineKeyBoardCallBack::firstName
QString firstName() const
firstName returns the sender's first name.
Definition
telegraminlinekeyboardcallback.cpp:23
qTbot
Definition
telegramdeletemessage.cpp:8
telegraminlinekeyboardcallback.h
src
qTbot
src
public
qTbot
messages
telegraminlinekeyboardcallback.cpp
Generated by
1.18.0