tgbotxx  1.1.6.9
Telegram Bot C++ Library
tgbotxx::PhotoSize Struct Reference

This object represents one size of a photo or a file / sticker thumbnail. https://core.telegram.org/bots/api#photosize. More...

#include <PhotoSize.hpp>

Public Member Functions

 PhotoSize ()=default
 
 PhotoSize (const nl::json &json)
 
nl::json toJson () const
 Serializes this object to JSON. More...
 
void fromJson (const nl::json &json)
 Deserializes this object from JSON. More...
 

Public Attributes

std::string fileId
 Identifier for this file, which can be used to download or reuse the file. More...
 
std::string fileUniqueId
 Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file. More...
 
std::int32_t width {}
 Photo width. More...
 
std::int32_t height {}
 Photo height. More...
 
std::int64_t fileSize {}
 Optional. File size in bytes. More...
 

Detailed Description

This object represents one size of a photo or a file / sticker thumbnail. https://core.telegram.org/bots/api#photosize.

Definition at line 7 of file PhotoSize.hpp.

Constructor & Destructor Documentation

◆ PhotoSize() [1/2]

tgbotxx::PhotoSize::PhotoSize ( )
default

◆ PhotoSize() [2/2]

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

Definition at line 9 of file PhotoSize.hpp.

Member Function Documentation

◆ fromJson()

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

Deserializes this object from JSON.

Definition at line 42 of file PhotoSize.hpp.

◆ toJson()

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

Serializes this object to JSON.

Returns
JSON representation of this object

Definition at line 31 of file PhotoSize.hpp.

Member Data Documentation

◆ fileId

std::string tgbotxx::PhotoSize::fileId

Identifier for this file, which can be used to download or reuse the file.

Definition at line 14 of file PhotoSize.hpp.

◆ fileSize

std::int64_t tgbotxx::PhotoSize::fileSize {}

Optional. File size in bytes.

Definition at line 27 of file PhotoSize.hpp.

◆ fileUniqueId

std::string tgbotxx::PhotoSize::fileUniqueId

Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.

Definition at line 18 of file PhotoSize.hpp.

◆ height

std::int32_t tgbotxx::PhotoSize::height {}

Photo height.

Definition at line 24 of file PhotoSize.hpp.

◆ width

std::int32_t tgbotxx::PhotoSize::width {}

Photo width.

Definition at line 21 of file PhotoSize.hpp.


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