17 #ifndef MASTODON_CPP_EASY_POLL_HPP 18 #define MASTODON_CPP_EASY_POLL_HPP 24 #include "../../mastodon-cpp.hpp" 25 #include "../entity.hpp" 44 virtual bool valid()
const override;
51 const string id()
const;
86 const vector<poll_options_type>
options()
const;
98 #endif // MASTODON_CPP_EASY_POLL_HPP const vector< poll_options_type > options() const
Returns poll options and their votes count.
Definition: poll.cpp:61
Entity()
Constructs an empty Entity object.
Definition: entity.cpp:43
Class to hold polls.
Definition: poll.hpp:39
virtual bool valid() const override
Returns true if the Entity holds valid data.
Definition: poll.cpp:23
bool multiple() const
Returns true or false.
Definition: poll.cpp:51
Type for time. Converts to time_point and string.
Definition: types_easy.hpp:150
uint64_t votes_count() const
Returns the number of votes.
Definition: poll.cpp:56
bool voted() const
Returns whether you voted or not.
Definition: poll.cpp:83
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 Easy::time_type expires_at() const
Returns time when the poll expires.
Definition: poll.cpp:41
bool expired() const
Returns true if poll has expired.
Definition: poll.cpp:46
const string id() const
Returns poll ID.
Definition: poll.cpp:36