17 #ifndef MASTODON_CPP_EASY_ATTACHMENT_HPP 18 #define MASTODON_CPP_EASY_ATTACHMENT_HPP 27 #include "mastodon-cpp.hpp" 28 #include "easy/entity.hpp" 30 #include <mastodon-cpp/mastodon-cpp.hpp> 31 #include <mastodon-cpp/easy/entity.hpp> 51 virtual bool valid()
const override;
93 const std::chrono::duration<double>
duration()
const;
100 const string file()
const;
118 const std::array<double, 2>
focus()
const;
155 const string id()
const;
176 const string size()
const;
204 const string url()
const;
211 uint64_t
width()
const;
225 #endif // MASTODON_CPP_EASY_ATTACHMENT_HPP virtual bool valid() const override
Returns true if the Entity holds valid data.
Definition: attachment.cpp:24
const string preview_url() const
Returns the URL of the preview image.
Definition: attachment.cpp:139
Entity()
Constructs an empty Entity object.
Definition: entity.cpp:42
const string description() const
Returns the image description.
Definition: attachment.cpp:52
Class to hold attachments.
Definition: attachment.hpp:46
uint64_t height() const
Returns the height of the original image.
Definition: attachment.cpp:124
uint64_t bitrate() const
Returns the bitrate of a video.
Definition: attachment.cpp:47
const string text_url() const
Returns shorter URL for the image.
Definition: attachment.cpp:159
const string size_small() const
Returns the size of the preview image.
Definition: attachment.cpp:154
double aspect() const
Aspect of original image.
Definition: attachment.cpp:37
const string url() const
Returns URL of the locally hosted version of the image.
Definition: attachment.cpp:180
uint64_t width_small() const
Returns the width of the preview image.
Definition: attachment.cpp:190
const string remote_url() const
Returns the remote URL of the original image.
Definition: attachment.cpp:144
uint64_t height_small() const
Returns the height of the preview image.
Definition: attachment.cpp:129
const std::chrono::duration< double > duration() const
Returns the duration of a video in seconds.
Definition: attachment.cpp:63
attachment_type type() const
Returns attachment type.
Definition: attachment.cpp:164
Collection of things to interface with server software that implements the Mastodon API...
Definition: mastodon-cpp.hpp:52
Base class for all entities.
Definition: entity.hpp:41
uint64_t width() const
Returns the width of the original image.
Definition: attachment.cpp:185
const string id() const
Returns the ID of the attachment.
Definition: attachment.cpp:134
const string size() const
Returns the size of the original image.
Definition: attachment.cpp:149
double aspect_small() const
Aspect of preview image.
Definition: attachment.cpp:42
const string file() const
Gets file to upload.
Definition: attachment.cpp:70
double framerate() const
Returns the framerate of a video in frames per second.
Definition: attachment.cpp:105
attachment_type
Describes the attachment type.
Definition: types_easy.hpp:68
const std::array< double, 2 > focus() const
Returns the focus point (x, y)
Definition: attachment.cpp:82