1 #ifndef CPPGRAM_STICKER_HPP 2 #define CPPGRAM_STICKER_HPP 4 #include <experimental/optional> 9 #include "photo_size.hpp" 36 std::experimental::optional<PhotoSize>
thumb;
39 std::experimental::optional<std::string>
emoj;
42 std::experimental::optional<uint_fast32_t>
file_size;
44 Sticker( Json::Value &json_sticker )
45 : file_id( json_sticker[
"file_id"].asString() )
46 , width( json_sticker[
"width"].asUInt() )
47 , height( json_sticker[
"height"].asUInt() )
49 if ( !json_sticker[
"thumb"].isNull() )
51 thumb.emplace(
PhotoSize( json_sticker[
"thumb"] ) );
54 if ( !json_sticker[
"emoj"].isNull() )
56 emoj.emplace( json_sticker[
"emoj"].asString() );
59 if ( !json_sticker[
"file_size"].isNull() )
61 file_size.emplace( json_sticker[
"file_size"].asUInt() );
std::string file_id
Unique identifier for this file.
Definition: sticker.hpp:27
std::experimental::optional< std::string > emoj
Optional. Emoj associated with the sticker
Definition: sticker.hpp:39
A photo or thumbnail.
Definition: photo_size.hpp:20
A sticker.
Definition: sticker.hpp:21
std::experimental::optional< uint_fast32_t > file_size
Optional. File size
Definition: sticker.hpp:42
std::experimental::optional< PhotoSize > thumb
Optional. Sticker thumbnail in .webbp or .jpg format
Definition: sticker.hpp:36
uint_fast32_t height
Sticker height.
Definition: sticker.hpp:30
uint_fast32_t width
Sticker width.
Definition: sticker.hpp:30
main namespace for Cppgram