qTbot 0.2.123.6f57966
qTbot is base back end library for your c++ Qt projects.
qTbot::TelegramUpdateAnswer Class Reference

The TelegramUpdateAnswer class This is a base message from the telegram server after an update request. More...

#include <telegramupdateanswer.h>

Inheritance diagram for qTbot::TelegramUpdateAnswer:
Inheritance graph
Collaboration diagram for qTbot::TelegramUpdateAnswer:
Collaboration graph

Public Member Functions

 TelegramUpdateAnswer ()
 TelegramUpdateAnswer default constructor.
bool isValid () const override
 isValid returns true if the update is valid else false.
QJsonValue result () const
 result This is the result field of the telegram response.
int errorCode () const
 errorCode This is the error code (if it exists).
QString errorDescription () const
 errorDescription This is the text description of what happened.
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.
unsigned long long updateId () const override
 updateId This method returns the numeric id of the update.
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.

Detailed Description

The TelegramUpdateAnswer class This is a base message from the telegram server after an update request.

Definition at line 20 of file telegramupdateanswer.h.

Constructor & Destructor Documentation

◆ TelegramUpdateAnswer()

qTbot::TelegramUpdateAnswer::TelegramUpdateAnswer ( )

TelegramUpdateAnswer default constructor.

Definition at line 12 of file telegramupdateanswer.cpp.

Member Function Documentation

◆ chatId()

QVariant qTbot::TelegramUpdateAnswer::chatId ( ) const
overridevirtual

chatId This virtual function should return the id of the chat that sent this update to the bot.

Returns
id of the chat.

Implements qTbot::iUpdate.

Definition at line 33 of file telegramupdateanswer.cpp.

◆ errorCode()

int qTbot::TelegramUpdateAnswer::errorCode ( ) const

errorCode This is the error code (if it exists).

Returns
error code

Definition at line 21 of file telegramupdateanswer.cpp.

Here is the call graph for this function:

◆ errorDescription()

QString qTbot::TelegramUpdateAnswer::errorDescription ( ) const

errorDescription This is the text description of what happened.

Returns
text message about the error.

Definition at line 25 of file telegramupdateanswer.cpp.

Here is the call graph for this function:

◆ from()

QString qTbot::TelegramUpdateAnswer::from ( ) const
overridevirtual

from This virtual function should return the id of the user that sent this update to the bot.

Returns
id of the sender.

Implements qTbot::iUpdate.

Definition at line 29 of file telegramupdateanswer.cpp.

◆ isValid()

bool qTbot::TelegramUpdateAnswer::isValid ( ) const
overridevirtual

isValid returns true if the update is valid else false.

Returns
true if the update is valid else false.

Reimplemented from qTbot::IJsonBasedUpdate.

Definition at line 41 of file telegramupdateanswer.cpp.

Here is the call graph for this function:

◆ result()

QJsonValue qTbot::TelegramUpdateAnswer::result ( ) const

result This is the result field of the telegram response.

Returns
json value of the result field.

Definition at line 17 of file telegramupdateanswer.cpp.

Here is the call graph for this function:

◆ updateId()

unsigned long long qTbot::TelegramUpdateAnswer::updateId ( ) const
overridevirtual

updateId This method returns the numeric id of the update.

Returns
numeric id of the update.

Implements qTbot::iUpdate.

Definition at line 37 of file telegramupdateanswer.cpp.


The documentation for this class was generated from the following files: