tgbotxx  1.1.6.9
Telegram Bot C++ Library
tgbotxx::GameHighScore Struct Reference

This object represents one row of the high scores table for a game. https://core.telegram.org/bots/api#gamehighscore. More...

#include <GameHighScore.hpp>

Public Member Functions

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

Public Attributes

std::int32_t position {}
 Position in high score table for the game. More...
 
Ptr< Useruser
 User. More...
 
std::int32_t score {}
 Score. More...
 

Detailed Description

This object represents one row of the high scores table for a game. https://core.telegram.org/bots/api#gamehighscore.

Definition at line 8 of file GameHighScore.hpp.

Constructor & Destructor Documentation

◆ GameHighScore() [1/2]

tgbotxx::GameHighScore::GameHighScore ( )
default

◆ GameHighScore() [2/2]

tgbotxx::GameHighScore::GameHighScore ( const nl::json &  json)
inlineexplicit

Definition at line 10 of file GameHighScore.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 35 of file GameHighScore.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 26 of file GameHighScore.hpp.

Member Data Documentation

◆ position

std::int32_t tgbotxx::GameHighScore::position {}

Position in high score table for the game.

Definition at line 15 of file GameHighScore.hpp.

◆ score

std::int32_t tgbotxx::GameHighScore::score {}

Score.

Definition at line 21 of file GameHighScore.hpp.

◆ user

Ptr<User> tgbotxx::GameHighScore::user

User.

Definition at line 18 of file GameHighScore.hpp.


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