yatbcpp  0.0.1
Yet another Telegram Bot CPP Library
sendLocation.h
Go to the documentation of this file.
1 //
2 // Created by norbert on 12.11.17.
3 //
4 
5 #ifndef YATBCPP_SENDLOCATION_H
6 #define YATBCPP_SENDLOCATION_H
7 
8 #include "../types/Location.h"
9 #include "../types/Chat.h"
10 #include "../types/Message.h"
11 #include "../types/ReplyKeyboardMarkup.h"
12 #include "../types/ReplyKeyboardMarkup.h"
13 #include "../types/ReplyKeyboardRemove.h"
14 #include "../types/ForceReply.h"
15 #include "telegram_methodJSON.h"
17 
18 namespace yatbcpp{
19  class sendLocation : public telegram_methodJSON<Message>{
20  public:
21 
22 
23 // void add_to_post(struct curl_httppost **start, struct curl_httppost **end);
24 
25  Json::Value toJson();
26  //TODO langitude, latitude constructors
32  sendLocation(Chat C,Location location);
38  sendLocation(std::int64_t chat_id,Location location);
44  sendLocation(std::string chat_id,Location location);
45 
46 
47  void setLivePeriod(const std::optional<unsigned int> live_period);
48 
49  void setDisable_notification(const std::optional<bool> &disable_notification);
50 
51  void setReply_to_message_id(const std::optional<int> &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 float &getLatitude() const;
60 
61  const float &getLongitude() const;
62 
63  const std::optional<unsigned int> &getLivePeriod() const;
64 
65  const std::optional<bool> &getDisable_notification() const;
66 
67  const std::optional<int> &getReply_to_message_id() const;
68 
69  const std::optional<ReplyMarkup> &getReply_markup() const;
70 
71  void setLive_period(const std::optional<unsigned int> &live_period);
72 
73 
74  private:
75  std::string chat_id;
76  float latitude;
77  float longitude;
78  std::optional<unsigned int> live_period;
79  std::optional<bool> disable_notification;
80  std::optional<int> reply_to_message_id;
81  std::optional<ReplyMarkup> reply_markup;
82  };
83 }
84 
85 #endif //YATBCPP_SENDLOCATION_H
Json::Value toJson()
Definition: sendLocation.cc:38
std::optional< int > reply_to_message_id
Definition: sendLocation.h:80
const float & getLongitude() const
void setReplyMarkup(const ReplyKeyboardMarkup RKM)
Definition: sendLocation.cc:81
std::optional< bool > disable_notification
Definition: sendLocation.h:79
std::optional< unsigned int > live_period
Definition: sendLocation.h:78
Definition: Bot.h:27
const std::optional< int > & getReply_to_message_id() const
const std::optional< ReplyMarkup > & getReply_markup() const
void setLivePeriod(const std::optional< unsigned int > live_period)
void setDisable_notification(const std::optional< bool > &disable_notification)
Definition: sendLocation.cc:68
std::optional< ReplyMarkup > reply_markup
Definition: sendLocation.h:81
const float & getLatitude() const
void setLive_period(const std::optional< unsigned int > &live_period)
Definition: sendLocation.cc:64
const std::optional< bool > & getDisable_notification() const
const std::string & getChat_id() const
void setReply_to_message_id(const std::optional< int > &reply_to_message_id)
Definition: sendLocation.cc:72
sendLocation(Chat C, Location location)
Definition: sendLocation.cc:13
const std::optional< unsigned int > & getLivePeriod() const