LibTgBotPP
 All Classes Namespaces Files Functions Variables Typedefs Macros
User.cc
Go to the documentation of this file.
1 #include "Telegram/User.h"
2 
6 Telegram::User::User(Json::Value json) {
7 
8  this->id = json["id"].asUInt64();
9  this->first_name = json["first_name"].asString();
10  this->last_name = json["last_name"].asString();
11  this->username = json["username"].asString();
12 }
13 
14 // Getter
15 Json::Int64 Telegram::User::getId() {
16 
17  return(this->id);
18 }
19 
21 
22  return(this->first_name);
23 }
24 
26 
27  return(this->last_name);
28 }
29 
31 
32  return(this->username);
33 }
User(Json::Value)
Definition: User.cc:6
std::string getLastName()
Definition: User.cc:25
std::string getUserName()
Definition: User.cc:30
std::string first_name
Definition: User.h:20
std::string username
Definition: User.h:22
std::string getFirstName()
Definition: User.cc:20
Json::Int64 getId()
Definition: User.cc:15
std::string last_name
Definition: User.h:21