qTbot 0.87.9547b0c
qTbot is base back end library for your c++ Qt projects.
qTbot::TelegramDocument Class Reference

The TelegramDocument class This is implementation of the documents objects of telegram. More...

#include <telegramdocument.h>

Public Member Functions

 TelegramDocument ()
 
 TelegramDocument (const QJsonObject &jsonObject)
 Constructs a Document object from a JSON object.
 
QString fileName () const
 Returns the file name of the document.
 
QString mimeType () const
 Returns the MIME type of the document.
 
- Public Member Functions inherited from qTbot::TelegramFile
 TelegramFile ()
 
 TelegramFile (const QJsonObject &jsonObject)
 Constructs a Photo object from a JSON object.
 
QString fileId () const
 Returns the file ID of the photo.
 
QString fileUniqueId () const
 Returns the unique ID of the photo.
 
int fileSize () const
 Returns the file size of the photo.
 
QString takePath ()
 Returns the file path to get from web.
 
- 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 TelegramDocument class This is implementation of the documents objects of telegram.

Definition at line 19 of file telegramdocument.h.

Inheritance diagram for qTbot::TelegramDocument:
Inheritance graph
Collaboration diagram for qTbot::TelegramDocument:
Collaboration graph

Constructor & Destructor Documentation

◆ TelegramDocument() [1/2]

qTbot::TelegramDocument::TelegramDocument ( )

Definition at line 12 of file telegramdocument.cpp.

◆ TelegramDocument() [2/2]

qTbot::TelegramDocument::TelegramDocument ( const QJsonObject &  jsonObject)

Constructs a Document object from a JSON object.

Parameters
jsonObjectThe JSON object containing document data.

Definition at line 17 of file telegramdocument.cpp.

Member Function Documentation

◆ fileName()

QString qTbot::TelegramDocument::fileName ( ) const

Returns the file name of the document.

Returns
The file name of the document.

Definition at line 19 of file telegramdocument.cpp.

Here is the call graph for this function:

◆ mimeType()

QString qTbot::TelegramDocument::mimeType ( ) const

Returns the MIME type of the document.

Returns
The MIME type of the document.

Definition at line 23 of file telegramdocument.cpp.

Here is the call graph for this function:

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