10 explicit Audio(
const nl::json& json) {
48 nl::json json = nl::json::object();
#define OBJECT_SERIALIZE_FIELD_PTR(json, json_field, field)
#define OBJECT_DESERIALIZE_FIELD_PTR(json, json_field, field, optional)
#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.
This object represents an audio file to be treated as music by the Telegram clients....
std::string fileUniqueId
Unique identifier for this file, which is supposed to be the same over time and for different bots....
void fromJson(const nl::json &json)
Deserializes this object from JSON.
std::string fileName
Optional. Original filename as defined by sender.
Ptr< PhotoSize > thumbnail
Optional. Thumbnail of the album cover to which the music file belongs.
std::int64_t fileSize
Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have diff...
std::string fileId
Identifier for this file, which can be used to download or reuse the file.
std::int32_t duration
Duration of the audio in seconds as defined by sender.
Audio(const nl::json &json)
std::string title
Optional. Title of the audio as defined by sender or by audio tags.
std::string mimeType
Optional. MIME type of the file as defined by sender.
nl::json toJson() const
Serializes this object to JSON.
std::string performer
Optional. Performer of the audio as defined by sender or by audio tags.