Changed ids from uint_fast64_t to const string in all Entities.
This commit is contained in:
parent
e2614c045e
commit
0b47e0ec8d
|
@ -154,9 +154,9 @@ const string Account::header_static() const
|
||||||
return get_string("header_static");
|
return get_string("header_static");
|
||||||
}
|
}
|
||||||
|
|
||||||
std::uint_fast64_t Account::id() const
|
const string Account::id() const
|
||||||
{
|
{
|
||||||
return stouint64(get_string("id"));
|
return get_string("id");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Account::locked() const
|
bool Account::locked() const
|
||||||
|
|
|
@ -188,7 +188,7 @@ namespace Mastodon
|
||||||
*
|
*
|
||||||
* @since before 0.11.0
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
uint_fast64_t id() const;
|
const string id() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns true if the account is locked
|
* @brief Returns true if the account is locked
|
||||||
|
|
|
@ -139,9 +139,9 @@ uint_fast64_t Attachment::height_small() const
|
||||||
return get_uint64("meta.small.height");
|
return get_uint64("meta.small.height");
|
||||||
}
|
}
|
||||||
|
|
||||||
std::uint_fast64_t Attachment::id() const
|
const string Attachment::id() const
|
||||||
{
|
{
|
||||||
return stouint64(get_string("id"));
|
return get_string("id");
|
||||||
}
|
}
|
||||||
|
|
||||||
const string Attachment::preview_url() const
|
const string Attachment::preview_url() const
|
||||||
|
|
|
@ -164,7 +164,7 @@ namespace Mastodon
|
||||||
*
|
*
|
||||||
* @since before 0.11.0
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
uint_fast64_t id() const;
|
const string id() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the URL of the preview image
|
* @brief Returns the URL of the preview image
|
||||||
|
|
|
@ -40,9 +40,9 @@ bool List::valid() const
|
||||||
return Entity::check_valid(attributes);
|
return Entity::check_valid(attributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint_fast64_t List::id() const
|
const string List::id() const
|
||||||
{
|
{
|
||||||
return stouint64(get_string("id"));
|
return get_string("id");
|
||||||
}
|
}
|
||||||
|
|
||||||
const string List::title() const
|
const string List::title() const
|
||||||
|
|
|
@ -66,7 +66,7 @@ namespace Mastodon
|
||||||
*
|
*
|
||||||
* @since before 0.11.0
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
uint_fast64_t id() const;
|
const string id() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns title
|
* @brief Returns title
|
||||||
|
|
|
@ -45,9 +45,9 @@ const string Mention::acct() const
|
||||||
return get_string("acct");
|
return get_string("acct");
|
||||||
}
|
}
|
||||||
|
|
||||||
uint_fast64_t Mention::id() const
|
const string Mention::id() const
|
||||||
{
|
{
|
||||||
return stouint64(get_string("id"));
|
return get_string("id");
|
||||||
}
|
}
|
||||||
|
|
||||||
const string Mention::url() const
|
const string Mention::url() const
|
||||||
|
|
|
@ -73,7 +73,7 @@ namespace Mastodon
|
||||||
*
|
*
|
||||||
* @since before 0.11.0
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
uint_fast64_t id() const;
|
const string id() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the URL of user's profile
|
* @brief Returns the URL of user's profile
|
||||||
|
|
|
@ -58,7 +58,7 @@ const system_clock::time_point Notification::created_at() const
|
||||||
return get_time_point("created_at");
|
return get_time_point("created_at");
|
||||||
}
|
}
|
||||||
|
|
||||||
uint_fast64_t Notification::id() const
|
const string Notification::id() const
|
||||||
{
|
{
|
||||||
return stouint64(get_string("id"));
|
return stouint64(get_string("id"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,7 +85,7 @@ namespace Mastodon
|
||||||
*
|
*
|
||||||
* @since before 0.11.0
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
uint_fast64_t id() const;
|
const string id() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the Status associated with the notification, if
|
* @brief Returns the Status associated with the notification, if
|
||||||
|
|
|
@ -23,9 +23,9 @@ PushSubscription::PushSubscription(const string &json)
|
||||||
: Entity(json)
|
: Entity(json)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
uint_fast64_t PushSubscription::id() const
|
const string PushSubscription::id() const
|
||||||
{
|
{
|
||||||
return stouint64(get_string("id"));
|
return get_string("id");
|
||||||
}
|
}
|
||||||
|
|
||||||
PushSubscription::PushSubscription()
|
PushSubscription::PushSubscription()
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
using std::string;
|
using std::string;
|
||||||
using std::uint_fast64_t;
|
|
||||||
|
|
||||||
namespace Mastodon
|
namespace Mastodon
|
||||||
{
|
{
|
||||||
|
@ -66,7 +65,7 @@ namespace Mastodon
|
||||||
*
|
*
|
||||||
* @since 0.14.0
|
* @since 0.14.0
|
||||||
*/
|
*/
|
||||||
uint_fast64_t id() const;
|
const string id() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the endpoint URL
|
* @brief Returns the endpoint URL
|
||||||
|
|
|
@ -69,9 +69,9 @@ bool Relationship::following() const
|
||||||
return get_bool("following");
|
return get_bool("following");
|
||||||
}
|
}
|
||||||
|
|
||||||
uint_fast64_t Relationship::id() const
|
const string Relationship::id() const
|
||||||
{
|
{
|
||||||
return stouint64(get_string("id"));
|
return get_string("id");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Relationship::muting() const
|
bool Relationship::muting() const
|
||||||
|
|
|
@ -100,7 +100,7 @@ namespace Mastodon
|
||||||
*
|
*
|
||||||
* @since before 0.11.0
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
uint_fast64_t id() const;
|
const string id() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns true if the user is muting the account
|
* @brief Returns true if the user is muting the account
|
||||||
|
|
|
@ -43,8 +43,8 @@ bool Report::action_taken() const
|
||||||
return get_bool("action_taken");
|
return get_bool("action_taken");
|
||||||
}
|
}
|
||||||
|
|
||||||
uint_fast64_t Report::id() const
|
const string Report::id() const
|
||||||
{
|
{
|
||||||
return stouint64(get_string("id"));
|
return get_string("id");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
using std::string;
|
using std::string;
|
||||||
using std::uint_fast64_t;
|
|
||||||
|
|
||||||
namespace Mastodon
|
namespace Mastodon
|
||||||
{
|
{
|
||||||
|
@ -73,7 +72,7 @@ namespace Mastodon
|
||||||
*
|
*
|
||||||
* @since before 0.11.0
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
uint_fast64_t id() const;
|
const string id() const;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -127,25 +127,25 @@ uint_fast64_t Status::favourites_count() const
|
||||||
return get_uint64("favourites_count");
|
return get_uint64("favourites_count");
|
||||||
}
|
}
|
||||||
|
|
||||||
uint_fast64_t Status::id() const
|
const string Status::id() const
|
||||||
{
|
{
|
||||||
return stouint64(get_string("id"));
|
return get_string("id");
|
||||||
}
|
}
|
||||||
|
|
||||||
uint_fast64_t Status::in_reply_to_id() const
|
const string Status::in_reply_to_id() const
|
||||||
{
|
{
|
||||||
return stouint64(get_string("in_reply_to_id"));
|
return get_string("in_reply_to_id");
|
||||||
}
|
}
|
||||||
|
|
||||||
Status Status::in_reply_to_id(const uint_fast64_t &in_reply_to_id)
|
Status Status::in_reply_to_id(const string &in_reply_to_id)
|
||||||
{
|
{
|
||||||
set("in_reply_to_id", Json::Value(std::to_string(in_reply_to_id)));
|
set("in_reply_to_id", Json::Value(in_reply_to_id));
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint_fast64_t Status::in_reply_to_account_id() const
|
const string Status::in_reply_to_account_id() const
|
||||||
{
|
{
|
||||||
return stouint64(get_string("in_reply_to_account_id"));
|
return get_string("in_reply_to_account_id");
|
||||||
}
|
}
|
||||||
|
|
||||||
const string Status::language() const
|
const string Status::language() const
|
||||||
|
|
|
@ -145,28 +145,28 @@ namespace Mastodon
|
||||||
*
|
*
|
||||||
* @since before 0.11.0
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
uint_fast64_t id() const;
|
const string id() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the ID of the status it replies to
|
* @brief Returns the ID of the status it replies to
|
||||||
*
|
*
|
||||||
* @since before 0.11.0
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
uint_fast64_t in_reply_to_id() const;
|
const string in_reply_to_id() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Sets the ID of the status it replies to
|
* @brief Sets the ID of the status it replies to
|
||||||
*
|
*
|
||||||
* @since 0.17.0
|
* @since 0.17.0
|
||||||
*/
|
*/
|
||||||
Status in_reply_to_id(const uint_fast64_t &in_reply_to_id);
|
Status in_reply_to_id(const string &in_reply_to_id);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the ID of the account it replies to
|
* @brief Returns the ID of the account it replies to
|
||||||
*
|
*
|
||||||
* @since before 0.11.0
|
* @since before 0.11.0
|
||||||
*/
|
*/
|
||||||
uint_fast64_t in_reply_to_account_id() const;
|
const string in_reply_to_account_id() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the language of the status
|
* @brief Returns the language of the status
|
||||||
|
|
Reference in New Issue