1 #ifndef CPPGRAM_USER_HPP 2 #define CPPGRAM_USER_HPP 4 #include <experimental/optional> 37 User( Json::Value &json_user )
38 : id( json_user[
"id"].asUInt() )
39 , first_name( json_user[
"first_name"].asString() )
41 if ( !json_user[
"last_name"].isNull() )
43 last_name.emplace( json_user[
"last_name"].asString() );
46 if ( !json_user[
"username"].isNull() )
48 username.emplace( json_user[
"username"].asString() );
std::experimental::optional< std::string > last_name
Optional. User‘s or bot’s last name
Definition: user.hpp:32
std::string first_name
User‘s or bot’s first name.
Definition: user.hpp:29
std::experimental::optional< std::string > username
Optional. User‘s or bot’s username
Definition: user.hpp:32
main namespace for Cppgram
uint_fast32_t id
Unique identifier for this user or bot.
Definition: user.hpp:26
User object.
Definition: user.hpp:20