17 #ifndef MASTODON_CPP_EASY_ATTACHMENT_HPP 18 #define MASTODON_CPP_EASY_ATTACHMENT_HPP 27 #include "mastodon-cpp.hpp" 28 #include "easy/easy.hpp" 30 #include <mastodon-cpp/mastodon-cpp.hpp> 31 #include <mastodon-cpp/easy/easy.hpp> 35 using std::uint_fast64_t;
60 const double aspect()
const;
70 const uint_fast64_t
bitrate()
const;
79 const std::chrono::duration<double>
duration()
const;
86 const std::array<double, 2>
focus()
const;
96 const uint_fast64_t
height()
const;
106 const uint_fast64_t
id()
const;
121 const string size()
const;
141 const string url()
const;
146 const uint_fast64_t
width()
const;
157 #endif // MASTODON_CPP_EASY_ATTACHMENT_HPP const attachment_type type() const
Returns attachment type.
Definition: attachment.cpp:134
const uint_fast64_t bitrate() const
Returns the bitrate of a video.
Definition: attachment.cpp:42
const string preview_url() const
Returns the URL of the preview image.
Definition: attachment.cpp:109
Attachment()
Constructs an empty Attachment object.
Definition: attachment.cpp:28
const string description() const
Returns the image description.
Definition: attachment.cpp:47
Class to hold attachments.
Definition: attachment.hpp:42
const uint_fast64_t height() const
Returns the height of the original image.
Definition: attachment.cpp:94
const uint_fast64_t width_small() const
Returns the width of the preview image.
Definition: attachment.cpp:160
attachment_type
Describes the attachment type.
Definition: easy.hpp:73
const string text_url() const
Returns shorter URL for the image.
Definition: attachment.cpp:129
const string size_small() const
Returns the size of the preview image.
Definition: attachment.cpp:124
const string url() const
Returns URL of the locally hosted version of the image.
Definition: attachment.cpp:150
const string remote_url() const
Returns the remote URL of the original image.
Definition: attachment.cpp:114
const std::chrono::duration< double > duration() const
Returns the duration of a video in seconds.
Definition: attachment.cpp:52
Definition: mastodon-cpp.hpp:52
const double aspect_small() const
Aspect of preview image.
Definition: attachment.cpp:37
Base class for all entities.
Definition: easy.hpp:225
const uint_fast64_t width() const
Returns the width of the original image.
Definition: attachment.cpp:155
const string size() const
Returns the size of the original image.
Definition: attachment.cpp:119
const uint_fast64_t height_small() const
Returns the height of the preview image.
Definition: attachment.cpp:99
const uint_fast64_t id() const
Returns the ID of the attachment.
Definition: attachment.cpp:104
const std::array< double, 2 > focus() const
Returns the focus point (x, y)
Definition: attachment.cpp:59
const double aspect() const
Aspect of original image.
Definition: attachment.cpp:32
const double framerate() const
Returns the framerate of a video in frames per second.
Definition: attachment.cpp:75