user.h
Go to the documentation of this file.
#ifndef COCOATWEET_API_MODEL_USER_H_
#define COCOATWEET_API_MODEL_USER_H_
#include <string>
namespace CocoaTweet::API::Model {
class User final {
public:
User() = default;
User(const User&) = default;
User(const std::string& _json) : User(User::parse(_json)) {}
static User parse(const std::string& _json);
void id(const std::string& _id);
void name(const std::string& _name);
void screenName(const std::string& _screen);
void location(const std::string& _location);
void url(const std::string& _url);
void description(const std::string& _description);
void protectedUser(const bool _protected);
void follower(const long _follower);
void follow(const long _follow);
void listed(const long _listed);
void favorite(const long _favorite);
void createdAt(const std::string& _created);
void bannerUrl(const std::string& _banner);
void iconUrl(const std::string& _icon);
const std::string& id() const;
const std::string& name() const;
const std::string& screenName() const;
const std::string& location() const;
const std::string& url() const;
const std::string& description() const;
bool protectedUser() const;
long follower() const;
long follow() const;
long listed() const;
long favorite() const;
const std::string& created() const;
const std::string& bannerUrl() const;
const std::string& icon() const;
private:
std::string id_;
std::string name_;
std::string screenName_;
std::string location_;
std::string url_;
std::string description_;
bool protectedUser_;
long follower_;
long follow_;
long listed_;
long favorite_;
std::string createdAt_;
std::string bannerUrl_;
std::string iconUrl_;
};
} // namespace CocoaTweet::API::Model
#endif
CocoaTweet::API::Model::User::icon
const std::string & icon() const
Definition: user.cc:126
CocoaTweet::API::Model::User::follower
long follower() const
Definition: user.cc:108
CocoaTweet::API::Model::User::createdAt
void createdAt(const std::string &_created)
Definition: user.cc:76
CocoaTweet::API::Model::User::url
const std::string & url() const
Definition: user.cc:99
CocoaTweet::API::Model::User::protectedUser
bool protectedUser() const
Definition: user.cc:105
CocoaTweet::API::Model::User::created
const std::string & created() const
Definition: user.cc:120
CocoaTweet::API::Model::User::description
const std::string & description() const
Definition: user.cc:102
CocoaTweet::API::Model::User::listed
long listed() const
Definition: user.cc:114
CocoaTweet::API::Model::User::User
User(const std::string &_json)
constructor for create object from json response
Definition: user.h:19
CocoaTweet::API::Model::User::User
User()=default
constructor
CocoaTweet::API::Model::User::id
const std::string & id() const
Definition: user.cc:86
CocoaTweet::API::Model::User::follow
long follow() const
Definition: user.cc:111
CocoaTweet::API::Model
Definition: mediaStore.cc:5
CocoaTweet::API::Model::User::location
const std::string & location() const
Definition: user.cc:96
CocoaTweet::API::Model::User::favorite
long favorite() const
Definition: user.cc:117
CocoaTweet::API::Model::User::iconUrl
void iconUrl(const std::string &_icon)
Definition: user.cc:82
CocoaTweet::API::Model::User::name
const std::string & name() const
Definition: user.cc:90
CocoaTweet::API::Model::User::bannerUrl
const std::string & bannerUrl() const
Definition: user.cc:123
CocoaTweet::API::Model::User::parse
static User parse(const std::string &_json)
response parser for user object
Definition: user.cc:5
CocoaTweet::API::Model::User::screenName
const std::string & screenName() const
Definition: user.cc:93
CocoaTweet::API::Model::User
data class for tweet object
Definition: user.h:9