status.h
Go to the documentation of this file.
#ifndef COCOATWEET_API_STATUS_STATUS_H_
#define COCOATWEET_API_STATUS_STATUS_H_
#include "cocoatweet/api/interface/groupInterface.h"
#include "cocoatweet/oauth/oauth.h"
#include <cocoatweet/api/model/tweet.h>
#include <vector>
#include <utility>
namespace CocoaTweet::API::Statuses {
class Status : public groupInterface {
public:
struct Options {
std::string replyToStatusId;
bool autoPopulateReplyMetaData = false;
std::vector<std::string> excludeReplyUserId;
std::string attachmentUrl;
std::pair<std::string, std::string> coord;
bool displayCoord = false;
bool trimUser = false;
bool enableDMCommands = false;
bool failDMCommands = true;
};
Status() = default;
Status(std::shared_ptr<CocoaTweet::OAuth::OAuth1> _oauth);
CocoaTweet::API::Model::Tweet update(const std::string& _status) const;
CocoaTweet::API::Model::Tweet update(const std::string& _status,
const Options _options) const;
CocoaTweet::API::Model::Tweet update(const std::string& _status,
std::vector<std::string> _mediaId) const;
CocoaTweet::API::Model::Tweet destroy(const std::string& _id) const;
CocoaTweet::API::Model::Tweet retweet(const std::string& _id) const;
CocoaTweet::API::Model::Tweet unretweet(const std::string& _id) const;
std::vector<CocoaTweet::API::Model::Tweet> userTimeline(const std::string& _screenName) const;
private:
Options defaultOpt_;
};
} // namespace CocoaTweet::API::Statuses
#endif
groupInterface.h
CocoaTweet::API::Statuses::Status::Options::coord
std::pair< std::string, std::string > coord
Definition: status.h:20
CocoaTweet::API::Statuses::Status::unretweet
CocoaTweet::API::Model::Tweet unretweet(const std::string &_id) const
Definition: status.cc:83
CocoaTweet::API::Model::Tweet
data class for tweet object
Definition: tweet.h:10
CocoaTweet::API::Statuses::Status::Options::excludeReplyUserId
std::vector< std::string > excludeReplyUserId
Definition: status.h:18
CocoaTweet::API::groupInterface
Definition: groupInterface.h:8
tweet.h
CocoaTweet::API::Statuses::Status::Options::autoPopulateReplyMetaData
bool autoPopulateReplyMetaData
Definition: status.h:17
CocoaTweet::API::Statuses::Status::Options::failDMCommands
bool failDMCommands
Definition: status.h:24
CocoaTweet::API::Statuses::Status::update
CocoaTweet::API::Model::Tweet update(const std::string &_status) const
send request to statuses/update with specified status
Definition: status.cc:13
CocoaTweet::API::Statuses::Status::userTimeline
std::vector< CocoaTweet::API::Model::Tweet > userTimeline(const std::string &_screenName) const
Definition: status.cc:89
CocoaTweet::API::Statuses::Status::Status
Status()=default
primary constructor to allow for create NON-INITIALIZED object
CocoaTweet::API::Statuses::Status::Options
Definition: status.h:15
CocoaTweet::API::Statuses::Status::Options::displayCoord
bool displayCoord
Definition: status.h:21
CocoaTweet::API::Statuses::Status
Entory point for statuses/*.
Definition: status.h:13
CocoaTweet::API::Statuses::Status::retweet
CocoaTweet::API::Model::Tweet retweet(const std::string &_id) const
Definition: status.cc:77
CocoaTweet::API::Statuses::Status::destroy
CocoaTweet::API::Model::Tweet destroy(const std::string &_id) const
send request to statuses/destroy with specified id
Definition: status.cc:71
CocoaTweet::API::Statuses::Status::Options::attachmentUrl
std::string attachmentUrl
Definition: status.h:19
CocoaTweet::API::Statuses::Status::Options::trimUser
bool trimUser
Definition: status.h:22
CocoaTweet::API::Statuses::Status::Options::replyToStatusId
std::string replyToStatusId
Definition: status.h:16
oauth.h
CocoaTweet::API::Statuses
Definition: destroy.cc:4
CocoaTweet::API::Statuses::Status::Options::enableDMCommands
bool enableDMCommands
Definition: status.h:23