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