tgbotxx 1.2.9.5
Telegram Bot C++ Library
Loading...
Searching...
No Matches
tgbotxx::UserRating Struct Reference

This object describes the rating of a user based on their Telegram Star spendings. https://core.telegram.org/bots/api#userrating. More...

#include <UserRating.hpp>

Public Member Functions

 UserRating ()=default
 
 UserRating (const nl::json &json)
 
nl::json toJson () const
 Serializes this object to JSON.
 
void fromJson (const nl::json &json)
 Deserializes this object from JSON.
 

Public Attributes

std::int32_t level {}
 Current level of the user, indicating their reliability when purchasing digital goods and services. A higher level suggests a more trustworthy customer; a negative level is likely reason for concern.
 
std::int32_t rating {}
 Numerical value of the user's rating; the higher the rating, the better.
 
std::int32_t currentLevelRating {}
 The rating value required to get the current level.
 
std::int32_t nextLevelRating {}
 Optional. The rating value required to get to the next level; omitted if the maximum level was reached.
 

Detailed Description

This object describes the rating of a user based on their Telegram Star spendings. https://core.telegram.org/bots/api#userrating.

Definition at line 7 of file UserRating.hpp.

Constructor & Destructor Documentation

◆ UserRating() [1/2]

tgbotxx::UserRating::UserRating ( )
default

◆ UserRating() [2/2]

tgbotxx::UserRating::UserRating ( const nl::json &  json)
explicit

Member Function Documentation

◆ fromJson()

void tgbotxx::UserRating::fromJson ( const nl::json &  json)
inline

Deserializes this object from JSON.

Definition at line 37 of file UserRating.hpp.

◆ toJson()

nl::json tgbotxx::UserRating::toJson ( ) const
inline

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 27 of file UserRating.hpp.

Member Data Documentation

◆ currentLevelRating

std::int32_t tgbotxx::UserRating::currentLevelRating {}

The rating value required to get the current level.

Definition at line 19 of file UserRating.hpp.

◆ level

std::int32_t tgbotxx::UserRating::level {}

Current level of the user, indicating their reliability when purchasing digital goods and services. A higher level suggests a more trustworthy customer; a negative level is likely reason for concern.

Definition at line 13 of file UserRating.hpp.

◆ nextLevelRating

std::int32_t tgbotxx::UserRating::nextLevelRating {}

Optional. The rating value required to get to the next level; omitted if the maximum level was reached.

Definition at line 22 of file UserRating.hpp.

◆ rating

std::int32_t tgbotxx::UserRating::rating {}

Numerical value of the user's rating; the higher the rating, the better.

Definition at line 16 of file UserRating.hpp.


The documentation for this struct was generated from the following file: