整形も兼ねてテストcommit

This commit is contained in:
keita
2021-02-25 17:14:33 +09:00
parent 24c067742b
commit 0beb522359
7 changed files with 24 additions and 17 deletions
+7 -5
View File
@@ -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<CocoaTweet::OAuth::OAuth1> _oauth) {
CocoaTweet::API::Model::Tweet Destroy::process(
std::weak_ptr<CocoaTweet::OAuth::OAuth1> _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
+2 -2
View File
@@ -10,8 +10,8 @@ class Status : public groupInterface {
public:
Status() = default;
Status(std::shared_ptr<CocoaTweet::OAuth::OAuth1> _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:
};
+6 -5
View File
@@ -13,11 +13,12 @@ void Update::status(const std::string _status) {
}
CocoaTweet::API::Model::Tweet Update::process(std::weak_ptr<CocoaTweet::OAuth::OAuth1> _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
+1 -1
View File
@@ -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<CocoaTweet::OAuth::OAuth1> _oauth);
CocoaTweet::API::Model::Tweet process(std::weak_ptr<CocoaTweet::OAuth::OAuth1> _oauth);
private:
std::string status_;