めんどくさくなったから一括でコミットするけど許してくれ
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "cocoatweet/api/status/destroy.h"
|
||||
#include <cocoatweet/api/model/tweet.h>
|
||||
#include <iostream>
|
||||
namespace CocoaTweet::API::Statuses {
|
||||
Destroy::Destroy() {}
|
||||
@@ -8,8 +9,11 @@ void Destroy::id(const std::string _id) {
|
||||
}
|
||||
|
||||
void Destroy::process(std::weak_ptr<CocoaTweet::OAuth::OAuth1> _oauth) {
|
||||
HttpPost::process(_oauth,
|
||||
[](const std::string& _srv) { std::cout << _srv << std::endl; });
|
||||
CocoaTweet::API::Model::Tweet tweet;
|
||||
HttpPost::process(_oauth, [&tweet](const std::string& _srv) {
|
||||
tweet = CocoaTweet::API::Model::Tweet::parse(100, _srv);
|
||||
});
|
||||
std::cout << "afw" << std::endl;
|
||||
}
|
||||
|
||||
} // namespace CocoaTweet::API::Statuses
|
||||
|
||||
@@ -2,15 +2,23 @@
|
||||
#define COCOATWEET_API_STATUSES_DESTROY_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "cocoatweet/api/interface/httpPost.h"
|
||||
//#include "cocoatweet/oauth/oauth.h"
|
||||
#include <cocoatweet/api/interface/httpPost.h>
|
||||
|
||||
namespace CocoaTweet::API::Statuses {
|
||||
/// @brief class for using status/destroy:id endpoint
|
||||
class Destroy : public CocoaTweet::API::Interface::HttpPost {
|
||||
public:
|
||||
/// @brief primary constructor
|
||||
Destroy();
|
||||
|
||||
/// @brief set tweet id to destroy
|
||||
/// @param[in] std::string _id : tweet id which should be destroy
|
||||
/// @param[out] none
|
||||
void id(const std::string _id);
|
||||
|
||||
/// @brief process request for endpoint
|
||||
/// @param[in] std::weak_ptr<CocoaTweet::OAuth::OAuth1> _oauth : pointer to oauth object
|
||||
/// @param[out] none
|
||||
void process(std::weak_ptr<CocoaTweet::OAuth::OAuth1> _oauth);
|
||||
};
|
||||
} // namespace CocoaTweet::API::Statuses
|
||||
|
||||
@@ -12,8 +12,7 @@ void Update::status(const std::string _status) {
|
||||
}
|
||||
|
||||
void Update::process(std::weak_ptr<CocoaTweet::OAuth::OAuth1> _oauth) {
|
||||
HttpPost::process(_oauth,
|
||||
[](const std::string& _srv) { std::cout << _srv << std::endl; });
|
||||
HttpPost::process(_oauth, [](const std::string& _srv) { std::cout << _srv << std::endl; });
|
||||
}
|
||||
|
||||
} // namespace CocoaTweet::API::Statuses
|
||||
|
||||
Reference in New Issue
Block a user