mediaStore.h
Go to the documentation of this file.
#ifndef COCOATWEET_API_MODEL_MEDIASTORE_H_
#define COCOATWEET_API_MODEL_MEDIASTORE_H_
#include <string>
namespace CocoaTweet::API::Model {
class MediaStore final {
public:
MediaStore() = default;
MediaStore(const MediaStore&) = default;
MediaStore(const std::string& _json) : MediaStore(MediaStore::parse(_json)) {}
static MediaStore parse(const std::string& _json);
void id(const std::string _id);
void size(const unsigned int _size);
void expires(const unsigned int _ex);
void state(const std::string _state);
void remain(const unsigned int _remain);
const std::string id() const;
const unsigned int size() const;
const unsigned int expire() const;
const std::string state() const;
const unsigned int remain() const;
private:
std::string id_;
unsigned long long size_;
unsigned long long expires_;
std::string state_;
unsigned long long remain_;
};
} // namespace CocoaTweet::API::Model
#endif
CocoaTweet::API::Model::MediaStore
data class for tweet object
Definition: mediaStore.h:9
CocoaTweet::API::Model::MediaStore::expires
void expires(const unsigned int _ex)
set remaining time to expire the media
Definition: mediaStore.cc:40
CocoaTweet::API::Model::MediaStore::expire
const unsigned int expire() const
get remaining time to expire the media
Definition: mediaStore.cc:57
CocoaTweet::API::Model::MediaStore::size
const unsigned int size() const
get media size
Definition: mediaStore.cc:54
CocoaTweet::API::Model::MediaStore::id
const std::string id() const
get media id
Definition: mediaStore.cc:51
CocoaTweet::API::Model::MediaStore::parse
static MediaStore parse(const std::string &_json)
response parser for MediaStore object
Definition: mediaStore.cc:6
CocoaTweet::API::Model::MediaStore::remain
const unsigned int remain() const
set how second need for upload complete
Definition: mediaStore.cc:64
CocoaTweet::API::Model
Definition: mediaStore.cc:5
CocoaTweet::API::Model::MediaStore::MediaStore
MediaStore()=default
constructor
CocoaTweet::API::Model::MediaStore::MediaStore
MediaStore(const std::string &_json)
constructor for create object from json response
Definition: mediaStore.h:19
CocoaTweet::API::Model::MediaStore::state
const std::string state() const
get media processing status
Definition: mediaStore.cc:60