1 #ifndef CPPGRAM_VIDEO_HPP 2 #define CPPGRAM_VIDEO_HPP 4 #include <experimental/optional> 9 #include "photo_size.hpp" 39 std::experimental::optional<PhotoSize>
thumb;
45 std::experimental::optional<uint_fast32_t>
file_size;
47 Video( Json::Value &json_video )
48 : file_id( json_video[
"file_id"].asString() )
49 , width( json_video[
"width"].asUInt() )
50 , height( json_video[
"height"].asUInt() )
51 , duration( json_video[
"duration"].asUInt() )
53 if ( !json_video[
"thumb"].isNull() )
55 thumb.emplace(
PhotoSize( json_video[
"thumb"] ) );
58 if ( !json_video[
"mime_type"].isNull() )
60 mime_type.emplace( json_video[
"mime_type"].asString() );
63 if ( !json_video[
"file_size"].isNull() )
65 file_size.emplace( json_video[
"file_size"].asUInt() );
std::experimental::optional< uint_fast32_t > file_size
Optional. File size
Definition: video.hpp:45
std::experimental::optional< std::string > mime_type
Optional. Mime type of a file as defined by sender
Definition: video.hpp:42
uint_fast32_t duration
Duration of the video in seconds as defined by sender.
Definition: video.hpp:30
std::experimental::optional< PhotoSize > thumb
Optional. Video thumbnail
Definition: video.hpp:39
uint_fast32_t height
Video height as defined by sender.
Definition: video.hpp:30
A photo or thumbnail.
Definition: photo_size.hpp:20
A video sent by user.
Definition: video.hpp:21
std::string file_id
Unique identifier for this file.
Definition: video.hpp:27
main namespace for Cppgram
uint_fast32_t width
Video width as defined by sender.
Definition: video.hpp:30