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

The telegramcontact class contains information about user contact. More...

#include <telegramcontact.h>

Inheritance diagram for qTbot::TelegramContact:
Inheritance graph
Collaboration diagram for qTbot::TelegramContact:
Collaboration graph

Public Member Functions

 TelegramContact ()
 TelegramContact default constructor.
 TelegramContact (const QJsonObject &jsonObject)
 Constructs a Contact object from a JSON object.
unsigned long long userIdInt () const
 userIdInt This is the numeric id of the user contact.
QVariant userId () const
 userId This is the id of the user contact.
QString firstName () const
 firstName Returns the first name of the contact.
QString lastName () const
 lastName Returns the last name of the contact.
QString username () const
 username Returns the username of the contact.
QString phone () const
 phone Returns the phone number of the contact.
QString languageCode () const
 languageCode Returns the language code of the contact.
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 telegramcontact class contains information about user contact.

Definition at line 19 of file telegramcontact.h.

Constructor & Destructor Documentation

◆ TelegramContact() [1/2]

qTbot::TelegramContact::TelegramContact ( )

TelegramContact default constructor.

Definition at line 11 of file telegramcontact.cpp.

◆ TelegramContact() [2/2]

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

Constructs a Contact object from a JSON object.

Parameters
jsonObjectThe JSON object containing contact data.

Definition at line 16 of file telegramcontact.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ firstName()

QString qTbot::TelegramContact::firstName ( ) const

firstName Returns the first name of the contact.

Returns
The first name of the contact.

Definition at line 29 of file telegramcontact.cpp.

Here is the call graph for this function:

◆ languageCode()

QString qTbot::TelegramContact::languageCode ( ) const

languageCode Returns the language code of the contact.

Returns
The language code of the contact.

Definition at line 45 of file telegramcontact.cpp.

Here is the call graph for this function:

◆ lastName()

QString qTbot::TelegramContact::lastName ( ) const

lastName Returns the last name of the contact.

Returns
The last name of the contact.

Definition at line 33 of file telegramcontact.cpp.

Here is the call graph for this function:

◆ phone()

QString qTbot::TelegramContact::phone ( ) const

phone Returns the phone number of the contact.

Returns
The phone number of the contact.

Definition at line 41 of file telegramcontact.cpp.

Here is the call graph for this function:

◆ userId()

QVariant qTbot::TelegramContact::userId ( ) const

userId This is the id of the user contact.

Returns
id of the user

Definition at line 25 of file telegramcontact.cpp.

Here is the call graph for this function:

◆ userIdInt()

unsigned long long qTbot::TelegramContact::userIdInt ( ) const

userIdInt This is the numeric id of the user contact.

Returns
id of the user

Definition at line 21 of file telegramcontact.cpp.

Here is the call graph for this function:

◆ username()

QString qTbot::TelegramContact::username ( ) const

username Returns the username of the contact.

Returns
The username of the contact.

Definition at line 37 of file telegramcontact.cpp.

Here is the call graph for this function:

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