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::sendDocument Class Reference

#include "sendDocument.h"

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

Public Member Functions

void add_to_post (struct curl_httppost **start, struct curl_httppost **end)
 
Json::Value toJson ()
 
 sendDocument (std::int64_t chat_id, std::string document)
 
 sendDocument (std::string chat_id, std::string document)
 
 sendDocument (Chat C, std::string Document)
 
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< int > &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 & getDocument () 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 document
 
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 sendDocument.h.

Constructor & Destructor Documentation

◆ sendDocument() [1/3]

yatbcpp::sendDocument::sendDocument ( std::int64_t  chat_id,
std::string  document 
)
Parameters
chat_id
document,andDocument file id or an Document file location to send local files use methodMultipart

◆ sendDocument() [2/3]

yatbcpp::sendDocument::sendDocument ( std::string  chat_id,
std::string  document 
)
Parameters
chat_id
document,andDocument file id or an Document file location to send local files use methodMultipart

◆ sendDocument() [3/3]

yatbcpp::sendDocument::sendDocument ( Chat  C,
std::string  Document 
)
Parameters
C
document,andDocument file id or an document file location to send local files use methodMultipart, and supply the file direction

Member Function Documentation

◆ add_to_post()

void sendDocument::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 sendDocument.cc.

◆ getCaption()

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

Definition at line 128 of file sendDocument.cc.

◆ getChat_id()

const string & sendDocument::getChat_id ( ) const

Definition at line 120 of file sendDocument.cc.

◆ getDisable_notification()

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

Definition at line 132 of file sendDocument.cc.

◆ getDocument()

const string & sendDocument::getDocument ( ) const

Definition at line 124 of file sendDocument.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.

◆ getReply_markup()

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

Definition at line 140 of file sendDocument.cc.

◆ getReply_to_message_id()

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

Definition at line 136 of file sendDocument.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 sendDocument::setCaption ( const std::optional< std::string > &  caption)

Definition at line 79 of file sendDocument.cc.

◆ setDisable_notification()

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

Definition at line 84 of file sendDocument.cc.

◆ setReply_to_message_id()

void sendDocument::setReply_to_message_id ( const std::optional< int > &  reply_to_message_id)

Definition at line 88 of file sendDocument.cc.

◆ setReplyMarkup() [1/3]

void sendDocument::setReplyMarkup ( const ReplyKeyboardMarkup  RKM)

Sets an ReplyKeyboardMarkup

Parameters
RKM

Definition at line 96 of file sendDocument.cc.

◆ setReplyMarkup() [2/3]

void sendDocument::setReplyMarkup ( const ReplyKeyboardRemove  RKR)

Sets an ReplyKeyboardRemove

Parameters
RKR

Definition at line 104 of file sendDocument.cc.

◆ setReplyMarkup() [3/3]

void sendDocument::setReplyMarkup ( const ForceReply  FR)

Sets an ForceReply

Parameters
FR

Definition at line 112 of file sendDocument.cc.

◆ toJson()

Json::Value sendDocument::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 sendDocument.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::sendDocument::caption
private

Definition at line 74 of file sendDocument.h.

◆ chat_id

std::string yatbcpp::sendDocument::chat_id
private

Definition at line 72 of file sendDocument.h.

◆ disable_notification

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

Definition at line 75 of file sendDocument.h.

◆ document

std::string yatbcpp::sendDocument::document
private

Definition at line 73 of file sendDocument.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.

◆ reply_markup

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

Definition at line 77 of file sendDocument.h.

◆ reply_to_message_id

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

Definition at line 76 of file sendDocument.h.


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