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

#include "sendMessage.h"

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

Public Member Functions

Json::Value toJson ()
 
 sendMessage (std::int64_t chat_id, std::string text)
 
 sendMessage (std::string chat_id, std::string text)
 
 sendMessage (Chat C, std::string text)
 
void setParse_mode (const std::optional< std::string > &parse_mode)
 
void setDisable_web_page_preview (const std::optional< bool > &disable_web_page_preview)
 
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 & getText () const
 
const std::optional< std::string > & getParse_mode () const
 
const std::optional< bool > & getDisable_web_page_preview () 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
 

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)
 

Protected Attributes

std::string functionname
 

Private Attributes

std::string chat_id
 
std::string text
 
std::optional< std::string > parse_mode
 
std::optional< bool > disable_web_page_preview
 
std::optional< bool > disable_notification
 
std::optional< std::int32_t > reply_to_message_id
 
std::optional< ReplyMarkupreply_markup
 

Detailed Description

Definition at line 17 of file sendMessage.h.

Constructor & Destructor Documentation

◆ sendMessage() [1/3]

yatbcpp::sendMessage::sendMessage ( std::int64_t  chat_id,
std::string  text 
)

◆ sendMessage() [2/3]

yatbcpp::sendMessage::sendMessage ( std::string  chat_id,
std::string  text 
)

◆ sendMessage() [3/3]

yatbcpp::sendMessage::sendMessage ( Chat  C,
std::string  text 
)

Member Function Documentation

◆ getChat_id()

const string & sendMessage::getChat_id ( ) const

Definition at line 108 of file sendMessage.cc.

◆ getDisable_notification()

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

Definition at line 124 of file sendMessage.cc.

◆ getDisable_web_page_preview()

const optional< bool > & sendMessage::getDisable_web_page_preview ( ) const

Definition at line 120 of file sendMessage.cc.

◆ getFunctionname()

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

returns the Functionname

Returns

Definition at line 80 of file telegram_methodJSON.h.

◆ getParse_mode()

const optional< string > & sendMessage::getParse_mode ( ) const

Definition at line 116 of file sendMessage.cc.

◆ getReply_markup()

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

Definition at line 132 of file sendMessage.cc.

◆ getReply_to_message_id()

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

Definition at line 128 of file sendMessage.cc.

◆ getText()

const string & sendMessage::getText ( ) const

Definition at line 112 of file sendMessage.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.

◆ setDisable_notification()

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

Definition at line 72 of file sendMessage.cc.

◆ setDisable_web_page_preview()

void sendMessage::setDisable_web_page_preview ( const std::optional< bool > &  disable_web_page_preview)

Definition at line 68 of file sendMessage.cc.

◆ setParse_mode()

void sendMessage::setParse_mode ( const std::optional< std::string > &  parse_mode)

Definition at line 64 of file sendMessage.cc.

◆ setReply_to_message_id()

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

Definition at line 76 of file sendMessage.cc.

◆ setReplyMarkup() [1/3]

void sendMessage::setReplyMarkup ( const ReplyKeyboardMarkup  RKM)

Sets an ReplyKeyboardMarkup

Parameters
RKM

Definition at line 84 of file sendMessage.cc.

◆ setReplyMarkup() [2/3]

void sendMessage::setReplyMarkup ( const ReplyKeyboardRemove  RKR)

Sets an ReplyKeyboardRemove

Parameters
RKR

Definition at line 92 of file sendMessage.cc.

◆ setReplyMarkup() [3/3]

void sendMessage::setReplyMarkup ( const ForceReply  FR)

Sets an ForceReply

Parameters
FR

Definition at line 100 of file sendMessage.cc.

◆ toJson()

Json::Value sendMessage::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 sendMessage.cc.

Here is the call graph for this function:

◆ WriteCallback()

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

◆ chat_id

std::string yatbcpp::sendMessage::chat_id
private

Definition at line 56 of file sendMessage.h.

◆ disable_notification

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

Definition at line 60 of file sendMessage.h.

◆ disable_web_page_preview

std::optional<bool> yatbcpp::sendMessage::disable_web_page_preview
private

Definition at line 59 of file sendMessage.h.

◆ functionname

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

Definition at line 85 of file telegram_methodJSON.h.

◆ parse_mode

std::optional<std::string> yatbcpp::sendMessage::parse_mode
private

Definition at line 58 of file sendMessage.h.

◆ reply_markup

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

Definition at line 62 of file sendMessage.h.

◆ reply_to_message_id

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

Definition at line 61 of file sendMessage.h.

◆ text

std::string yatbcpp::sendMessage::text
private

Definition at line 57 of file sendMessage.h.


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