Model::TweetからHttpPostにエラーハンドリングを移動した(#67)

This commit is contained in:
keita
2021-03-19 22:55:34 +09:00
parent 73e0b9f902
commit 9413cd8ce2
20 changed files with 107 additions and 122 deletions
+2 -7
View File
@@ -15,18 +15,13 @@ public:
MediaStore(const MediaStore&) = default;
/// @brief constructor for create object from json response
/// @param[in] const unsigned int _responseCode : http status code which received when post
/// request
/// @param[in] const std::string& _json : received content from twitter endpoint
MediaStore(const unsigned int _responseCode, const std::string& _json)
: MediaStore(MediaStore::parse(_responseCode, _json)) {}
MediaStore(const std::string& _json) : MediaStore(MediaStore::parse(_json)) {}
/// @brief response parser for MediaStore object
/// @param[in] const unsigned int _responseCode : http status code which received when post
/// request
/// @param[in] const std::string& _json : received content from twitter endpoint
/// @param[out] CocoaTweet::API::Model::MediaStore
static MediaStore parse(const unsigned int _responseCode, const std::string& _json);
static MediaStore parse(const std::string& _json);
/// @brief set id of tweet
/// @param[in] const std::string _id : media id to set