CocoaTweet
Public Member Functions | Static Public Member Functions | List of all members
CocoaTweet::API::Model::Tweet Class Referencefinal

data class for tweet object More...

#include <tweet.h>

Public Member Functions

 Tweet ()=default
 constructor More...
 
 Tweet (const Tweet &)=default
 copy constructor More...
 
 Tweet (const std::string &_json)
 constructor for create object from json response More...
 
void id (const std::string _id)
 set id of tweet More...
 
void createdAt (const std::string _at)
 set created time of tweet More...
 
void text (const std::string _text)
 set tweet text More...
 
void source (const std::string _source)
 set tweet source More...
 
void user (const CocoaTweet::API::Model::User _user)
 
const std::string id () const
 get tweet id More...
 
const std::string createdAt () const
 get tweet create time More...
 
const std::string text () const
 get tweet text More...
 
const std::string source () const
 get tweet source information More...
 
const CocoaTweet::API::Model::User user () const
 

Static Public Member Functions

static Tweet parse (const std::string &_json)
 response parser for tweet object More...
 

Detailed Description

data class for tweet object

Constructor & Destructor Documentation

◆ Tweet() [1/3]

CocoaTweet::API::Model::Tweet::Tweet ( )
default

constructor

◆ Tweet() [2/3]

CocoaTweet::API::Model::Tweet::Tweet ( const Tweet )
default

copy constructor

◆ Tweet() [3/3]

CocoaTweet::API::Model::Tweet::Tweet ( const std::string &  _json)
inline

constructor for create object from json response

Parameters
[in]conststd::string& _json : received content from twitter endpoint

Member Function Documentation

◆ createdAt() [1/2]

const std::string CocoaTweet::API::Model::Tweet::createdAt ( ) const

get tweet create time

Parameters
[in]none
[out]conststd::string : time of tweet created time

◆ createdAt() [2/2]

void CocoaTweet::API::Model::Tweet::createdAt ( const std::string  _at)

set created time of tweet

Parameters
[in]conststd::string _at : tweet created time to set
[out]none

◆ id() [1/2]

const std::string CocoaTweet::API::Model::Tweet::id ( ) const

get tweet id

Parameters
[in]none
[out]conststd::string : tweet id

◆ id() [2/2]

void CocoaTweet::API::Model::Tweet::id ( const std::string  _id)

set id of tweet

Parameters
[in]conststd::string _id : tweet id to set
[out]none

◆ parse()

Tweet CocoaTweet::API::Model::Tweet::parse ( const std::string &  _json)
static

response parser for tweet object

Parameters
[in]conststd::string& _json : received content from twitter endpoint
[out]CocoaTweet::API::Model::Tweet

◆ source() [1/2]

const std::string CocoaTweet::API::Model::Tweet::source ( ) const

get tweet source information

Parameters
[in]none
[out]conststd::string : source information

◆ source() [2/2]

void CocoaTweet::API::Model::Tweet::source ( const std::string  _source)

set tweet source

Parameters
[in]conststd::string _source : source information to set
[out]none

◆ text() [1/2]

const std::string CocoaTweet::API::Model::Tweet::text ( ) const

get tweet text

Parameters
[in]none
[out]conststd::string : tweet text

◆ text() [2/2]

void CocoaTweet::API::Model::Tweet::text ( const std::string  _text)

set tweet text

Parameters
[in]conststd::string _text : text of tweet to set
[out]none

◆ user() [1/2]

const CocoaTweet::API::Model::User CocoaTweet::API::Model::Tweet::user ( ) const

◆ user() [2/2]

void CocoaTweet::API::Model::Tweet::user ( const CocoaTweet::API::Model::User  _user)

The documentation for this class was generated from the following files: