CocoaTweet::API::Medias::Upload Class Reference

entry point for using media/upload endpoint More...

`#include <upload.h>`

Inheritance diagram for CocoaTweet::API::Medias::Upload:
[legend]
Collaboration diagram for CocoaTweet::API::Medias::Upload:
[legend]

## Public Member Functions

| Upload ()
| default constructor More...
void | media (const std::string &_media)
| set media file with absolute path More...
void | mediaId (const std::string &_mediaId)
| set media id(no affect to process. will be obsoleted) More...
CocoaTweet::API::Model::MediaStore | process (std::weak_ptr< CocoaTweet::OAuth::OAuth1 > _oauth)
| upload media More...

## Additional Inherited Members

Protected Member Functions inherited from CocoaTweet::API::Interface::HttpPost
void | process (std::weak_ptr< CocoaTweet::OAuth::OAuth1 > _oauth, std::function< void(const std::string &)> _callback)
| Send HTTP/POST using OAuth object. More...
Static Protected Member Functions inherited from CocoaTweet::API::Interface::HttpBase
static size_t | curlCallback_ (char *_ptr, size_t _size, size_t _nmemb, std::string *_stream)
Protected Attributes inherited from CocoaTweet::API::Interface::HttpBase
std::weak_ptr< CocoaTweet::OAuth::OAuth1 > | oauth_
std::map< std::string, std::string > | bodyParam_
std::string | url_
std::string | contentType_

## Detailed Description

entry point for using media/upload endpoint

## Constructor & Destructor Documentation

## Upload()

CocoaTweet::API::Medias::Upload::Upload | ( |  | ) |

default constructor

## Member Function Documentation

## media()

void CocoaTweet::API::Medias::Upload::media | ( | const std::string & | _media | ) |

set media file with absolute path

Parameters

  [in] | const | std::string& _media : absolute path to media should be uploaded
  [out] | none |

## mediaId()

void CocoaTweet::API::Medias::Upload::mediaId | ( | const std::string & | _mediaId | ) |

set media id(no affect to process. will be obsoleted)

## process()

CocoaTweet::API::Model::MediaStore CocoaTweet::API::Medias::Upload::process | ( | std::weak_ptr< CocoaTweet::OAuth::OAuth1 > | _oauth | ) |

upload media

Parameters

  [in] | std::weak_ptr<CocoaTweet::OAuth::OAuth1> | _oauth : pointer to OAuth object for authenticate
  [out] | CocoaTweet::API::Model::MediaStore | : media upload result. use id() for post tweet.

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

- src/cocoatweet/api/media/upload.h
- src/cocoatweet/api/media/upload.cc