statuses/destroyを叩くやつを反映した

また,CocoaTweet::Util::join()を使用するようにした
This commit is contained in:
keita
2021-02-18 18:38:01 +09:00
parent d6a277f8fe
commit 68d6d478c6
6 changed files with 47 additions and 18 deletions
+7
View File
@@ -2,6 +2,7 @@
#include "cocoatweet/api/status/status.h"
#include "cocoatweet/api/status/update.h"
#include "cocoatweet/api/status/destroy.h"
namespace CocoaTweet::API::Statuses {
Status::Status(std::shared_ptr<CocoaTweet::OAuth::OAuth1> _oauth) {
@@ -13,4 +14,10 @@ void Status::Update(const std::string& _status) const {
update.status(_status);
update.process(oauth_, [](std::string _rcv) { std::cout << _rcv << std::endl; });
}
void Status::Destroy(const std::string& _id) const {
CocoaTweet::API::Statuses::Destroy destroy;
destroy.id(_id);
destroy.process(oauth_, [](std::string _rcv) { std::cout << _rcv << std::endl; });
}
} // namespace CocoaTweet::API::Statuses
+1
View File
@@ -10,6 +10,7 @@ public:
Status() = default;
Status(std::shared_ptr<CocoaTweet::OAuth::OAuth1> _oauth);
void Update(const std::string& _status) const;
void Destroy(const std::string& _id) const;
private:
};