yatbcpp  0.0.1
Yet another Telegram Bot CPP Library
Public Member Functions | Private Attributes | Friends | List of all members
yatbcpp::User Class Reference

#include "User.h"

Public Member Functions

 User (std::int32_t id, bool is_bot, std::string first_name)
 
 User (const User &user)
 
std::int32_t getId () const
 
bool IsBot () const
 
void setLast_name (const std::optional< std::string > &last_name)
 
void setUsername (const std::optional< std::string > &username)
 
void setLanguage_code (const std::optional< std::string > &language_code)
 
const std::string & getFirst_name () const
 
const std::optional< std::string > & getLast_name () const
 
const std::optional< std::string > & getUsername () const
 
const std::optional< std::string > & getLanguage_code () const
 

Private Attributes

std::int32_t id
 
bool is_bot
 
std::string first_name
 
std::optional< std::string > last_name
 
std::optional< std::string > username
 
std::optional< std::string > language_code
 

Friends

std::ostream & operator<< (std::ostream &o, const User &U)
 

Detailed Description

See also https://core.telegram.org/bots/api#user

Definition at line 14 of file User.h.

Constructor & Destructor Documentation

◆ User() [1/2]

yatbcpp::User::User ( std::int32_t  id,
bool  is_bot,
std::string  first_name 
)

◆ User() [2/2]

User::User ( const User user)

Definition at line 16 of file User.cc.

Member Function Documentation

◆ getFirst_name()

const string & User::getFirst_name ( ) const

Definition at line 53 of file User.cc.

◆ getId()

int32_t User::getId ( ) const

Definition at line 45 of file User.cc.

◆ getLanguage_code()

const optional< string > & User::getLanguage_code ( ) const

Definition at line 65 of file User.cc.

◆ getLast_name()

const optional< string > & User::getLast_name ( ) const

Definition at line 57 of file User.cc.

◆ getUsername()

const optional< string > & User::getUsername ( ) const

Definition at line 61 of file User.cc.

◆ IsBot()

bool User::IsBot ( ) const

Definition at line 49 of file User.cc.

◆ setLanguage_code()

void User::setLanguage_code ( const std::optional< std::string > &  language_code)

Definition at line 37 of file User.cc.

◆ setLast_name()

void User::setLast_name ( const std::optional< std::string > &  last_name)

Definition at line 29 of file User.cc.

◆ setUsername()

void User::setUsername ( const std::optional< std::string > &  username)

Definition at line 33 of file User.cc.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  o,
const User U 
)
friend

Definition at line 9 of file User_ostream.cc.

Member Data Documentation

◆ first_name

std::string yatbcpp::User::first_name
private

Definition at line 44 of file User.h.

◆ id

std::int32_t yatbcpp::User::id
private

Definition at line 42 of file User.h.

◆ is_bot

bool yatbcpp::User::is_bot
private

Definition at line 43 of file User.h.

◆ language_code

std::optional<std::string> yatbcpp::User::language_code
private

Definition at line 47 of file User.h.

◆ last_name

std::optional<std::string> yatbcpp::User::last_name
private

Definition at line 45 of file User.h.

◆ username

std::optional<std::string> yatbcpp::User::username
private

Definition at line 46 of file User.h.


The documentation for this class was generated from the following files: