yatbcpp  0.0.1
Yet another Telegram Bot CPP Library
Public Member Functions | Static Public Member Functions | Protected Attributes | Private Attributes | List of all members
yatbcpp::sendPhoto Class Reference

#include "sendPhoto.h"

Inheritance diagram for yatbcpp::sendPhoto:
Inheritance graph
[legend]
Collaboration diagram for yatbcpp::sendPhoto:
Collaboration graph
[legend]

Public Member Functions

void add_to_post (struct curl_httppost **start, struct curl_httppost **end)
 
Json::Value toJson ()
 
 sendPhoto (std::int64_t chat_id, std::string photo)
 
 sendPhoto (std::string chat_id, std::string photo)
 
 sendPhoto (Chat C, std::string photo)
 
void setCaption (const std::optional< std::string > &caption)
 
void setDisable_notification (const std::optional< bool > &disable_notification)
 
void setReply_to_message_id (const std::optional< std::int32_t > &reply_to_message_id)
 
void setReplyMarkup (const ReplyKeyboardMarkup RKM)
 
void setReplyMarkup (const ReplyKeyboardRemove RKR)
 
void setReplyMarkup (const ForceReply FR)
 
const std::string & getChat_id () const
 
const std::string & getPhoto () const
 
const std::optional< std::string > & getCaption () const
 
const std::optional< bool > & getDisable_notification () const
 
const std::optional< std::int32_t > & getReply_to_message_id () const
 
const std::optional< ReplyMarkup > & getReply_markup () const
 
const std::string & getFunctionname () const
 
const std::string & getFunctionname () const
 

Static Public Member Functions

static size_t WriteCallback (void *contents, size_t size, size_t nmemb, void *stringptr)
 
static Message perform_requestJSON (Token T, telegram_methodJSON< Message > &method_body)
 
static size_t WriteCallback (void *contents, size_t size, size_t nmemb, void *stringptr)
 
static Message perform_requestMultipart (Token T, telegram_methodMultipart< Message > &method_body)
 

Protected Attributes

std::string functionname
 
std::string functionname
 

Private Attributes

std::string chat_id
 
std::string Photo
 
std::optional< std::string > caption
 
std::optional< bool > disable_notification
 
std::optional< std::int32_t > reply_to_message_id
 
std::optional< ReplyMarkupreply_markup
 

Detailed Description

Definition at line 18 of file sendPhoto.h.

Constructor & Destructor Documentation

◆ sendPhoto() [1/3]

yatbcpp::sendPhoto::sendPhoto ( std::int64_t  chat_id,
std::string  photo 
)
Parameters
chat_id
photo,andaudio file id or an audio file location to send local files use methodMultipart

◆ sendPhoto() [2/3]

yatbcpp::sendPhoto::sendPhoto ( std::string  chat_id,
std::string  photo 
)
Parameters
chat_id
photo,andaudio file id or an audio file location to send local files use methodMultipart

◆ sendPhoto() [3/3]

yatbcpp::sendPhoto::sendPhoto ( Chat  C,
std::string  photo 
)
Parameters
C
photo,andaudio file id or an audio file location to send local files use methodMultipart

Member Function Documentation

◆ add_to_post()

void sendPhoto::add_to_post ( struct curl_httppost **  start,
struct curl_httppost **  end 
)
virtual

Method Required for derived classes so they can be made into Multipart object The Post Parts have to be added in it , upon end of request it is deleted in perform_requestMultipart

Returns

Reimplemented from yatbcpp::telegram_methodMultipart< Message >.

Definition at line 58 of file sendPhoto.cc.

◆ getCaption()

const optional< string > & sendPhoto::getCaption ( ) const

Definition at line 141 of file sendPhoto.cc.

◆ getChat_id()

const string & sendPhoto::getChat_id ( ) const

Definition at line 133 of file sendPhoto.cc.

◆ getDisable_notification()

const optional< bool > & sendPhoto::getDisable_notification ( ) const

Definition at line 146 of file sendPhoto.cc.

◆ getFunctionname() [1/2]

const std::string& yatbcpp::telegram_methodJSON< Message >::getFunctionname ( ) const
inlineinherited

returns the Functionname

Returns

Definition at line 80 of file telegram_methodJSON.h.

◆ getFunctionname() [2/2]

const std::string& yatbcpp::telegram_methodMultipart< Message >::getFunctionname ( ) const
inlineinherited

returns the Functionname

Returns

Definition at line 83 of file telegram_methodMultipart.h.

◆ getPhoto()

const string & sendPhoto::getPhoto ( ) const

Definition at line 137 of file sendPhoto.cc.

◆ getReply_markup()

const optional< ReplyMarkup > & sendPhoto::getReply_markup ( ) const

Definition at line 154 of file sendPhoto.cc.

◆ getReply_to_message_id()

const optional< int32_t > & sendPhoto::getReply_to_message_id ( ) const

Definition at line 150 of file sendPhoto.cc.

◆ perform_requestJSON()

static Message yatbcpp::telegram_methodJSON< Message >::perform_requestJSON ( Token  T,
telegram_methodJSON< Message > &  method_body 
)
inlinestaticinherited

Definition at line 35 of file telegram_methodJSON.h.

◆ perform_requestMultipart()

static Message yatbcpp::telegram_methodMultipart< Message >::perform_requestMultipart ( Token  T,
telegram_methodMultipart< Message > &  method_body 
)
inlinestaticinherited

Definition at line 30 of file telegram_methodMultipart.h.

◆ setCaption()

void sendPhoto::setCaption ( const std::optional< std::string > &  caption)

Definition at line 92 of file sendPhoto.cc.

◆ setDisable_notification()

void sendPhoto::setDisable_notification ( const std::optional< bool > &  disable_notification)

Definition at line 97 of file sendPhoto.cc.

◆ setReply_to_message_id()

void sendPhoto::setReply_to_message_id ( const std::optional< std::int32_t > &  reply_to_message_id)

Definition at line 101 of file sendPhoto.cc.

◆ setReplyMarkup() [1/3]

void sendPhoto::setReplyMarkup ( const ReplyKeyboardMarkup  RKM)

Sets an ReplyKeyboardMarkup

Parameters
RKM

Definition at line 109 of file sendPhoto.cc.

◆ setReplyMarkup() [2/3]

void sendPhoto::setReplyMarkup ( const ReplyKeyboardRemove  RKR)

Sets an ReplyKeyboardRemove

Parameters
RKR

Definition at line 117 of file sendPhoto.cc.

◆ setReplyMarkup() [3/3]

void sendPhoto::setReplyMarkup ( const ForceReply  FR)

Sets an ForceReply

Parameters
FR

Definition at line 125 of file sendPhoto.cc.

◆ toJson()

Json::Value sendPhoto::toJson ( )
virtual

Method Required for derived classes so they can be made into json object

Returns

Reimplemented from yatbcpp::telegram_methodJSON< Message >.

Definition at line 39 of file sendPhoto.cc.

Here is the call graph for this function:

◆ WriteCallback() [1/2]

static size_t yatbcpp::telegram_methodMultipart< Message >::WriteCallback ( void *  contents,
size_t  size,
size_t  nmemb,
void *  stringptr 
)
inlinestaticinherited

Definition at line 22 of file telegram_methodMultipart.h.

◆ WriteCallback() [2/2]

static size_t yatbcpp::telegram_methodJSON< Message >::WriteCallback ( void *  contents,
size_t  size,
size_t  nmemb,
void *  stringptr 
)
inlinestaticinherited

Definition at line 27 of file telegram_methodJSON.h.

Member Data Documentation

◆ caption

std::optional<std::string> yatbcpp::sendPhoto::caption
private

Definition at line 73 of file sendPhoto.h.

◆ chat_id

std::string yatbcpp::sendPhoto::chat_id
private

Definition at line 71 of file sendPhoto.h.

◆ disable_notification

std::optional<bool> yatbcpp::sendPhoto::disable_notification
private

Definition at line 75 of file sendPhoto.h.

◆ functionname [1/2]

std::string yatbcpp::telegram_methodJSON< Message >::functionname
protectedinherited

Definition at line 85 of file telegram_methodJSON.h.

◆ functionname [2/2]

std::string yatbcpp::telegram_methodMultipart< Message >::functionname
protectedinherited

Definition at line 88 of file telegram_methodMultipart.h.

◆ Photo

std::string yatbcpp::sendPhoto::Photo
private

Definition at line 72 of file sendPhoto.h.

◆ reply_markup

std::optional<ReplyMarkup> yatbcpp::sendPhoto::reply_markup
private

Definition at line 77 of file sendPhoto.h.

◆ reply_to_message_id

std::optional<std::int32_t> yatbcpp::sendPhoto::reply_to_message_id
private

Definition at line 76 of file sendPhoto.h.


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