validate
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#ifndef COCOATWEET_API_H_
|
||||
#define COCOATWEET_API_H_
|
||||
#ifndef COCOATWEET_API_API_H_
|
||||
#define COCOATWEET_API_API_H_
|
||||
|
||||
#include <cocoatweet/api/status/status.h>
|
||||
#include <cocoatweet/api/favorite/favorite.h>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef COCOATWEET_API_GROUPINTERFACE_H_
|
||||
#define COCOATWEET_API_GROUPINTERFACE_H_
|
||||
#ifndef COCOATWEET_API_INTERFACE_GROUPINTERFACE_H_
|
||||
#define COCOATWEET_API_INTERFACE_GROUPINTERFACE_H_
|
||||
|
||||
#include <memory>
|
||||
#include "cocoatweet/oauth/oauth.h"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef COCOATWEET_API_INTERFACE_POSTINTERFACE_H_
|
||||
#define COCOATWEET_API_INTERFACE_POSTINTERFACE_H_
|
||||
#ifndef COCOATWEET_API_INTERFACE_HTTPPOST_H_
|
||||
#define COCOATWEET_API_INTERFACE_HTTPPOST_H_
|
||||
|
||||
#include <functional>
|
||||
#include "cocoatweet/oauth/oauth.h"
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef COCOATWEET_API_STATUSES_DESTROY_H_
|
||||
#define COCOATWEET_API_STATUSES_DESTROY_H_
|
||||
#ifndef COCOATWEET_API_STATUS_DESTROY_H_
|
||||
#define COCOATWEET_API_STATUS_DESTROY_H_
|
||||
|
||||
#include <memory>
|
||||
#include <cocoatweet/api/interface/httpPost.h>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef COCOATWEET_API_STATUSED_H_
|
||||
#define COCOATWEET_API_STATUSED_H_
|
||||
#ifndef COCOATWEET_API_STATUS_STATUS_H_
|
||||
#define COCOATWEET_API_STATUS_STATUS_H_
|
||||
|
||||
#include "cocoatweet/api/interface/groupInterface.h"
|
||||
#include "cocoatweet/oauth/oauth.h"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef COCOATWEET_API_STATUSES_UPDATE_H_
|
||||
#define COCOATWEET_API_STATUSES_UPDATE_H_
|
||||
#ifndef COCOATWEET_API_STATUS_UPDATE_H_
|
||||
#define COCOATWEET_API_STATUS_UPDATE_H_
|
||||
|
||||
#include <memory>
|
||||
#include <cocoatweet/api/interface/httpPost.h>
|
||||
|
||||
Reference in New Issue
Block a user