diff --git a/src/cocoatweet/api/favorite/create.cc b/src/cocoatweet/api/favorite/create.cc index cf65ae1..ece7181 100644 --- a/src/cocoatweet/api/favorite/create.cc +++ b/src/cocoatweet/api/favorite/create.cc @@ -11,6 +11,8 @@ void Create::id(const std::string& _id) { } void Create::process(std::weak_ptr _oauth) { - HttpPost::process(_oauth, [](const unsigned int _, const std::string& _srv) { std::cout << _srv << std::endl; }); + HttpPost::process(_oauth, [](const unsigned int _, const std::string& _srv) { + std::cout << _srv << std::endl; + }); } } // namespace CocoaTweet::API::Favorites diff --git a/src/cocoatweet/api/favorite/destroy.cc b/src/cocoatweet/api/favorite/destroy.cc index 2d55da4..dac36fa 100644 --- a/src/cocoatweet/api/favorite/destroy.cc +++ b/src/cocoatweet/api/favorite/destroy.cc @@ -11,6 +11,8 @@ void Destroy::id(const std::string& _id) { } void Destroy::process(std::weak_ptr _oauth) { - HttpPost::process(_oauth, [](const unsigned int _,const std::string& _srv) { std::cout << _srv << std::endl; }); + HttpPost::process(_oauth, [](const unsigned int _, const std::string& _srv) { + std::cout << _srv << std::endl; + }); } } // namespace CocoaTweet::API::Favorites diff --git a/src/cocoatweet/api/interface/httpPost.cc b/src/cocoatweet/api/interface/httpPost.cc index c1b0421..d320ce3 100644 --- a/src/cocoatweet/api/interface/httpPost.cc +++ b/src/cocoatweet/api/interface/httpPost.cc @@ -60,7 +60,7 @@ void HttpPost::process(std::weak_ptr _oauth, CURL* curl; CURLcode res; std::string rcv; - long responseCode; + long responseCode; curl = curl_easy_init(); url_ = url_; std::cout << "URL : " << url_ << std::endl; @@ -78,7 +78,7 @@ void HttpPost::process(std::weak_ptr _oauth, headers = curl_slist_append(headers, oauthHeader.c_str()); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); res = curl_easy_perform(curl); - curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &responseCode); + curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &responseCode); curl_easy_cleanup(curl); } diff --git a/src/cocoatweet/api/status/destroy.cc b/src/cocoatweet/api/status/destroy.cc index e8d89d8..257e8fb 100644 --- a/src/cocoatweet/api/status/destroy.cc +++ b/src/cocoatweet/api/status/destroy.cc @@ -8,12 +8,14 @@ void Destroy::id(const std::string _id) { url_ = "https://api.twitter.com/1.1/statuses/destroy/" + _id + ".json"; } -CocoaTweet::API::Model::Tweet Destroy::process(std::weak_ptr _oauth) { +CocoaTweet::API::Model::Tweet Destroy::process( + std::weak_ptr _oauth) { CocoaTweet::API::Model::Tweet tweet; - HttpPost::process(_oauth, [&tweet](const unsigned int _responseCode, const std::string& _rsv) { - tweet = CocoaTweet::API::Model::Tweet::parse(_responseCode, _rsv); - }); - return tweet; + HttpPost::process(_oauth, + [&tweet](const unsigned int _responseCode, const std::string& _rsv) { + tweet = CocoaTweet::API::Model::Tweet::parse(_responseCode, _rsv); + }); + return tweet; } } // namespace CocoaTweet::API::Statuses diff --git a/src/cocoatweet/api/status/status.h b/src/cocoatweet/api/status/status.h index 282583b..11f4e20 100644 --- a/src/cocoatweet/api/status/status.h +++ b/src/cocoatweet/api/status/status.h @@ -10,8 +10,8 @@ class Status : public groupInterface { public: Status() = default; Status(std::shared_ptr _oauth); - CocoaTweet::API::Model::Tweet Update(const std::string& _status) const; - CocoaTweet::API::Model::Tweet Destroy(const std::string& _id) const; + CocoaTweet::API::Model::Tweet Update(const std::string& _status) const; + CocoaTweet::API::Model::Tweet Destroy(const std::string& _id) const; private: }; diff --git a/src/cocoatweet/api/status/update.cc b/src/cocoatweet/api/status/update.cc index 4a1f88b..af6e04b 100644 --- a/src/cocoatweet/api/status/update.cc +++ b/src/cocoatweet/api/status/update.cc @@ -13,11 +13,12 @@ void Update::status(const std::string _status) { } CocoaTweet::API::Model::Tweet Update::process(std::weak_ptr _oauth) { - CocoaTweet::API::Model::Tweet tweet; - HttpPost::process(_oauth, [&tweet](const unsigned int _responseCode, const std::string& _rsv) { - tweet = CocoaTweet::API::Model::Tweet::parse(_responseCode, _rsv); - }); - return tweet; + CocoaTweet::API::Model::Tweet tweet; + HttpPost::process(_oauth, + [&tweet](const unsigned int _responseCode, const std::string& _rsv) { + tweet = CocoaTweet::API::Model::Tweet::parse(_responseCode, _rsv); + }); + return tweet; } } // namespace CocoaTweet::API::Statuses diff --git a/src/cocoatweet/api/status/update.h b/src/cocoatweet/api/status/update.h index 529bb90..aa2b714 100644 --- a/src/cocoatweet/api/status/update.h +++ b/src/cocoatweet/api/status/update.h @@ -10,7 +10,7 @@ class Update : public CocoaTweet::API::Interface::HttpPost { public: Update(); void status(const std::string _status); - CocoaTweet::API::Model::Tweet process(std::weak_ptr _oauth); + CocoaTweet::API::Model::Tweet process(std::weak_ptr _oauth); private: std::string status_;