tgbotxx 1.1.9.2
Telegram Bot C++ Library
Loading...
Searching...
No Matches
tgbotxx::Birthdate Struct Reference

Describes the birthdate of a user. https://core.telegram.org/bots/api#birthdate. More...

#include <Birthdate.hpp>

Public Member Functions

 Birthdate ()=default
 
 Birthdate (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::int32_t day {}
 Day of the user's birth; 1-31.
 
std::int32_t month {}
 Month of the user's birth; 1-12.
 
std::int32_t year {}
 Optional. Year of the user's birth.
 

Detailed Description

Describes the birthdate of a user. https://core.telegram.org/bots/api#birthdate.

Definition at line 7 of file Birthdate.hpp.

Constructor & Destructor Documentation

◆ Birthdate() [1/2]

tgbotxx::Birthdate::Birthdate ( )
default

◆ Birthdate() [2/2]

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

Definition at line 9 of file Birthdate.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 33 of file Birthdate.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 24 of file Birthdate.hpp.

Member Data Documentation

◆ day

std::int32_t tgbotxx::Birthdate::day {}

Day of the user's birth; 1-31.

Definition at line 14 of file Birthdate.hpp.

◆ month

std::int32_t tgbotxx::Birthdate::month {}

Month of the user's birth; 1-12.

Definition at line 17 of file Birthdate.hpp.

◆ year

std::int32_t tgbotxx::Birthdate::year {}

Optional. Year of the user's birth.

Definition at line 20 of file Birthdate.hpp.


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