yatbcpp  0.0.1
Yet another Telegram Bot CPP Library
sendPhoto.h
Go to the documentation of this file.
1 //
2 // Created by norbert on 27.08.17.
3 //
4 
5 #ifndef YATBCPP_SENDPHOTO_H
6 #define YATBCPP_SENDPHOTO_H
7 
8 #include "../types/Chat.h"
9 #include "../types/Message.h"
10 #include "../types/ReplyKeyboardMarkup.h"
11 #include "../types/ReplyKeyboardMarkup.h"
12 #include "../types/ReplyKeyboardRemove.h"
13 #include "../types/ForceReply.h"
14 #include "telegram_methodJSON.h"
16 
17 namespace yatbcpp{
18  class sendPhoto : public telegram_methodJSON<Message>, public telegram_methodMultipart<Message>{
19  public:
20 
21 
22  void add_to_post(struct curl_httppost **start, struct curl_httppost **end);
23 
24  Json::Value toJson();
31  sendPhoto(std::int64_t chat_id,std::string photo);
38  sendPhoto(std::string chat_id,std::string photo);
45  sendPhoto(Chat C, std::string photo);
46 
47  void setCaption(const std::optional<std::string> &caption);
48 
49  void setDisable_notification(const std::optional<bool> &disable_notification);
50 
51  void setReply_to_message_id(const std::optional<std::int32_t> &reply_to_message_id);
52 
53  void setReplyMarkup(const ReplyKeyboardMarkup RKM);
54  void setReplyMarkup(const ReplyKeyboardRemove RKR);
55  void setReplyMarkup(const ForceReply FR);
56 
57  const std::string &getChat_id() const;
58 
59  const std::string &getPhoto() const;
60 
61  const std::optional<std::string> &getCaption() const;
62 
63  const std::optional<bool> &getDisable_notification() const;
64 
65  const std::optional<std::int32_t> &getReply_to_message_id() const;
66 
67  const std::optional<ReplyMarkup> &getReply_markup() const;
68 
69 
70  private:
71  std::string chat_id;
72  std::string Photo;//Currently only file id
73  std::optional<std::string> caption;
74 
75  std::optional<bool> disable_notification;
76  std::optional<std::int32_t> reply_to_message_id;
77  std::optional<ReplyMarkup> reply_markup;
78  };
79 }
80 
81 #endif //YATBCPP_SENDPHOTO_H
const std::string & getChat_id() const
Definition: sendPhoto.cc:133
std::optional< bool > disable_notification
Definition: sendPhoto.h:75
const std::string & getPhoto() const
Definition: sendPhoto.cc:137
void setReplyMarkup(const ReplyKeyboardMarkup RKM)
Definition: sendPhoto.cc:109
const std::optional< ReplyMarkup > & getReply_markup() const
Definition: sendPhoto.cc:154
void setCaption(const std::optional< std::string > &caption)
Definition: sendPhoto.cc:92
Definition: Bot.h:27
std::string chat_id
Definition: sendPhoto.h:71
std::string Photo
Definition: sendPhoto.h:72
void setReply_to_message_id(const std::optional< std::int32_t > &reply_to_message_id)
Definition: sendPhoto.cc:101
const std::optional< bool > & getDisable_notification() const
Definition: sendPhoto.cc:146
std::optional< std::string > caption
Definition: sendPhoto.h:73
std::optional< ReplyMarkup > reply_markup
Definition: sendPhoto.h:77
const std::optional< std::string > & getCaption() const
Definition: sendPhoto.cc:141
Json::Value toJson()
Definition: sendPhoto.cc:39
const std::optional< std::int32_t > & getReply_to_message_id() const
Definition: sendPhoto.cc:150
void setDisable_notification(const std::optional< bool > &disable_notification)
Definition: sendPhoto.cc:97
void add_to_post(struct curl_httppost **start, struct curl_httppost **end)
Definition: sendPhoto.cc:58
std::optional< std::int32_t > reply_to_message_id
Definition: sendPhoto.h:76
sendPhoto(std::int64_t chat_id, std::string photo)