This commit is contained in:
keita
2021-03-11 13:43:33 +09:00
parent a8614c3b7e
commit 9d90f01c9f
2 changed files with 25 additions and 23 deletions
+4 -2
View File
@@ -15,13 +15,15 @@ public:
MediaStore(const MediaStore&) = default; MediaStore(const MediaStore&) = default;
/// @brief constructor for create object from json response /// @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 unsigned int _responseCode : http status code which received when post
/// request
/// @param[in] const std::string& _json : received content from twitter endpoint /// @param[in] const std::string& _json : received content from twitter endpoint
MediaStore(const unsigned int _responseCode, const std::string& _json) MediaStore(const unsigned int _responseCode, const std::string& _json)
: MediaStore(MediaStore::parse(_responseCode, _json)) {} : MediaStore(MediaStore::parse(_responseCode, _json)) {}
/// @brief response parser for tweet object /// @brief response parser for tweet object
/// @param[in] const unsigned int _responseCode : http status code which received when post request /// @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[in] const std::string& _json : received content from twitter endpoint
/// @param[out] CocoaTweet::API::Model::Tweet /// @param[out] CocoaTweet::API::Model::Tweet
static MediaStore parse(const unsigned int _responseCode, const std::string& _json); static MediaStore parse(const unsigned int _responseCode, const std::string& _json);