diff --git a/src/easy/entities/account.cpp b/src/easy/entities/account.cpp index 3c6feda..3cff8d2 100644 --- a/src/easy/entities/account.cpp +++ b/src/easy/entities/account.cpp @@ -21,14 +21,6 @@ using namespace Mastodon; using Account = Easy::Account; -Account::Account(const string &json) -: Entity(json) -{} - -Account::Account() -: Entity() -{} - bool Account::valid() const { const std::vector attributes = diff --git a/src/easy/entities/account.hpp b/src/easy/entities/account.hpp index b699f02..04265a5 100644 --- a/src/easy/entities/account.hpp +++ b/src/easy/entities/account.hpp @@ -46,6 +46,8 @@ namespace Mastodon class Easy::Account : public Easy::Entity { public: + using Entity::Entity; + /*! * @brief Describes a field. Format: name, value * @@ -53,22 +55,6 @@ namespace Mastodon */ using fields_pair = std::pair; - /*! - * @brief Constructs an Account object from a JSON string. - * - * @param json JSON string - * - * @since before 0.11.0 - */ - explicit Account(const string &json); - - /*! - * @brief Constructs an empty Account object. - * - * @since before 0.11.0 - */ - Account(); - virtual bool valid() const; /*! diff --git a/src/easy/entities/application.cpp b/src/easy/entities/application.cpp index d5f3086..fc6757d 100644 --- a/src/easy/entities/application.cpp +++ b/src/easy/entities/application.cpp @@ -19,14 +19,6 @@ using namespace Mastodon; using Application = Easy::Application; -Application::Application(const string &json) -: Entity(json) -{} - -Application::Application() -: Entity() -{} - bool Application::valid() const { return Entity::check_valid({"name"}); diff --git a/src/easy/entities/application.hpp b/src/easy/entities/application.hpp index 63c23b5..3f6e5ed 100644 --- a/src/easy/entities/application.hpp +++ b/src/easy/entities/application.hpp @@ -40,21 +40,7 @@ namespace Mastodon class Easy::Application : public Easy::Entity { public: - /*! - * @brief Constructs an Application object from a JSON string. - * - * @param json JSON string - * - * @since before 0.11.0 - */ - explicit Application(const string &json); - - /*! - * @brief Constructs an empty Application object. - * - * @since before 0.11.0 - */ - Application(); + using Entity::Entity; virtual bool valid() const; diff --git a/src/easy/entities/attachment.cpp b/src/easy/entities/attachment.cpp index 5a7f4dc..a6fb072 100644 --- a/src/easy/entities/attachment.cpp +++ b/src/easy/entities/attachment.cpp @@ -21,14 +21,6 @@ using namespace Mastodon; using Attachment = Easy::Attachment; -Attachment::Attachment(const string &json) -: Entity(json) -{} - -Attachment::Attachment() -: Entity() -{} - bool Attachment::valid() const { const std::vector attributes = diff --git a/src/easy/entities/attachment.hpp b/src/easy/entities/attachment.hpp index 62d58eb..5e2fc85 100644 --- a/src/easy/entities/attachment.hpp +++ b/src/easy/entities/attachment.hpp @@ -44,21 +44,7 @@ namespace Mastodon class Easy::Attachment : public Easy::Entity { public: - /*! - * @brief Constructs an Attachment object from a JSON string. - * - * @param json JSON string - * - * @since before 0.11.0 - */ - explicit Attachment(const string &json); - - /*! - * @brief Constructs an empty Attachment object. - * - * @since before 0.11.0 - */ - Attachment(); + using Entity::Entity; virtual bool valid() const; diff --git a/src/easy/entities/card.cpp b/src/easy/entities/card.cpp index 615677e..0602fdd 100644 --- a/src/easy/entities/card.cpp +++ b/src/easy/entities/card.cpp @@ -20,14 +20,6 @@ using namespace Mastodon; using Card = Easy::Card; -Card::Card(const string &json) -: Entity(json) -{} - -Card::Card() -: Entity() -{} - bool Card::valid() const { const std::vector attributes = diff --git a/src/easy/entities/card.hpp b/src/easy/entities/card.hpp index aa7cf05..d4ee7c0 100644 --- a/src/easy/entities/card.hpp +++ b/src/easy/entities/card.hpp @@ -42,21 +42,7 @@ namespace Mastodon class Easy::Card : public Easy::Entity { public: - /*! - * @brief Constructs a Card object from a JSON string. - * - * @param json JSON string - * - * @since before 0.11.0 - */ - explicit Card(const string &json); - - /*! - * @brief Constructs an empty Card object. - * - * @since before 0.11.0 - */ - Card(); + using Entity::Entity; virtual bool valid() const; diff --git a/src/easy/entities/context.cpp b/src/easy/entities/context.cpp index 0303720..ebf855b 100644 --- a/src/easy/entities/context.cpp +++ b/src/easy/entities/context.cpp @@ -20,14 +20,6 @@ using namespace Mastodon; using Context = Easy::Context; -Context::Context(const string &json) -: Entity(json) -{} - -Context::Context() -: Entity() -{} - bool Context::valid() const { const std::vector attributes = diff --git a/src/easy/entities/context.hpp b/src/easy/entities/context.hpp index 2b390fd..6442fd4 100644 --- a/src/easy/entities/context.hpp +++ b/src/easy/entities/context.hpp @@ -43,21 +43,7 @@ namespace Mastodon class Easy::Context : public Easy::Entity { public: - /*! - * @brief Constructs a Context object from a JSON string. - * - * @param json JSON string - * - * @since before 0.11.0 - */ - explicit Context(const string &json); - - /*! - * @brief Constructs an empty Context object. - * - * @since before 0.11.0 - */ - Context(); + using Entity::Entity; virtual bool valid() const; diff --git a/src/easy/entities/emoji.cpp b/src/easy/entities/emoji.cpp index 44049b1..0a44afb 100644 --- a/src/easy/entities/emoji.cpp +++ b/src/easy/entities/emoji.cpp @@ -20,14 +20,6 @@ using namespace Mastodon; using Emoji = Easy::Emoji; -Emoji::Emoji(const string &json) -: Entity(json) -{} - -Emoji::Emoji() -: Entity() -{} - bool Emoji::valid() const { const std::vector attributes = diff --git a/src/easy/entities/emoji.hpp b/src/easy/entities/emoji.hpp index d1c9dcc..e1274d6 100644 --- a/src/easy/entities/emoji.hpp +++ b/src/easy/entities/emoji.hpp @@ -40,21 +40,7 @@ namespace Mastodon class Easy::Emoji : public Easy::Entity { public: - /*! - * @brief Constructs an Emoji object from a JSON string. - * - * @param json JSON string - * - * @since before 0.11.0 - */ - explicit Emoji(const string &json); - - /*! - * @brief Constructs an empty Emoji object. - * - * @since before 0.11.0 - */ - Emoji(); + using Entity::Entity; virtual bool valid() const; diff --git a/src/easy/entities/instance.cpp b/src/easy/entities/instance.cpp index bd2045d..fa12ba9 100644 --- a/src/easy/entities/instance.cpp +++ b/src/easy/entities/instance.cpp @@ -22,14 +22,6 @@ using namespace Mastodon; using Instance = Easy::Instance; -Instance::Instance(const string &json) -: Entity(json) -{} - -Instance::Instance() -: Entity() -{} - bool Instance::valid() const { const std::vector attributes = diff --git a/src/easy/entities/instance.hpp b/src/easy/entities/instance.hpp index 94b6f8d..c8a4ec3 100644 --- a/src/easy/entities/instance.hpp +++ b/src/easy/entities/instance.hpp @@ -45,21 +45,7 @@ namespace Mastodon class Easy::Instance : public Easy::Entity { public: - /*! - * @brief Constructs an Instance object from a JSON string. - * - * @param json JSON string - * - * @since before 0.11.0 - */ - explicit Instance(const string &json); - - /*! - * @brief Constructs an empty Instance object. - * - * @since before 0.11.0 - */ - Instance(); + using Entity::Entity; virtual bool valid() const; diff --git a/src/easy/entities/list.cpp b/src/easy/entities/list.cpp index c6ea2b6..38995a5 100644 --- a/src/easy/entities/list.cpp +++ b/src/easy/entities/list.cpp @@ -21,14 +21,6 @@ using List = Easy::List; using std::string; using std::uint64_t; -List::List(const string &json) -: Entity(json) -{} - -List::List() -: Entity() -{} - bool List::valid() const { const std::vector attributes = diff --git a/src/easy/entities/list.hpp b/src/easy/entities/list.hpp index 9f80ffa..9bbe7b4 100644 --- a/src/easy/entities/list.hpp +++ b/src/easy/entities/list.hpp @@ -43,21 +43,7 @@ namespace Mastodon class Easy::List : public Easy::Entity { public: - /*! - * @brief Constructs a List object from a JSON string. - * - * @param json JSON string - * - * @since before 0.11.0 - */ - explicit List(const string &json); - - /*! - * @brief Constructs an empty List object. - * - * @since before 0.11.0 - */ - List(); + using Entity::Entity; virtual bool valid() const; diff --git a/src/easy/entities/mention.cpp b/src/easy/entities/mention.cpp index 21cb9ac..b175b29 100644 --- a/src/easy/entities/mention.cpp +++ b/src/easy/entities/mention.cpp @@ -19,14 +19,6 @@ using namespace Mastodon; using Mention = Easy::Mention; -Mention::Mention(const string &json) -: Entity(json) -{} - -Mention::Mention() -: Entity() -{} - bool Mention::valid() const { const std::vector attributes = diff --git a/src/easy/entities/mention.hpp b/src/easy/entities/mention.hpp index 38792b8..7ba19a3 100644 --- a/src/easy/entities/mention.hpp +++ b/src/easy/entities/mention.hpp @@ -43,21 +43,7 @@ namespace Mastodon class Easy::Mention : public Easy::Entity { public: - /*! - * @brief Constructs a Mention object from a JSON string. - * - * @param json JSON string - * - * @since before 0.11.0 - */ - explicit Mention(const string &json); - - /*! - * @brief Constructs an empty Mention object. - * - * @since before 0.11.0 - */ - Mention(); + using Entity::Entity; virtual bool valid() const; diff --git a/src/easy/entities/notification.cpp b/src/easy/entities/notification.cpp index eec08e0..dba493e 100644 --- a/src/easy/entities/notification.cpp +++ b/src/easy/entities/notification.cpp @@ -20,14 +20,6 @@ using namespace Mastodon; using Notification = Easy::Notification; -Notification::Notification(const string &json) -: Entity(json) -{} - -Notification::Notification() -: Entity() -{} - bool Notification::valid() const { const std::vector attributes = diff --git a/src/easy/entities/notification.hpp b/src/easy/entities/notification.hpp index 7e7797d..58cec71 100644 --- a/src/easy/entities/notification.hpp +++ b/src/easy/entities/notification.hpp @@ -48,21 +48,7 @@ namespace Mastodon class Easy::Notification : public Easy::Entity { public: - /*! - * @brief Constructs a Notification object from a JSON string. - * - * @param json JSON string - * - * @since before 0.11.0 - */ - explicit Notification(const string &json); - - /*! - * @brief Constructs an empty Notification object. - * - * @since before 0.11.0 - */ - Notification(); + using Entity::Entity; virtual bool valid() const; diff --git a/src/easy/entities/pushsubscription.cpp b/src/easy/entities/pushsubscription.cpp index 8ea535d..1b36cbb 100644 --- a/src/easy/entities/pushsubscription.cpp +++ b/src/easy/entities/pushsubscription.cpp @@ -19,19 +19,11 @@ using namespace Mastodon; using PushSubscription = Easy::PushSubscription; -PushSubscription::PushSubscription(const string &json) -: Entity(json) -{} - const string PushSubscription::id() const { return get_string("id"); } -PushSubscription::PushSubscription() -: Entity() -{} - bool PushSubscription::valid() const { const std::vector attributes = diff --git a/src/easy/entities/pushsubscription.hpp b/src/easy/entities/pushsubscription.hpp index 20f62fd..f9278db 100644 --- a/src/easy/entities/pushsubscription.hpp +++ b/src/easy/entities/pushsubscription.hpp @@ -42,21 +42,7 @@ namespace Mastodon class Easy::PushSubscription : public Easy::Entity { public: - /*! - * @brief Constructs an PushSubscription object from a JSON string. - * - * @param json JSON string - * - * @since 0.14.0 - */ - explicit PushSubscription(const string &json); - - /*! - * @brief Constructs an empty PushSubscription object. - * - * @since 0.14.0 - */ - PushSubscription(); + using Entity::Entity; virtual bool valid() const; diff --git a/src/easy/entities/relationship.cpp b/src/easy/entities/relationship.cpp index 8a3f472..11fc717 100644 --- a/src/easy/entities/relationship.cpp +++ b/src/easy/entities/relationship.cpp @@ -19,14 +19,6 @@ using namespace Mastodon; using Relationship = Easy::Relationship; -Relationship::Relationship(const string &json) -: Entity(json) -{} - -Relationship::Relationship() -: Entity() -{} - bool Relationship::valid() const { const std::vector attributes = diff --git a/src/easy/entities/relationship.hpp b/src/easy/entities/relationship.hpp index 9b2642b..2a19fd2 100644 --- a/src/easy/entities/relationship.hpp +++ b/src/easy/entities/relationship.hpp @@ -42,21 +42,7 @@ namespace Mastodon class Easy::Relationship : public Easy::Entity { public: - /*! - * @brief Constructs a Relationship object from a JSON string. - * - * @param json JSON string - * - * @since before 0.11.0 - */ - explicit Relationship(const string &json); - - /*! - * @brief Constructs an empty Relationship object. - * - * @since before 0.11.0 - */ - Relationship(); + using Entity::Entity; virtual bool valid() const; diff --git a/src/easy/entities/report.cpp b/src/easy/entities/report.cpp index 296e901..2a16107 100644 --- a/src/easy/entities/report.cpp +++ b/src/easy/entities/report.cpp @@ -19,14 +19,6 @@ using namespace Mastodon; using Report = Easy::Report; -Report::Report(const string &json) -: Entity(json) -{} - -Report::Report() -: Entity() -{} - bool Report::valid() const { const std::vector attributes = diff --git a/src/easy/entities/report.hpp b/src/easy/entities/report.hpp index 195ae22..bd98e04 100644 --- a/src/easy/entities/report.hpp +++ b/src/easy/entities/report.hpp @@ -41,21 +41,7 @@ namespace Mastodon class Easy::Report : public Easy::Entity { public: - /*! - * @brief Constructs a Report object from a JSON string. - * - * @param json JSON string - * - * @since before 0.11.0 - */ - explicit Report(const string &json); - - /*! - * @brief Constructs an empty Report object. - * - * @since before 0.11.0 - */ - Report(); + using Entity::Entity; virtual bool valid() const; diff --git a/src/easy/entities/results.cpp b/src/easy/entities/results.cpp index 80ba6d0..4a21257 100644 --- a/src/easy/entities/results.cpp +++ b/src/easy/entities/results.cpp @@ -20,14 +20,6 @@ using namespace Mastodon; using Results = Easy::Results; -Results::Results(const string &json) -: Entity(json) -{} - -Results::Results() -: Entity() -{} - bool Results::valid() const { const std::vector attributes = diff --git a/src/easy/entities/results.hpp b/src/easy/entities/results.hpp index 8348e85..12d977a 100644 --- a/src/easy/entities/results.hpp +++ b/src/easy/entities/results.hpp @@ -47,21 +47,7 @@ namespace Mastodon class Easy::Results : public Easy::Entity { public: - /*! - * @brief Constructs a Results object from a JSON string. - * - * @param json JSON string - * - * @since before 0.11.0 - */ - explicit Results(const string &json); - - /*! - * @brief Constructs an empty Results object. - * - * @since before 0.11.0 - */ - Results(); + using Entity::Entity; virtual bool valid() const; diff --git a/src/easy/entities/status.cpp b/src/easy/entities/status.cpp index ef909bf..8ee6b42 100644 --- a/src/easy/entities/status.cpp +++ b/src/easy/entities/status.cpp @@ -21,14 +21,6 @@ using namespace Mastodon; using Status = Easy::Status; -Status::Status(const string &json) -: Entity(json) -{} - -Status::Status() -: Entity() -{} - bool Status::valid() const { const std::vector attributes = diff --git a/src/easy/entities/status.hpp b/src/easy/entities/status.hpp index 87ff53f..ebf4e73 100644 --- a/src/easy/entities/status.hpp +++ b/src/easy/entities/status.hpp @@ -59,21 +59,7 @@ namespace Mastodon class Easy::Status : public Easy::Entity { public: - /*! - * @brief Constructs a Status object from a JSON string. - * - * @param json JSON string - * - * @since before 0.11.0 - */ - explicit Status(const string &json); - - /*! - * @brief Constructs an empty Status object. - * - * @since before 0.11.0 - */ - Status(); + using Entity::Entity; virtual bool valid() const; diff --git a/src/easy/entities/tag.cpp b/src/easy/entities/tag.cpp index 03d5772..10472b2 100644 --- a/src/easy/entities/tag.cpp +++ b/src/easy/entities/tag.cpp @@ -22,14 +22,6 @@ using namespace Mastodon; using Tag = Easy::Tag; -Tag::Tag(const string &json) -: Entity(json) -{} - -Tag::Tag() -: Entity() -{} - bool Tag::valid() const { const std::vector attributes = @@ -68,15 +60,6 @@ const std::vector Tag::history() const return {}; } - -Tag::History::History(const string &json) -: Entity(json) -{} - -Tag::History::History() -: Entity() -{} - bool Tag::History::valid() const { const std::vector attributes = diff --git a/src/easy/entities/tag.hpp b/src/easy/entities/tag.hpp index 38ee360..fc591a8 100644 --- a/src/easy/entities/tag.hpp +++ b/src/easy/entities/tag.hpp @@ -52,21 +52,7 @@ namespace Mastodon class History : public Easy::Entity { public: - /*! - * @brief Constructs an Tag::History object from a JSON string. - * - * @param json JSON string - * - * @since 0.16.0 - */ - explicit History(const string &json); - - /*! - * @brief Constructs an empty Tag::History object. - * - * @since 0.16.0 - */ - History(); + using Entity::Entity; virtual bool valid() const; @@ -92,21 +78,7 @@ namespace Mastodon uint64_t uses(); }; - /*! - * @brief Constructs an Tag object from a JSON string. - * - * @param json JSON string - * - * @since before 0.11.0 - */ - explicit Tag(const string &json); - - /*! - * @brief Constructs an empty Tag object. - * - * @since before 0.11.0 - */ - Tag(); + using Entity::Entity; virtual bool valid() const;