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
+3 -3
View File
@@ -16,10 +16,10 @@ void UserTimeline::screenName(const std::string& _screenName) {
std::vector<CocoaTweet::API::Model::Tweet> UserTimeline::process(
std::weak_ptr<CocoaTweet::OAuth::OAuth1> _oauth) {
std::vector<CocoaTweet::API::Model::Tweet> tweet;
HttpGet::process(_oauth, [&tweet](const unsigned int _responseCode, const std::string& _rsv) {
auto json = nlohmann::json::parse(_rsv);
HttpGet::process(_oauth, [&tweet](const std::string& _rcv) {
auto json = nlohmann::json::parse(_rcv);
for (auto j : json) {
tweet.push_back(CocoaTweet::API::Model::Tweet::parse(_responseCode, j.dump()));
tweet.push_back(CocoaTweet::API::Model::Tweet::parse(j.dump()));
std::cout << j.dump() << std::endl;
}
});