upload.h
Go to the documentation of this file.
#ifndef COCOATWEET_API_MEDIA_UPLOAD_H_
#define COCOATWEET_API_MEDIA_UPLOAD_H_
#include <cocoatweet/api/interface/httpPost.h>
#include <cocoatweet/api/model/mediaStore.h>
#include <string>
#include <filesystem>
namespace CocoaTweet::API::Medias {
class Upload : public CocoaTweet::API::Interface::HttpPost {
private:
std::string media_;
static const std::map<std::string, std::string> mimeType;
public:
Upload();
void media(const std::string& _media);
void mediaId(const std::string& _mediaId);
CocoaTweet::API::Model::MediaStore process(std::weak_ptr<CocoaTweet::OAuth::OAuth1> _oauth);
};
} // namespace CocoaTweet::API::Medias
#endif
CocoaTweet::API::Medias::Upload::process
CocoaTweet::API::Model::MediaStore process(std::weak_ptr< CocoaTweet::OAuth::OAuth1 > _oauth)
upload media
Definition: upload.cc:21
CocoaTweet::API::Interface::HttpPost
class for Send request with POST method
Definition: httpPost.h:10
CocoaTweet::API::Model::MediaStore
data class for tweet object
Definition: mediaStore.h:9
CocoaTweet::API::Medias::Upload::media
void media(const std::string &_media)
set media file with absolute path
Definition: upload.cc:15
CocoaTweet::API::Medias::Upload::Upload
Upload()
default constructor
Definition: upload.cc:11
CocoaTweet::API::Medias
Definition: media.cc:3
CocoaTweet::API::Medias::Upload::mediaId
void mediaId(const std::string &_mediaId)
set media id(no affect to process. will be obsoleted)
Definition: upload.cc:19
httpPost.h
CocoaTweet::API::Medias::Upload
entry point for using media/upload endpoint
Definition: upload.h:11
mediaStore.h