format
This commit is contained in:
@@ -12,4 +12,4 @@ namespace CocoaTweet::API::DirectMessages{
|
|||||||
dm.message(_message);
|
dm.message(_message);
|
||||||
dm.process(oauth_);
|
dm.process(oauth_);
|
||||||
}
|
}
|
||||||
}
|
} // namespace CocoaTweet::API::DirectMessages
|
||||||
@@ -19,8 +19,9 @@ public:
|
|||||||
DirectMessage(std::shared_ptr<CocoaTweet::OAuth::OAuth1> _oauth);
|
DirectMessage(std::shared_ptr<CocoaTweet::OAuth::OAuth1> _oauth);
|
||||||
|
|
||||||
void messageCreate(const std::string& _recipient, const std::string& _message);
|
void messageCreate(const std::string& _recipient, const std::string& _message);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
};
|
};
|
||||||
} // namespace CocoaTweet::API::Statuses
|
} // namespace CocoaTweet::API::DirectMessages
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ namespace CocoaTweet::API::DirectMessages{
|
|||||||
json_["event"] = tmp;
|
json_["event"] = tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void New::recipient(const std::string& _id) {
|
void New::recipient(const std::string& _id) {
|
||||||
json_["event"]["message_create"]["target"]["recipient_id"] = std::stol(_id);
|
json_["event"]["message_create"]["target"]["recipient_id"] = std::stol(_id);
|
||||||
}
|
}
|
||||||
@@ -28,4 +27,4 @@ namespace CocoaTweet::API::DirectMessages{
|
|||||||
bodyParam_.insert_or_assign("data", json_.dump());
|
bodyParam_.insert_or_assign("data", json_.dump());
|
||||||
HttpPost::process(_oauth, [](const std::string& _rcv) {});
|
HttpPost::process(_oauth, [](const std::string& _rcv) {});
|
||||||
}
|
}
|
||||||
}
|
} // namespace CocoaTweet::API::DirectMessages
|
||||||
@@ -16,8 +16,6 @@ public:
|
|||||||
void recipient(const std::string& _id);
|
void recipient(const std::string& _id);
|
||||||
void message(const std::string& _message);
|
void message(const std::string& _message);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// @brief process request for endpoint
|
/// @brief process request for endpoint
|
||||||
/// @param[in] std::weak_ptr<CocoaTweet::OAuth::OAuth1> _oauth : pointer to oauth object
|
/// @param[in] std::weak_ptr<CocoaTweet::OAuth::OAuth1> _oauth : pointer to oauth object
|
||||||
/// @param[out] CocoaTweet::API::Model::Tweet : request result
|
/// @param[out] CocoaTweet::API::Model::Tweet : request result
|
||||||
@@ -27,6 +25,6 @@ private:
|
|||||||
std::string status_;
|
std::string status_;
|
||||||
nlohmann::json json_;
|
nlohmann::json json_;
|
||||||
};
|
};
|
||||||
} // namespace CocoaTweet::API::Statuses
|
} // namespace CocoaTweet::API::DirectMessages
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user