RTを叩くやつをstatusグループに統合(#65)

This commit is contained in:
keita
2021-03-14 23:17:59 +09:00
parent 33cb1f3e18
commit 8a06e436ab
2 changed files with 10 additions and 0 deletions
+7
View File
@@ -1,6 +1,7 @@
#include "cocoatweet/api/status/status.h"
#include "cocoatweet/api/status/update.h"
#include "cocoatweet/api/status/destroy.h"
#include "cocoatweet/api/status/retweet.h"
namespace CocoaTweet::API::Statuses {
Status::Status(std::shared_ptr<CocoaTweet::OAuth::OAuth1> _oauth) {
@@ -70,4 +71,10 @@ CocoaTweet::API::Model::Tweet Status::Destroy(const std::string& _id) const {
destroy.id(_id);
return destroy.process(oauth_);
}
CocoaTweet::API::Model::Tweet Status::Retweet(const std::string& _id) const{
CocoaTweet::API::Statuses::Retweet retweet;
retweet.id(_id);
return retweet.process(oauth_);
}
} // namespace CocoaTweet::API::Statuses
+3
View File
@@ -6,6 +6,7 @@
#include <cocoatweet/api/model/tweet.h>
#include <vector>
#include <utility>
namespace CocoaTweet::API::Statuses {
/// @brief Entory point for statuses/*
@@ -59,6 +60,8 @@ public:
/// @param[out] CocoaTweet::API::Model::Tweet : Destroy result
CocoaTweet::API::Model::Tweet Destroy(const std::string& _id) const;
CocoaTweet::API::Model::Tweet Retweet(const std::string& _id) const;
private:
Options defaultOpt_;
};