validate
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include <cocoatweet/api/model/tweet.h>
|
||||
#include <cocoatweet/exception/tweetNotFoundException.h>
|
||||
#include <cocoatweet/exception/authenticateException.h>
|
||||
#include "nlohmann/json.hpp"
|
||||
|
||||
#include <iostream>
|
||||
@@ -16,6 +17,8 @@ Tweet Tweet::parse(const unsigned int _responseCode, const std::string& _json) {
|
||||
auto message = j["errors"][0]["message"];
|
||||
if (error.get<int>() == 144) {
|
||||
throw CocoaTweet::Exception::TweetNotFoundException(message.get<std::string>().c_str());
|
||||
}else if(errot.get<int>() == 32){
|
||||
throw CocoaTweet::Exception::AuthenticateFoundException(message.get<std::string>().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user