APIのエントリーにFavoriteを追加した
This commit is contained in:
@@ -4,9 +4,14 @@ namespace CocoaTweet::API {
|
||||
API::API(CocoaTweet::OAuth::Key _key) {
|
||||
oauth_ = std::make_shared<CocoaTweet::OAuth::OAuth1>(_key);
|
||||
status_ = Statuses::Status(oauth_);
|
||||
favorite_ = Favorites::Favorite(oauth_);
|
||||
}
|
||||
|
||||
Statuses::Status API::status() const {
|
||||
return status_;
|
||||
}
|
||||
|
||||
Favorites::Favorite API::favorite() const {
|
||||
return favorite_;
|
||||
}
|
||||
} // namespace CocoaTweet::API
|
||||
@@ -2,6 +2,7 @@
|
||||
#define COCOATWEET_API_H_
|
||||
|
||||
#include "cocoatweet/api/status/status.h"
|
||||
#include "cocoatweet/api/favorite/favorite.h"
|
||||
#include "cocoatweet/oauth/oauth.h"
|
||||
|
||||
namespace CocoaTweet::API {
|
||||
@@ -9,9 +10,11 @@ class API {
|
||||
public:
|
||||
API(CocoaTweet::OAuth::Key _key);
|
||||
Statuses::Status status() const;
|
||||
Favorites::Favorite favorite() const;
|
||||
|
||||
private:
|
||||
Statuses::Status status_;
|
||||
Favorites::Favorite favorite_;
|
||||
std::shared_ptr<CocoaTweet::OAuth::OAuth1> oauth_;
|
||||
};
|
||||
} // namespace CocoaTweet::API
|
||||
|
||||
Reference in New Issue
Block a user