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

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

#include <telegramupdateanswer.h>

Public Member Functions

 TelegramUpdateAnswer ()
 
bool isValid () const override
 isValid return true if the message is valid else false.
 
QJsonValue result () const
 result This is result filed of thetelegram responce.
 
int errorCode () const
 errorCode This is error code (if exist)
 
QString errorDescription () const
 errorDescription This is text description : what is happend.
 
QString from () const override
 from This virtual function should return name of the user that sent this message to bot.
 
QVariant chatId () const override
 from This virtual function should return name of the chat when sent this message to bot.
 
unsigned long long updateId () const override
 updateId This method returns numeric id of the update.
 
- Public Member Functions inherited from qTbot::IJsonBasedUpdate
 IJsonBasedUpdate ()
 
void setRawData (const QByteArray &newRawData) override
 setRawData This method sets new raw data value.
 
- Public Member Functions inherited from qTbot::iUpdate
 iUpdate ()
 
const QByteArray & rawData () const
 rawData returns raw data of the message. The raw data is not parsed value form the server.
 
- Public Member Functions inherited from qTbot::IJsonBasedObject
 IJsonBasedObject ()
 
 IJsonBasedObject (const QJsonObject &newRawJson)
 
const QJsonObject & rawJson () const
 rawJson Telegram use rest api with json objects. So all received messages will be parsed in to jsobject.
 
virtual void setRawJson (const QJsonObject &newRawJson)
 setRawJson this method convert jsobject into telegram message.
 

Detailed Description

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

Definition at line 20 of file telegramupdateanswer.h.

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

Constructor & Destructor Documentation

◆ TelegramUpdateAnswer()

qTbot::TelegramUpdateAnswer::TelegramUpdateAnswer ( )

Definition at line 12 of file telegramupdateanswer.cpp.

Member Function Documentation

◆ chatId()

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

from This virtual function should return name of the chat when sent this message to bot.

Returns
id of the sender.

Implements qTbot::iUpdate.

Definition at line 33 of file telegramupdateanswer.cpp.

◆ errorCode()

int qTbot::TelegramUpdateAnswer::errorCode ( ) const

errorCode This is error code (if exist)

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 text description : what is happend.

Returns
text message about 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 name of the user that sent this message to 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 return true if the message is valid else false.

Returns
true if the message 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 result filed of thetelegram responce.

Returns
json value of the resul 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 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: