Inherit constructors from Entity.
This commit is contained in:
parent
1f36568b20
commit
e07dc45184
|
@ -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<string> attributes =
|
||||
|
|
|
@ -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<const string, const string>;
|
||||
|
||||
/*!
|
||||
* @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;
|
||||
|
||||
/*!
|
||||
|
|
|
@ -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"});
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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<string> attributes =
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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<string> attributes =
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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<string> attributes =
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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<string> attributes =
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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<string> attributes =
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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<string> attributes =
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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<string> attributes =
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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<string> attributes =
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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<string> attributes =
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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<string> attributes =
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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<string> attributes =
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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<string> attributes =
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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<string> attributes =
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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<string> attributes =
|
||||
|
@ -68,15 +60,6 @@ const std::vector<Tag::History> Tag::history() const
|
|||
return {};
|
||||
}
|
||||
|
||||
|
||||
Tag::History::History(const string &json)
|
||||
: Entity(json)
|
||||
{}
|
||||
|
||||
Tag::History::History()
|
||||
: Entity()
|
||||
{}
|
||||
|
||||
bool Tag::History::valid() const
|
||||
{
|
||||
const std::vector<string> attributes =
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Reference in New Issue