status/user_timelineを叩くやつの追加(#66)

This commit is contained in:
keita
2021-03-19 22:28:06 +09:00
parent 4d2eecc47d
commit 73e0b9f902
2 changed files with 10 additions and 1 deletions
+7
View File
@@ -2,6 +2,7 @@
#include "cocoatweet/api/status/update.h" #include "cocoatweet/api/status/update.h"
#include "cocoatweet/api/status/destroy.h" #include "cocoatweet/api/status/destroy.h"
#include "cocoatweet/api/status/retweet.h" #include "cocoatweet/api/status/retweet.h"
#include "cocoatweet/api/status/userTimeline.h"
namespace CocoaTweet::API::Statuses { namespace CocoaTweet::API::Statuses {
Status::Status(std::shared_ptr<CocoaTweet::OAuth::OAuth1> _oauth) { Status::Status(std::shared_ptr<CocoaTweet::OAuth::OAuth1> _oauth) {
@@ -77,4 +78,10 @@ CocoaTweet::API::Model::Tweet Status::Retweet(const std::string& _id) const{
retweet.id(_id); retweet.id(_id);
return retweet.process(oauth_); return retweet.process(oauth_);
} }
std::vector<CocoaTweet::API::Model::Tweet> Status::UserTimeline(const std::string& _screenName) const{
CocoaTweet::API::Statuses::UserTimeline userTimeline;
userTimeline.screenName(_screenName);
return userTimeline.process(oauth_);
}
} // namespace CocoaTweet::API::Statuses } // namespace CocoaTweet::API::Statuses
+2
View File
@@ -62,6 +62,8 @@ public:
CocoaTweet::API::Model::Tweet Retweet(const std::string& _id) const; CocoaTweet::API::Model::Tweet Retweet(const std::string& _id) const;
std::vector<CocoaTweet::API::Model::Tweet> UserTimeline(const std::string& _screenName) const;
private: private:
Options defaultOpt_; Options defaultOpt_;
}; };