Model::TweetからHttpPostにエラーハンドリングを移動した(#67)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user