17 #ifndef MASTODON_CPP_EASY_ATTACHMENT_HPP 18 #define MASTODON_CPP_EASY_ATTACHMENT_HPP 25 #include "../../mastodon-cpp.hpp" 26 #include "../entity.hpp" 55 virtual bool valid()
const override;
83 const std::chrono::duration<double>
duration()
const;
111 const string size()
const;
125 uint64_t
width()
const;
135 virtual bool valid()
const override;
156 const string file()
const;
174 const std::array<double, 2>
focus()
const;
190 const string id()
const;
232 const string url()
const;
237 #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:91
Entity()
Constructs an empty Entity object.
Definition: entity.cpp:43
const string description() const
Returns the image description.
Definition: attachment.cpp:35
Class to hold attachments.
Definition: attachment.hpp:40
const string text_url() const
Returns shorter URL for the image.
Definition: attachment.cpp:101
const string url() const
Returns URL of the locally hosted version of the image.
Definition: attachment.cpp:122
const string remote_url() const
Returns the remote URL of the original image.
Definition: attachment.cpp:96
const Meta meta() const
Returns metadata about the attachment.
Definition: attachment.cpp:86
attachment_type type() const
Returns attachment type.
Definition: attachment.cpp:106
Collection of things to interface with server software that implements the Mastodon API.
Definition: mastodon-cpp.hpp:47
Base class for all entities.
Definition: entity.hpp:36
const string id() const
Returns the ID of the attachment.
Definition: attachment.cpp:81
const string file() const
Gets file to upload.
Definition: attachment.cpp:46
attachment_type
Describes the attachment type.
Definition: types_easy.hpp:69
const std::array< double, 2 > focus() const
Returns the focus point (x, y)
Definition: attachment.cpp:58