|
tgbotxx 1.1.9.2
Telegram Bot C++ Library
|
This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUsers button. https://core.telegram.org/bots/api#shareduser. More...
#include <SharedUser.hpp>
Public Member Functions | |
| SharedUser ()=default | |
| SharedUser (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::int64_t | userId {} |
| Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means. | |
| std::string | firstName |
| Optional. First name of the user, if the name was requested by the bot. | |
| std::string | lastName |
| Optional. Last name of the user, if the name was requested by the bot. | |
| std::string | username |
| Optional. Username of the user, if the username was requested by the bot. | |
| std::vector< Ptr< PhotoSize > > | photo |
| Optional. Available sizes of the chat photo, if the photo was requested by the bot. | |
This object contains information about a user that was shared with the bot using a KeyboardButtonRequestUsers button. https://core.telegram.org/bots/api#shareduser.
Definition at line 8 of file SharedUser.hpp.
|
default |
|
inlineexplicit |
Definition at line 10 of file SharedUser.hpp.
|
inline |
Deserializes this object from JSON.
Definition at line 46 of file SharedUser.hpp.
|
inline |
Serializes this object to JSON.
Definition at line 35 of file SharedUser.hpp.
| std::string tgbotxx::SharedUser::firstName |
Optional. First name of the user, if the name was requested by the bot.
Definition at line 22 of file SharedUser.hpp.
| std::string tgbotxx::SharedUser::lastName |
Optional. Last name of the user, if the name was requested by the bot.
Definition at line 25 of file SharedUser.hpp.
Optional. Available sizes of the chat photo, if the photo was requested by the bot.
Definition at line 31 of file SharedUser.hpp.
| std::int64_t tgbotxx::SharedUser::userId {} |
Identifier of the shared user. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so 64-bit integers or double-precision float types are safe for storing these identifiers. The bot may not have access to the user and could be unable to use this identifier, unless the user is already known to the bot by some other means.
Definition at line 19 of file SharedUser.hpp.
| std::string tgbotxx::SharedUser::username |
Optional. Username of the user, if the username was requested by the bot.
Definition at line 28 of file SharedUser.hpp.