19 nl::json json = nl::json::object();
29 void _fromJson(
const nl::json& json) {
#define OBJECT_SERIALIZE_FIELD(json, json_field, field)
Available objects: https://core.telegram.org/bots/api#available-types.
#define OBJECT_DESERIALIZE_FIELD(json, json_field, field, default_value, optional)
Deserialize.
Base class for story content to post https://core.telegram.org/bots/api#inputstorycontentphoto.
std::string type
Type of the story content.
InputStoryContent(const nl::json &json)
virtual nl::json toJson() const
virtual void fromJson(const nl::json &json)
virtual ~InputStoryContent()=default
InputStoryContent()=default
Describes a photo to post as a story https://core.telegram.org/bots/api#inputstorycontentphoto.
std::string photo
The photo to post as a story. Must be 1080x1920 and <= 10MB. Can't be reused.
nl::json toJson() const override
Serializes this object to JSON.
void fromJson(const nl::json &json) override
Deserializes this object from JSON.
InputStoryContentPhoto(const nl::json &json)
Describes a video to post as a story https://core.telegram.org/bots/api#inputstorycontentvideo.
void fromJson(const nl::json &json) override
Deserializes this object from JSON.
bool isAnimation
Optional. True if the video has no sound.
double duration
Optional. Precise duration of the video in seconds; 0-60.
std::string video
The video to post as a story. Must be 720x1280, H.265, streamable, <= 30MB. Can't be reused.
InputStoryContentVideo(const nl::json &json)
nl::json toJson() const override
Serializes this object to JSON.
double coverFrameTimestamp
Optional. Timestamp in seconds of the frame that will be used as the static cover for the story....