From b22c20c4db8c35eaee99075d055f74697c5805b8 Mon Sep 17 00:00:00 2001 From: Oleg Morozenkov Date: Sun, 15 Jan 2017 02:33:59 +0300 Subject: Docs --- docs/d4/d47/_http_server_8h.html | 119 +++++++ docs/d4/d47/_http_server_8h_source.html | 116 +++++++ ...t_1_1_inline_query_result_location-members.html | 116 +++++++ docs/d4/d61/class_tg_bot_1_1_document.html | 233 ++++++++++++++ docs/d4/d61/class_tg_bot_1_1_document.js | 9 + docs/d4/d84/_event_handler_8h.html | 117 +++++++ docs/d4/d84/_event_handler_8h_source.html | 109 +++++++ docs/d4/d8b/class_tg_bot_1_1_http_server.html | 354 +++++++++++++++++++++ docs/d4/d8b/class_tg_bot_1_1_http_server.js | 11 + docs/d4/d8b/class_tg_bot_1_1_http_server.png | Bin 0 -> 857 bytes .../d91/class_tg_bot_1_1_http_client-members.html | 102 ++++++ .../d9c/class_tg_bot_1_1_tg_long_poll-members.html | 103 ++++++ .../dbc/class_tg_bot_1_1_chosen_inline_result.html | 233 ++++++++++++++ .../dbc/class_tg_bot_1_1_chosen_inline_result.js | 9 + docs/d4/ddd/_api_8h.html | 129 ++++++++ docs/d4/ddd/_api_8h_source.html | 154 +++++++++ docs/d4/de1/class_tg_bot_1_1_force_reply.html | 194 +++++++++++ docs/d4/de1/class_tg_bot_1_1_force_reply.js | 6 + docs/d4/de1/class_tg_bot_1_1_force_reply.png | Bin 0 -> 599 bytes docs/d4/deb/class_tg_bot_1_1_api-members.html | 139 ++++++++ 20 files changed, 2253 insertions(+) create mode 100644 docs/d4/d47/_http_server_8h.html create mode 100644 docs/d4/d47/_http_server_8h_source.html create mode 100644 docs/d4/d53/class_tg_bot_1_1_inline_query_result_location-members.html create mode 100644 docs/d4/d61/class_tg_bot_1_1_document.html create mode 100644 docs/d4/d61/class_tg_bot_1_1_document.js create mode 100644 docs/d4/d84/_event_handler_8h.html create mode 100644 docs/d4/d84/_event_handler_8h_source.html create mode 100644 docs/d4/d8b/class_tg_bot_1_1_http_server.html create mode 100644 docs/d4/d8b/class_tg_bot_1_1_http_server.js create mode 100644 docs/d4/d8b/class_tg_bot_1_1_http_server.png create mode 100644 docs/d4/d91/class_tg_bot_1_1_http_client-members.html create mode 100644 docs/d4/d9c/class_tg_bot_1_1_tg_long_poll-members.html create mode 100644 docs/d4/dbc/class_tg_bot_1_1_chosen_inline_result.html create mode 100644 docs/d4/dbc/class_tg_bot_1_1_chosen_inline_result.js create mode 100644 docs/d4/ddd/_api_8h.html create mode 100644 docs/d4/ddd/_api_8h_source.html create mode 100644 docs/d4/de1/class_tg_bot_1_1_force_reply.html create mode 100644 docs/d4/de1/class_tg_bot_1_1_force_reply.js create mode 100644 docs/d4/de1/class_tg_bot_1_1_force_reply.png create mode 100644 docs/d4/deb/class_tg_bot_1_1_api-members.html (limited to 'docs/d4') diff --git a/docs/d4/d47/_http_server_8h.html b/docs/d4/d47/_http_server_8h.html new file mode 100644 index 0000000..c4e77bb --- /dev/null +++ b/docs/d4/d47/_http_server_8h.html @@ -0,0 +1,119 @@ + + + + + + + +tgbot-cpp: include/tgbot/net/HttpServer.h File Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
tgbot-cpp +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
HttpServer.h File Reference
+
+
+
#include <string>
+#include <boost/asio.hpp>
+#include "tgbot/net/HttpParser.h"
+
+

Go to the source code of this file.

+ + + + + + +

+Classes

class  TgBot::HttpServer< Protocol >
 
class  TgBot::HttpServer< Protocol >::Connection
 
+ + + +

+Namespaces

 TgBot
 
+
+
+ + + + diff --git a/docs/d4/d47/_http_server_8h_source.html b/docs/d4/d47/_http_server_8h_source.html new file mode 100644 index 0000000..adc3082 --- /dev/null +++ b/docs/d4/d47/_http_server_8h_source.html @@ -0,0 +1,116 @@ + + + + + + + +tgbot-cpp: include/tgbot/net/HttpServer.h Source File + + + + + + + + + + + + + + +
+
+ + + + + + +
+
tgbot-cpp +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
HttpServer.h
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Oleg Morozenkov
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy
5  * of this software and associated documentation files (the "Software"), to deal
6  * in the Software without restriction, including without limitation the rights
7  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8  * copies of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in all
12  * copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20  * SOFTWARE.
21  */
22 
23 #ifndef TGBOT_HTTPSERVER_H
24 #define TGBOT_HTTPSERVER_H
25 
26 #include <string>
27 
28 #include <boost/asio.hpp>
29 
30 #include "tgbot/net/HttpParser.h"
31 
32 namespace TgBot {
33 
38 template<typename Protocol>
39 class HttpServer {
40 
41 protected:
42  class Connection;
43 
44 public:
45  typedef std::function<std::string (const std::string&, const std::map<std::string, std::string>)> ServerHandler;
46 
47  HttpServer(std::shared_ptr<boost::asio::basic_socket_acceptor<Protocol>> acceptor, const ServerHandler& handler) : _acceptor(acceptor), _handler(handler) {
48  }
49 
53  void start() {
54  std::shared_ptr<boost::asio::basic_stream_socket<Protocol>> socket(new boost::asio::basic_stream_socket<Protocol>(_acceptor->get_io_service()));
55  std::shared_ptr<Connection> connection(new Connection(socket, _handler));
56  _acceptor->async_accept(*connection->socket, [this, connection]() {
57  connection->start();
58  start();
59  });
60  _ioService.run();
61  }
62 
66  void stop() {
67  _ioService.stop();
68  }
69 
70 protected:
71  class Connection {
72 
73  public:
74  Connection(std::shared_ptr<boost::asio::basic_stream_socket<Protocol>>& socket, const ServerHandler& handler) : socket(socket), _handler(handler) {
75  boost::asio::socket_base::keep_alive option(true);
76  socket.set_option(option);
77  }
78 
79  void start() {
80  data.reserve(10240);
81  socket->async_receive(data, [this]() {
82  std::map<std::string, std::string> headers;
83  std::string body = HttpParser::getInstance().parseResponse(data, headers);
84  socket->async_send(_handler(body, headers));
85  });
86  }
87 
88  std::shared_ptr<boost::asio::basic_stream_socket<Protocol>> socket;
89  std::string data;
90 
91  protected:
93  };
94 
95  boost::asio::io_service _ioService;
96  std::shared_ptr<boost::asio::basic_socket_acceptor<Protocol>> _acceptor;
98 };
99 
100 }
101 
102 #endif //TGBOT_HTTPSERVER_H
std::shared_ptr< boost::asio::basic_socket_acceptor< Protocol > > _acceptor
Definition: HttpServer.h:96
+
const ServerHandler _handler
Definition: HttpServer.h:92
+
std::shared_ptr< boost::asio::basic_stream_socket< Protocol > > socket
Definition: HttpServer.h:88
+ + +
Definition: Api.h:44
+ + +
std::string parseResponse(const std::string &data, std::map< std::string, std::string > &headers)
Definition: HttpParser.h:54
+
Connection(std::shared_ptr< boost::asio::basic_stream_socket< Protocol >> &socket, const ServerHandler &handler)
Definition: HttpServer.h:74
+
const ServerHandler _handler
Definition: HttpServer.h:97
+ + +
HttpServer(std::shared_ptr< boost::asio::basic_socket_acceptor< Protocol >> acceptor, const ServerHandler &handler)
Definition: HttpServer.h:47
+
static HttpParser & getInstance()
+
std::function< std::string(const std::string &, const std::map< std::string, std::string >)> ServerHandler
Definition: HttpServer.h:42
+ +
boost::asio::io_service _ioService
Definition: HttpServer.h:95
+
+
+ + + + diff --git a/docs/d4/d53/class_tg_bot_1_1_inline_query_result_location-members.html b/docs/d4/d53/class_tg_bot_1_1_inline_query_result_location-members.html new file mode 100644 index 0000000..b9a9509 --- /dev/null +++ b/docs/d4/d53/class_tg_bot_1_1_inline_query_result_location-members.html @@ -0,0 +1,116 @@ + + + + + + + +tgbot-cpp: Member List + + + + + + + + + + + + + + +
+
+ + + + + + +
+
tgbot-cpp +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
TgBot::InlineQueryResultLocation Member List
+
+ +
+ + + + diff --git a/docs/d4/d61/class_tg_bot_1_1_document.html b/docs/d4/d61/class_tg_bot_1_1_document.html new file mode 100644 index 0000000..c508b74 --- /dev/null +++ b/docs/d4/d61/class_tg_bot_1_1_document.html @@ -0,0 +1,233 @@ + + + + + + + +tgbot-cpp: TgBot::Document Class Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
tgbot-cpp +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
TgBot::Document Class Reference
+
+
+ +

#include <Document.h>

+ + + + +

+Public Types

typedef std::shared_ptr< DocumentPtr
 
+ + + + + + + + + + + +

+Public Attributes

std::string fileId
 
PhotoSize::Ptr thumb
 
std::string fileName
 
std::string mimeType
 
int32_t fileSize
 
+

Detailed Description

+

This object represents a general file (as opposed to photos and audio files).

+ +

Definition at line 37 of file Document.h.

+

Member Typedef Documentation

+ +

◆ Ptr

+ +
+
+ + + + +
typedef std::shared_ptr<Document> TgBot::Document::Ptr
+
+ +

Definition at line 40 of file Document.h.

+ +
+
+

Member Data Documentation

+ +

◆ fileId

+ +
+
+ + + + +
std::string TgBot::Document::fileId
+
+

Unique file identifier.

+ +

Definition at line 45 of file Document.h.

+ +
+
+ +

◆ fileName

+ +
+
+ + + + +
std::string TgBot::Document::fileName
+
+

Optional. Original filename as defined by sender.

+ +

Definition at line 55 of file Document.h.

+ +
+
+ +

◆ fileSize

+ +
+
+ + + + +
int32_t TgBot::Document::fileSize
+
+

Optional. File size.

+ +

Definition at line 65 of file Document.h.

+ +
+
+ +

◆ mimeType

+ +
+
+ + + + +
std::string TgBot::Document::mimeType
+
+

Optional. MIME type of the file as defined by sender.

+ +

Definition at line 60 of file Document.h.

+ +
+
+ +

◆ thumb

+ +
+
+ + + + +
PhotoSize::Ptr TgBot::Document::thumb
+
+

Optional. Document thumbnail as defined by sender.

+ +

Definition at line 50 of file Document.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + diff --git a/docs/d4/d61/class_tg_bot_1_1_document.js b/docs/d4/d61/class_tg_bot_1_1_document.js new file mode 100644 index 0000000..75ee088 --- /dev/null +++ b/docs/d4/d61/class_tg_bot_1_1_document.js @@ -0,0 +1,9 @@ +var class_tg_bot_1_1_document = +[ + [ "Ptr", "d4/d61/class_tg_bot_1_1_document.html#af311e27c16bf2a1128ee339899face9e", null ], + [ "fileId", "d4/d61/class_tg_bot_1_1_document.html#aa67870c6320092c13154abde7dcdf94c", null ], + [ "fileName", "d4/d61/class_tg_bot_1_1_document.html#a0b36f1611eb0cda45e47c989689456d6", null ], + [ "fileSize", "d4/d61/class_tg_bot_1_1_document.html#a3c9b2dca38059ddd219abab398694bc9", null ], + [ "mimeType", "d4/d61/class_tg_bot_1_1_document.html#ac95f48d00ace3b28c97c4bfc1e3e592b", null ], + [ "thumb", "d4/d61/class_tg_bot_1_1_document.html#a21a156d86da82dcb636fba01a3ef351f", null ] +]; \ No newline at end of file diff --git a/docs/d4/d84/_event_handler_8h.html b/docs/d4/d84/_event_handler_8h.html new file mode 100644 index 0000000..e12ca20 --- /dev/null +++ b/docs/d4/d84/_event_handler_8h.html @@ -0,0 +1,117 @@ + + + + + + + +tgbot-cpp: include/tgbot/EventHandler.h File Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
tgbot-cpp +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
EventHandler.h File Reference
+
+
+ +

Go to the source code of this file.

+ + + + +

+Classes

class  TgBot::EventHandler
 
+ + + +

+Namespaces

 TgBot
 
+
+
+ + + + diff --git a/docs/d4/d84/_event_handler_8h_source.html b/docs/d4/d84/_event_handler_8h_source.html new file mode 100644 index 0000000..3f57797 --- /dev/null +++ b/docs/d4/d84/_event_handler_8h_source.html @@ -0,0 +1,109 @@ + + + + + + + +tgbot-cpp: include/tgbot/EventHandler.h Source File + + + + + + + + + + + + + + +
+
+ + + + + + +
+
tgbot-cpp +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
EventHandler.h
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Oleg Morozenkov
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy
5  * of this software and associated documentation files (the "Software"), to deal
6  * in the Software without restriction, including without limitation the rights
7  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8  * copies of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in all
12  * copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20  * SOFTWARE.
21  */
22 
23 #ifndef TGBOT_EVENTHANDLER_H
24 #define TGBOT_EVENTHANDLER_H
25 
26 #include "tgbot/EventBroadcaster.h"
27 #include "tgbot/types/Update.h"
29 
30 namespace TgBot {
31 
32 class EventHandler {
33 
34  void handleMessage(const Message::Ptr& message) const {
35  _broadcaster->broadcastAnyMessage(message);
36 
37  if (StringTools::startsWith(message->text, "/")) {
38  unsigned long splitPosition;
39  unsigned long spacePosition = message->text.find(' ');
40  unsigned long atSymbolPosition = message->text.find('@');
41  if (spacePosition == message->text.npos) {
42  if (atSymbolPosition == message->text.npos) {
43  splitPosition = message->text.size();
44  } else {
45  splitPosition = atSymbolPosition;
46  }
47  } else if (atSymbolPosition == message->text.npos) {
48  splitPosition = spacePosition;
49  } else {
50  splitPosition = std::min(spacePosition, atSymbolPosition);
51  }
52  std::string command = message->text.substr(1, splitPosition - 1);
53  if (!_broadcaster->broadcastCommand(command, message)) {
54  _broadcaster->broadcastUnknownCommand(message);
55  }
56  } else {
57  _broadcaster->broadcastNonCommandMessage(message);
58  }
59  };
60 
61 public:
62  explicit EventHandler(const EventBroadcaster* broadcaster) : _broadcaster(broadcaster) {
63  }
64 
65  inline void handleUpdate(const Update::Ptr& update) const {
66  if (update->inlineQuery != NULL)
67  _broadcaster->broadcastInlineQuery(update->inlineQuery);
68  if (update->chosenInlineResult != NULL)
69  _broadcaster->broadcastChosenInlineResult(update->chosenInlineResult);
70  if (update->callbackQuery != NULL)
71  _broadcaster->broadcastCallbackQuery(update->callbackQuery);
72  if (update->message != NULL)
73  handleMessage(update->message);
74  }
75 
76 private:
77  const EventBroadcaster* _broadcaster;
78 };
79 
80 }
81 
82 #endif //TGBOT_EVENTHANDLER_H
+ +
std::shared_ptr< Update > Ptr
Definition: Update.h:42
+
Definition: Api.h:44
+ + +
std::shared_ptr< Message > Ptr
Definition: Message.h:52
+ +
bool startsWith(const std::string &str1, const std::string &str2)
+
EventHandler(const EventBroadcaster *broadcaster)
Definition: EventHandler.h:62
+
void handleUpdate(const Update::Ptr &update) const
Definition: EventHandler.h:65
+
+
+ + + + diff --git a/docs/d4/d8b/class_tg_bot_1_1_http_server.html b/docs/d4/d8b/class_tg_bot_1_1_http_server.html new file mode 100644 index 0000000..849ea80 --- /dev/null +++ b/docs/d4/d8b/class_tg_bot_1_1_http_server.html @@ -0,0 +1,354 @@ + + + + + + + +tgbot-cpp: TgBot::HttpServer< Protocol > Class Template Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
tgbot-cpp +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
TgBot::HttpServer< Protocol > Class Template Reference
+
+
+ +

#include <HttpServer.h>

+
+Inheritance diagram for TgBot::HttpServer< Protocol >:
+
+
+ + +TgBot::TgWebhookServer< Protocol > + +
+ + + + +

+Classes

class  Connection
 
+ + + +

+Public Types

typedef std::function< std::string(const std::string &, const std::map< std::string, std::string >)> ServerHandler
 
+ + + + + + + +

+Public Member Functions

 HttpServer (std::shared_ptr< boost::asio::basic_socket_acceptor< Protocol >> acceptor, const ServerHandler &handler)
 
void start ()
 
void stop ()
 
+ + + + + + + +

+Protected Attributes

boost::asio::io_service _ioService
 
std::shared_ptr< boost::asio::basic_socket_acceptor< Protocol > > _acceptor
 
const ServerHandler _handler
 
+

Detailed Description

+

template<typename Protocol>
+class TgBot::HttpServer< Protocol >

+ +

This class handles HTTP requests from the Internet.

+ +

Definition at line 39 of file HttpServer.h.

+

Member Typedef Documentation

+ +

◆ ServerHandler

+ +
+
+
+template<typename Protocol>
+ + + + +
typedef std::function<std::string (const std::string&, const std::map<std::string, std::string>)> TgBot::HttpServer< Protocol >::ServerHandler
+
+ +

Definition at line 42 of file HttpServer.h.

+ +
+
+

Constructor & Destructor Documentation

+ +

◆ HttpServer()

+ +
+
+
+template<typename Protocol>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
TgBot::HttpServer< Protocol >::HttpServer (std::shared_ptr< boost::asio::basic_socket_acceptor< Protocol >> acceptor,
const ServerHandlerhandler 
)
+
+inline
+
+ +

Definition at line 47 of file HttpServer.h.

+ +
+
+

Member Function Documentation

+ +

◆ start()

+ +
+
+
+template<typename Protocol>
+ + + + + +
+ + + + + + + +
void TgBot::HttpServer< Protocol >::start ()
+
+inline
+
+

Starts receiving new connections.

+ +

Definition at line 53 of file HttpServer.h.

+ +
+
+ +

◆ stop()

+ +
+
+
+template<typename Protocol>
+ + + + + +
+ + + + + + + +
void TgBot::HttpServer< Protocol >::stop ()
+
+inline
+
+

Stops receiving new connections.

+ +

Definition at line 66 of file HttpServer.h.

+ +
+
+

Member Data Documentation

+ +

◆ _acceptor

+ +
+
+
+template<typename Protocol>
+ + + + + +
+ + + + +
std::shared_ptr<boost::asio::basic_socket_acceptor<Protocol> > TgBot::HttpServer< Protocol >::_acceptor
+
+protected
+
+ +

Definition at line 96 of file HttpServer.h.

+ +
+
+ +

◆ _handler

+ +
+
+
+template<typename Protocol>
+ + + + + +
+ + + + +
const ServerHandler TgBot::HttpServer< Protocol >::_handler
+
+protected
+
+ +

Definition at line 97 of file HttpServer.h.

+ +
+
+ +

◆ _ioService

+ +
+
+
+template<typename Protocol>
+ + + + + +
+ + + + +
boost::asio::io_service TgBot::HttpServer< Protocol >::_ioService
+
+protected
+
+ +

Definition at line 95 of file HttpServer.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + diff --git a/docs/d4/d8b/class_tg_bot_1_1_http_server.js b/docs/d4/d8b/class_tg_bot_1_1_http_server.js new file mode 100644 index 0000000..d46a684 --- /dev/null +++ b/docs/d4/d8b/class_tg_bot_1_1_http_server.js @@ -0,0 +1,11 @@ +var class_tg_bot_1_1_http_server = +[ + [ "Connection", "d5/d11/class_tg_bot_1_1_http_server_1_1_connection.html", "d5/d11/class_tg_bot_1_1_http_server_1_1_connection" ], + [ "ServerHandler", "d4/d8b/class_tg_bot_1_1_http_server.html#ae3b5d008d0ec0c9dd14b4a8bccdf8c0b", null ], + [ "HttpServer", "d4/d8b/class_tg_bot_1_1_http_server.html#a8edad0dd91ffffa6cacce4d49cb60abe", null ], + [ "start", "d4/d8b/class_tg_bot_1_1_http_server.html#aa237b199d8a0712b983e4913970ad7f7", null ], + [ "stop", "d4/d8b/class_tg_bot_1_1_http_server.html#aeed8b9200cc2932126b9c27946751377", null ], + [ "_acceptor", "d4/d8b/class_tg_bot_1_1_http_server.html#a020e76d58f70ad41686081be41a8c108", null ], + [ "_handler", "d4/d8b/class_tg_bot_1_1_http_server.html#a9af2cf386463a1f40d0d3e9d92d88eec", null ], + [ "_ioService", "d4/d8b/class_tg_bot_1_1_http_server.html#a68812914f5c398331ee3ef8e77fe39b7", null ] +]; \ No newline at end of file diff --git a/docs/d4/d8b/class_tg_bot_1_1_http_server.png b/docs/d4/d8b/class_tg_bot_1_1_http_server.png new file mode 100644 index 0000000..a0a23d7 Binary files /dev/null and b/docs/d4/d8b/class_tg_bot_1_1_http_server.png differ diff --git a/docs/d4/d91/class_tg_bot_1_1_http_client-members.html b/docs/d4/d91/class_tg_bot_1_1_http_client-members.html new file mode 100644 index 0000000..5fc3a59 --- /dev/null +++ b/docs/d4/d91/class_tg_bot_1_1_http_client-members.html @@ -0,0 +1,102 @@ + + + + + + + +tgbot-cpp: Member List + + + + + + + + + + + + + + +
+
+ + + + + + +
+
tgbot-cpp +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
TgBot::HttpClient Member List
+
+
+ +

This is the complete list of members for TgBot::HttpClient, including all inherited members.

+ + + +
getInstance()TgBot::HttpClientstatic
makeRequest(const Url &url, const std::vector< HttpReqArg > &args)TgBot::HttpClient
+
+ + + + diff --git a/docs/d4/d9c/class_tg_bot_1_1_tg_long_poll-members.html b/docs/d4/d9c/class_tg_bot_1_1_tg_long_poll-members.html new file mode 100644 index 0000000..0ec2f16 --- /dev/null +++ b/docs/d4/d9c/class_tg_bot_1_1_tg_long_poll-members.html @@ -0,0 +1,103 @@ + + + + + + + +tgbot-cpp: Member List + + + + + + + + + + + + + + +
+
+ + + + + + +
+
tgbot-cpp +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
TgBot::TgLongPoll Member List
+
+
+ +

This is the complete list of members for TgBot::TgLongPoll, including all inherited members.

+ + + + +
start()TgBot::TgLongPoll
TgLongPoll(const Api *api, const EventHandler *eventHandler)TgBot::TgLongPoll
TgLongPoll(const Bot &bot)TgBot::TgLongPoll
+
+ + + + diff --git a/docs/d4/dbc/class_tg_bot_1_1_chosen_inline_result.html b/docs/d4/dbc/class_tg_bot_1_1_chosen_inline_result.html new file mode 100644 index 0000000..ce4b8cb --- /dev/null +++ b/docs/d4/dbc/class_tg_bot_1_1_chosen_inline_result.html @@ -0,0 +1,233 @@ + + + + + + + +tgbot-cpp: TgBot::ChosenInlineResult Class Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
tgbot-cpp +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
TgBot::ChosenInlineResult Class Reference
+
+
+ +

#include <ChosenInlineResult.h>

+ + + + +

+Public Types

typedef std::shared_ptr< ChosenInlineResultPtr
 
+ + + + + + + + + + + +

+Public Attributes

std::string resultId
 
User::Ptr from
 
Location::Ptr location
 
std::string inlineMessageId
 
std::string query
 
+

Detailed Description

+

This object represents a result of an inline query that was chosen by the user and sent to their chat partner.

+ +

Definition at line 20 of file ChosenInlineResult.h.

+

Member Typedef Documentation

+ +

◆ Ptr

+ +
+
+ + + + +
typedef std::shared_ptr<ChosenInlineResult> TgBot::ChosenInlineResult::Ptr
+
+ +

Definition at line 22 of file ChosenInlineResult.h.

+ +
+
+

Member Data Documentation

+ +

◆ from

+ +
+
+ + + + +
User::Ptr TgBot::ChosenInlineResult::from
+
+

The user that chose the result.

+ +

Definition at line 32 of file ChosenInlineResult.h.

+ +
+
+ +

◆ inlineMessageId

+ +
+
+ + + + +
std::string TgBot::ChosenInlineResult::inlineMessageId
+
+

Optional. Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message.

+ +

Definition at line 44 of file ChosenInlineResult.h.

+ +
+
+ +

◆ location

+ +
+
+ + + + +
Location::Ptr TgBot::ChosenInlineResult::location
+
+

Optional. Sender location, only for bots that require user location

+ +

Definition at line 37 of file ChosenInlineResult.h.

+ +
+
+ +

◆ query

+ +
+
+ + + + +
std::string TgBot::ChosenInlineResult::query
+
+

The query that was used to obtain the result.

+ +

Definition at line 49 of file ChosenInlineResult.h.

+ +
+
+ +

◆ resultId

+ +
+
+ + + + +
std::string TgBot::ChosenInlineResult::resultId
+
+

The unique identifier for the result that was chosen.

+ +

Definition at line 27 of file ChosenInlineResult.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + diff --git a/docs/d4/dbc/class_tg_bot_1_1_chosen_inline_result.js b/docs/d4/dbc/class_tg_bot_1_1_chosen_inline_result.js new file mode 100644 index 0000000..5e9e050 --- /dev/null +++ b/docs/d4/dbc/class_tg_bot_1_1_chosen_inline_result.js @@ -0,0 +1,9 @@ +var class_tg_bot_1_1_chosen_inline_result = +[ + [ "Ptr", "d4/dbc/class_tg_bot_1_1_chosen_inline_result.html#ad4b7edd30fd0d876fa99493fe19b3247", null ], + [ "from", "d4/dbc/class_tg_bot_1_1_chosen_inline_result.html#ab35d35a8968b0d943a415a23feed48cd", null ], + [ "inlineMessageId", "d4/dbc/class_tg_bot_1_1_chosen_inline_result.html#ab61cb2aadbf6ab78e334cbc49076514c", null ], + [ "location", "d4/dbc/class_tg_bot_1_1_chosen_inline_result.html#af4b33cf65a66df2adb1c06843b0ff998", null ], + [ "query", "d4/dbc/class_tg_bot_1_1_chosen_inline_result.html#a0fa803cc7dc0df4f5f35ce1db26d4c6d", null ], + [ "resultId", "d4/dbc/class_tg_bot_1_1_chosen_inline_result.html#a34fcb883f27cc3d3fae621a11c8f8270", null ] +]; \ No newline at end of file diff --git a/docs/d4/ddd/_api_8h.html b/docs/d4/ddd/_api_8h.html new file mode 100644 index 0000000..e2fdf2e --- /dev/null +++ b/docs/d4/ddd/_api_8h.html @@ -0,0 +1,129 @@ + + + + + + + +tgbot-cpp: include/tgbot/Api.h File Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
tgbot-cpp +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
Api.h File Reference
+
+
+
#include <string>
+#include <vector>
+#include <boost/property_tree/ptree.hpp>
+#include "tgbot/net/HttpReqArg.h"
+#include "tgbot/types/User.h"
+#include "tgbot/types/Message.h"
+#include "tgbot/types/GenericReply.h"
+#include "tgbot/types/InputFile.h"
+#include "tgbot/types/UserProfilePhotos.h"
+#include "tgbot/types/Update.h"
+#include "tgbot/types/InlineQueryResult.h"
+#include "tgbot/types/Venue.h"
+#include "tgbot/types/WebhookInfo.h"
+#include "tgbot/types/ChatMember.h"
+#include "tgbot/types/File.h"
+
+

Go to the source code of this file.

+ + + + +

+Classes

class  TgBot::Api
 
+ + + +

+Namespaces

 TgBot
 
+
+
+ + + + diff --git a/docs/d4/ddd/_api_8h_source.html b/docs/d4/ddd/_api_8h_source.html new file mode 100644 index 0000000..cd4c4ec --- /dev/null +++ b/docs/d4/ddd/_api_8h_source.html @@ -0,0 +1,154 @@ + + + + + + + +tgbot-cpp: include/tgbot/Api.h Source File + + + + + + + + + + + + + + +
+
+ + + + + + +
+
tgbot-cpp +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
Api.h
+
+
+Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Oleg Morozenkov
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy
5  * of this software and associated documentation files (the "Software"), to deal
6  * in the Software without restriction, including without limitation the rights
7  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8  * copies of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in all
12  * copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20  * SOFTWARE.
21  */
22 
23 #ifndef TGBOT_CPP_API_H
24 #define TGBOT_CPP_API_H
25 
26 #include <string>
27 #include <vector>
28 
29 #include <boost/property_tree/ptree.hpp>
30 
31 #include "tgbot/net/HttpReqArg.h"
32 #include "tgbot/types/User.h"
33 #include "tgbot/types/Message.h"
35 #include "tgbot/types/InputFile.h"
37 #include "tgbot/types/Update.h"
39 #include "tgbot/types/Venue.h"
41 #include "tgbot/types/ChatMember.h"
42 #include "tgbot/types/File.h"
43 
44 namespace TgBot {
45 
46 class Bot;
47 
52 class Api {
53 
54 typedef std::shared_ptr<std::vector<std::string>> StringArrayPtr;
55 
56 friend class Bot;
57 
58 public:
59  Api(const std::string& token);
60 
65  User::Ptr getMe() const;
66 
78  Message::Ptr sendMessage(int64_t chatId, const std::string& text, bool disableWebPagePreview = false, int32_t replyToMessageId = 0, const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), const std::string& parseMode = "", bool disableNotification = false) const;
79 
88  Message::Ptr forwardMessage(int64_t chatId, int64_t fromChatId, int32_t messageId, bool disableNotification = false) const;
89 
100  Message::Ptr sendPhoto(int64_t chatId, const InputFile::Ptr& photo, const std::string& caption = "", int32_t replyToMessageId = 0,
101  const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const;
102 
113  Message::Ptr sendPhoto(int64_t chatId, const std::string& photoId, const std::string& caption = "", int32_t replyToMessageId = 0,
114  const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const;
115 
129  Message::Ptr sendAudio(int64_t chatId, const InputFile::Ptr& audio, const std::string &caption = "", int32_t duration = 0,
130  const std::string& performer = "", const std::string& title = "", int32_t replyToMessageId = 0,
131  const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const;
132 
146  Message::Ptr sendAudio(int64_t chatId, const std::string& audioId, const std::string &caption = "", int32_t duration = 0,
147  const std::string& performer = "", const std::string& title = "", int32_t replyToMessageId = 0,
148  const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const;
149 
160  Message::Ptr sendDocument(int64_t chatId, const InputFile::Ptr& document, const std::string &caption = "", int32_t replyToMessageId = 0,
161  const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const;
162 
173  Message::Ptr sendDocument(int64_t chatId, const std::string& documentId, const std::string &caption = "", int32_t replyToMessageId = 0,
174  const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const;
175 
185  Message::Ptr sendSticker(int64_t chatId, const InputFile::Ptr& sticker, int32_t replyToMessageId = 0,
186  const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const;
187 
197  Message::Ptr sendSticker(int64_t chatId, const std::string& stickerId, int32_t replyToMessageId = 0,
198  const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const;
199 
213  Message::Ptr sendVideo(int64_t chatId, const InputFile::Ptr& video, int32_t duration = 0, int32_t width = 0, int32_t height = 0, const std::string &caption = "",
214  int32_t replyToMessageId = 0, const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const;
215 
229  Message::Ptr sendVideo(int64_t chatId, const std::string& videoId, int32_t duration = 0, int32_t width = 0, int32_t height = 0, const std::string &caption = "",
230  int32_t replyToMessageId = 0, const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const;
231 
243  Message::Ptr sendVoice(int64_t chatId, const InputFile::Ptr& voice, const std::string &caption = "", int duration = 0, int32_t replyToMessageId = 0,
244  const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const;
245 
257  Message::Ptr sendVoice(int64_t chatId, const std::string& voiceId, const std::string &caption = "", int duration = 0, int32_t replyToMessageId = 0,
258  const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const;
259 
270  Message::Ptr sendLocation(int64_t chatId, float latitude, float longitude, int32_t replyToMessageId = 0,
271  const GenericReply::Ptr& replyMarkup = GenericReply::Ptr(), bool disableNotification = false) const;
272 
286  Message::Ptr sendVenue(int64_t chatId, float latitude, float longitude, std::string title, std::string address, std::string foursquareId = "",
287  bool disableNotification = false, int32_t replyToMessageId = 0, const GenericReply::Ptr& replyMarkup = GenericReply::Ptr()) const;
288 
300  Message::Ptr sendContact(int64_t chatId, std::string phoneNumber, std::string firstName, std::string lastName = "", bool disableNotification = false,
301  int32_t replyToMessageId = 0, const GenericReply::Ptr& replyMarkup = GenericReply::Ptr()) const;
302 
310  void sendChatAction(int64_t chatId, const std::string& action) const;
311 
319  UserProfilePhotos::Ptr getUserProfilePhotos(int32_t userId, int32_t offset = 0, int32_t limit = 100) const;
320 
326  File::Ptr getFile(int32_t fileId) const;
327 
333  bool leaveChat(int64_t chatId) const;
334 
340  Chat::Ptr getChat(int64_t chatId) const;
341 
347  std::vector<ChatMember::Ptr> getChatAdministrators(int64_t chatId) const;
348 
354  int32_t getChatMembersCount(int64_t chatId) const;
355 
362  ChatMember::Ptr getChatMember(int64_t chatId, int32_t userId) const;
363 
373  bool answerCallbackQuery(const std::string & callbackQueryId, const std::string & text="", bool showAlert=false, const std::string &url="", int32_t cacheTime=0) const;
374 
386  Message::Ptr editMessageText(const std::string& text, int64_t chatId=0, int32_t messageId=0, const std::string& inlineMessageId="",
387  const std::string& parseMode = "", bool disableWebPagePreview = false, const GenericReply::Ptr& replyMarkup = GenericReply::Ptr()) const;
388 
398  Message::Ptr editMessageCaption(int64_t chatId = 0, int32_t messageId = 0, const std::string& caption = "",
399  const std::string& inlineMessageId = "", const GenericReply::Ptr& replyMarkup = GenericReply::Ptr()) const;
400 
409  Message::Ptr editMessageReplyMarkup(int64_t chatId = 0, int32_t messageId = 0, const std::string& inlineMessageId = "",
410  const GenericReply::Ptr& replyMarkup = GenericReply::Ptr()) const;
411 
422  std::vector<Update::Ptr> getUpdates(int32_t offset = 0, int32_t limit = 100, int32_t timeout = 0, const StringArrayPtr &allowedUpdates = nullptr) const;
423 
432  void setWebhook(const std::string& url = "", const InputFile::Ptr& certificate = nullptr, int32_t maxConnection = 40, const StringArrayPtr &allowedUpdates = nullptr) const;
433 
438  bool deleteWebhook() const;
439 
446 
459  bool answerInlineQuery(const std::string& inlineQueryId, const std::vector<InlineQueryResult::Ptr>& results,
460  int32_t cacheTime=300, bool isPersonal=false, const std::string& nextOffset="", const std::string& switchPmText="", const std::string& switchPmParameter="") const;
461 
468  bool kickChatMember(int64_t chatId, int32_t userId) const;
469 
476  bool unbanChatMember(int64_t chatId, int32_t userId) const;
477 
478 private:
479  boost::property_tree::ptree sendRequest(const std::string& method, const std::vector<HttpReqArg>& args = std::vector<HttpReqArg>()) const;
480 
481  const std::string _token;
482 };
483 
484 }
485 
486 #endif //TGBOT_CPP_API_H
Chat::Ptr getChat(int64_t chatId) const
+
Message::Ptr sendLocation(int64_t chatId, float latitude, float longitude, int32_t replyToMessageId=0, const GenericReply::Ptr &replyMarkup=GenericReply::Ptr(), bool disableNotification=false) const
+
std::shared_ptr< File > Ptr
Definition: File.h:24
+
std::vector< Update::Ptr > getUpdates(int32_t offset=0, int32_t limit=100, int32_t timeout=0, const StringArrayPtr &allowedUpdates=nullptr) const
+ +
Definition: Api.h:44
+ + +
Message::Ptr editMessageText(const std::string &text, int64_t chatId=0, int32_t messageId=0, const std::string &inlineMessageId="", const std::string &parseMode="", bool disableWebPagePreview=false, const GenericReply::Ptr &replyMarkup=GenericReply::Ptr()) const
+
bool answerCallbackQuery(const std::string &callbackQueryId, const std::string &text="", bool showAlert=false, const std::string &url="", int32_t cacheTime=0) const
+ +
Definition: Api.h:52
+
std::shared_ptr< Message > Ptr
Definition: Message.h:52
+
Message::Ptr sendPhoto(int64_t chatId, const InputFile::Ptr &photo, const std::string &caption="", int32_t replyToMessageId=0, const GenericReply::Ptr &replyMarkup=GenericReply::Ptr(), bool disableNotification=false) const
+
Message::Ptr sendDocument(int64_t chatId, const InputFile::Ptr &document, const std::string &caption="", int32_t replyToMessageId=0, const GenericReply::Ptr &replyMarkup=GenericReply::Ptr(), bool disableNotification=false) const
+ +
User::Ptr getMe() const
+
Message::Ptr sendSticker(int64_t chatId, const InputFile::Ptr &sticker, int32_t replyToMessageId=0, const GenericReply::Ptr &replyMarkup=GenericReply::Ptr(), bool disableNotification=false) const
+
Message::Ptr sendContact(int64_t chatId, std::string phoneNumber, std::string firstName, std::string lastName="", bool disableNotification=false, int32_t replyToMessageId=0, const GenericReply::Ptr &replyMarkup=GenericReply::Ptr()) const
+
std::shared_ptr< UserProfilePhotos > Ptr
+
Message::Ptr sendVoice(int64_t chatId, const InputFile::Ptr &voice, const std::string &caption="", int duration=0, int32_t replyToMessageId=0, const GenericReply::Ptr &replyMarkup=GenericReply::Ptr(), bool disableNotification=false) const
+
Message::Ptr sendMessage(int64_t chatId, const std::string &text, bool disableWebPagePreview=false, int32_t replyToMessageId=0, const GenericReply::Ptr &replyMarkup=GenericReply::Ptr(), const std::string &parseMode="", bool disableNotification=false) const
+
std::shared_ptr< WebhookInfo > Ptr
Definition: WebhookInfo.h:20
+
WebhookInfo::Ptr getWebhookInfo() const
+
void setWebhook(const std::string &url="", const InputFile::Ptr &certificate=nullptr, int32_t maxConnection=40, const StringArrayPtr &allowedUpdates=nullptr) const
+ + +
Definition: Bot.h:38
+
bool unbanChatMember(int64_t chatId, int32_t userId) const
+ +
int32_t getChatMembersCount(int64_t chatId) const
+
std::shared_ptr< GenericReply > Ptr
Definition: GenericReply.h:37
+
Message::Ptr editMessageReplyMarkup(int64_t chatId=0, int32_t messageId=0, const std::string &inlineMessageId="", const GenericReply::Ptr &replyMarkup=GenericReply::Ptr()) const
+
std::shared_ptr< InputFile > Ptr
Definition: InputFile.h:39
+
Message::Ptr forwardMessage(int64_t chatId, int64_t fromChatId, int32_t messageId, bool disableNotification=false) const
+
std::shared_ptr< Chat > Ptr
Definition: Chat.h:38
+
bool kickChatMember(int64_t chatId, int32_t userId) const
+
bool leaveChat(int64_t chatId) const
+
void sendChatAction(int64_t chatId, const std::string &action) const
+
bool answerInlineQuery(const std::string &inlineQueryId, const std::vector< InlineQueryResult::Ptr > &results, int32_t cacheTime=300, bool isPersonal=false, const std::string &nextOffset="", const std::string &switchPmText="", const std::string &switchPmParameter="") const
+
ChatMember::Ptr getChatMember(int64_t chatId, int32_t userId) const
+ +
bool deleteWebhook() const
+
Api(const std::string &token)
+
Message::Ptr sendVenue(int64_t chatId, float latitude, float longitude, std::string title, std::string address, std::string foursquareId="", bool disableNotification=false, int32_t replyToMessageId=0, const GenericReply::Ptr &replyMarkup=GenericReply::Ptr()) const
+ +
std::vector< ChatMember::Ptr > getChatAdministrators(int64_t chatId) const
+
UserProfilePhotos::Ptr getUserProfilePhotos(int32_t userId, int32_t offset=0, int32_t limit=100) const
+
std::shared_ptr< ChatMember > Ptr
Definition: ChatMember.h:21
+ +
Message::Ptr sendAudio(int64_t chatId, const InputFile::Ptr &audio, const std::string &caption="", int32_t duration=0, const std::string &performer="", const std::string &title="", int32_t replyToMessageId=0, const GenericReply::Ptr &replyMarkup=GenericReply::Ptr(), bool disableNotification=false) const
+
Message::Ptr editMessageCaption(int64_t chatId=0, int32_t messageId=0, const std::string &caption="", const std::string &inlineMessageId="", const GenericReply::Ptr &replyMarkup=GenericReply::Ptr()) const
+
Message::Ptr sendVideo(int64_t chatId, const InputFile::Ptr &video, int32_t duration=0, int32_t width=0, int32_t height=0, const std::string &caption="", int32_t replyToMessageId=0, const GenericReply::Ptr &replyMarkup=GenericReply::Ptr(), bool disableNotification=false) const
+
File::Ptr getFile(int32_t fileId) const
+
std::shared_ptr< User > Ptr
Definition: User.h:38
+ +
+
+ + + + diff --git a/docs/d4/de1/class_tg_bot_1_1_force_reply.html b/docs/d4/de1/class_tg_bot_1_1_force_reply.html new file mode 100644 index 0000000..4b716cc --- /dev/null +++ b/docs/d4/de1/class_tg_bot_1_1_force_reply.html @@ -0,0 +1,194 @@ + + + + + + + +tgbot-cpp: TgBot::ForceReply Class Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
tgbot-cpp +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
TgBot::ForceReply Class Reference
+
+
+ +

#include <ForceReply.h>

+
+Inheritance diagram for TgBot::ForceReply:
+
+
+ + +TgBot::GenericReply + +
+ + + + + + + +

+Public Types

typedef std::shared_ptr< ForceReplyPtr
 
- Public Types inherited from TgBot::GenericReply
typedef std::shared_ptr< GenericReplyPtr
 
+ + + + + +

+Public Attributes

const bool forceReply = true
 
bool selective = false
 
+ + + + +

+Additional Inherited Members

- Public Member Functions inherited from TgBot::GenericReply
virtual ~GenericReply ()
 
+

Detailed Description

+

Upon receiving a message with this object, Telegram clients will display a reply interface to the user (act as if the user has selected the bot‘s message and tapped ’Reply'). This can be extremely useful if you want to create user-friendly step-by-step interfaces without having to sacrifice privacy mode. Example: A poll bot for groups runs in privacy mode (only receives commands, replies to its messages and mentions). There could be two ways to create a new poll: Explain the user how to send a command with parameters (e.g. /newpoll question answer1 answer2). May be appealing for hardcore users but lacks modern day polish. Guide the user through a step-by-step process. ‘Please send me your question’, ‘Cool, now let’s add the first answer option‘, ’Great. Keep adding answer options, then send /done when you‘re ready’. The last option is definitely more attractive. And if you use ForceReply in your bot‘s questions, it will receive the user’s answers even if it only receives replies, commands and mentions — without any extra work for the user.

+ +

Definition at line 40 of file ForceReply.h.

+

Member Typedef Documentation

+ +

◆ Ptr

+ +
+
+ + + + +
typedef std::shared_ptr<ForceReply> TgBot::ForceReply::Ptr
+
+ +

Definition at line 43 of file ForceReply.h.

+ +
+
+

Member Data Documentation

+ +

◆ forceReply

+ +
+
+ + + + +
const bool TgBot::ForceReply::forceReply = true
+
+

Shows reply interface to the user, as if they manually selected the bot‘s message and tapped ’Reply'

+ +

Definition at line 48 of file ForceReply.h.

+ +
+
+ +

◆ selective

+ +
+
+ + + + +
bool TgBot::ForceReply::selective = false
+
+

Optional. Use this parameter if you want to force reply from specific users only. Targets: 1) users that are in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.

+ +

Definition at line 53 of file ForceReply.h.

+ +
+
+
The documentation for this class was generated from the following file: +
+
+ + + + diff --git a/docs/d4/de1/class_tg_bot_1_1_force_reply.js b/docs/d4/de1/class_tg_bot_1_1_force_reply.js new file mode 100644 index 0000000..5dacec4 --- /dev/null +++ b/docs/d4/de1/class_tg_bot_1_1_force_reply.js @@ -0,0 +1,6 @@ +var class_tg_bot_1_1_force_reply = +[ + [ "Ptr", "d4/de1/class_tg_bot_1_1_force_reply.html#a3d17d51e17dfdfd22d263bdeaf603b66", null ], + [ "forceReply", "d4/de1/class_tg_bot_1_1_force_reply.html#a8c4637ab74050185a86f5c058cf35de7", null ], + [ "selective", "d4/de1/class_tg_bot_1_1_force_reply.html#afbb510a24ebda5409311ff0d385065dc", null ] +]; \ No newline at end of file diff --git a/docs/d4/de1/class_tg_bot_1_1_force_reply.png b/docs/d4/de1/class_tg_bot_1_1_force_reply.png new file mode 100644 index 0000000..55f4b9d Binary files /dev/null and b/docs/d4/de1/class_tg_bot_1_1_force_reply.png differ diff --git a/docs/d4/deb/class_tg_bot_1_1_api-members.html b/docs/d4/deb/class_tg_bot_1_1_api-members.html new file mode 100644 index 0000000..5781497 --- /dev/null +++ b/docs/d4/deb/class_tg_bot_1_1_api-members.html @@ -0,0 +1,139 @@ + + + + + + + +tgbot-cpp: Member List + + + + + + + + + + + + + + +
+
+ + + + + + +
+
tgbot-cpp +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
TgBot::Api Member List
+
+
+ +

This is the complete list of members for TgBot::Api, including all inherited members.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
answerCallbackQuery(const std::string &callbackQueryId, const std::string &text="", bool showAlert=false, const std::string &url="", int32_t cacheTime=0) constTgBot::Api
answerInlineQuery(const std::string &inlineQueryId, const std::vector< InlineQueryResult::Ptr > &results, int32_t cacheTime=300, bool isPersonal=false, const std::string &nextOffset="", const std::string &switchPmText="", const std::string &switchPmParameter="") constTgBot::Api
Api(const std::string &token)TgBot::Api
Bot classTgBot::Apifriend
deleteWebhook() constTgBot::Api
editMessageCaption(int64_t chatId=0, int32_t messageId=0, const std::string &caption="", const std::string &inlineMessageId="", const GenericReply::Ptr &replyMarkup=GenericReply::Ptr()) constTgBot::Api
editMessageReplyMarkup(int64_t chatId=0, int32_t messageId=0, const std::string &inlineMessageId="", const GenericReply::Ptr &replyMarkup=GenericReply::Ptr()) constTgBot::Api
editMessageText(const std::string &text, int64_t chatId=0, int32_t messageId=0, const std::string &inlineMessageId="", const std::string &parseMode="", bool disableWebPagePreview=false, const GenericReply::Ptr &replyMarkup=GenericReply::Ptr()) constTgBot::Api
forwardMessage(int64_t chatId, int64_t fromChatId, int32_t messageId, bool disableNotification=false) constTgBot::Api
getChat(int64_t chatId) constTgBot::Api
getChatAdministrators(int64_t chatId) constTgBot::Api
getChatMember(int64_t chatId, int32_t userId) constTgBot::Api
getChatMembersCount(int64_t chatId) constTgBot::Api
getFile(int32_t fileId) constTgBot::Api
getMe() constTgBot::Api
getUpdates(int32_t offset=0, int32_t limit=100, int32_t timeout=0, const StringArrayPtr &allowedUpdates=nullptr) constTgBot::Api
getUserProfilePhotos(int32_t userId, int32_t offset=0, int32_t limit=100) constTgBot::Api
getWebhookInfo() constTgBot::Api
kickChatMember(int64_t chatId, int32_t userId) constTgBot::Api
leaveChat(int64_t chatId) constTgBot::Api
sendAudio(int64_t chatId, const InputFile::Ptr &audio, const std::string &caption="", int32_t duration=0, const std::string &performer="", const std::string &title="", int32_t replyToMessageId=0, const GenericReply::Ptr &replyMarkup=GenericReply::Ptr(), bool disableNotification=false) constTgBot::Api
sendAudio(int64_t chatId, const std::string &audioId, const std::string &caption="", int32_t duration=0, const std::string &performer="", const std::string &title="", int32_t replyToMessageId=0, const GenericReply::Ptr &replyMarkup=GenericReply::Ptr(), bool disableNotification=false) constTgBot::Api
sendChatAction(int64_t chatId, const std::string &action) constTgBot::Api
sendContact(int64_t chatId, std::string phoneNumber, std::string firstName, std::string lastName="", bool disableNotification=false, int32_t replyToMessageId=0, const GenericReply::Ptr &replyMarkup=GenericReply::Ptr()) constTgBot::Api
sendDocument(int64_t chatId, const InputFile::Ptr &document, const std::string &caption="", int32_t replyToMessageId=0, const GenericReply::Ptr &replyMarkup=GenericReply::Ptr(), bool disableNotification=false) constTgBot::Api
sendDocument(int64_t chatId, const std::string &documentId, const std::string &caption="", int32_t replyToMessageId=0, const GenericReply::Ptr &replyMarkup=GenericReply::Ptr(), bool disableNotification=false) constTgBot::Api
sendLocation(int64_t chatId, float latitude, float longitude, int32_t replyToMessageId=0, const GenericReply::Ptr &replyMarkup=GenericReply::Ptr(), bool disableNotification=false) constTgBot::Api
sendMessage(int64_t chatId, const std::string &text, bool disableWebPagePreview=false, int32_t replyToMessageId=0, const GenericReply::Ptr &replyMarkup=GenericReply::Ptr(), const std::string &parseMode="", bool disableNotification=false) constTgBot::Api
sendPhoto(int64_t chatId, const InputFile::Ptr &photo, const std::string &caption="", int32_t replyToMessageId=0, const GenericReply::Ptr &replyMarkup=GenericReply::Ptr(), bool disableNotification=false) constTgBot::Api
sendPhoto(int64_t chatId, const std::string &photoId, const std::string &caption="", int32_t replyToMessageId=0, const GenericReply::Ptr &replyMarkup=GenericReply::Ptr(), bool disableNotification=false) constTgBot::Api
sendSticker(int64_t chatId, const InputFile::Ptr &sticker, int32_t replyToMessageId=0, const GenericReply::Ptr &replyMarkup=GenericReply::Ptr(), bool disableNotification=false) constTgBot::Api
sendSticker(int64_t chatId, const std::string &stickerId, int32_t replyToMessageId=0, const GenericReply::Ptr &replyMarkup=GenericReply::Ptr(), bool disableNotification=false) constTgBot::Api
sendVenue(int64_t chatId, float latitude, float longitude, std::string title, std::string address, std::string foursquareId="", bool disableNotification=false, int32_t replyToMessageId=0, const GenericReply::Ptr &replyMarkup=GenericReply::Ptr()) constTgBot::Api
sendVideo(int64_t chatId, const InputFile::Ptr &video, int32_t duration=0, int32_t width=0, int32_t height=0, const std::string &caption="", int32_t replyToMessageId=0, const GenericReply::Ptr &replyMarkup=GenericReply::Ptr(), bool disableNotification=false) constTgBot::Api
sendVideo(int64_t chatId, const std::string &videoId, int32_t duration=0, int32_t width=0, int32_t height=0, const std::string &caption="", int32_t replyToMessageId=0, const GenericReply::Ptr &replyMarkup=GenericReply::Ptr(), bool disableNotification=false) constTgBot::Api
sendVoice(int64_t chatId, const InputFile::Ptr &voice, const std::string &caption="", int duration=0, int32_t replyToMessageId=0, const GenericReply::Ptr &replyMarkup=GenericReply::Ptr(), bool disableNotification=false) constTgBot::Api
sendVoice(int64_t chatId, const std::string &voiceId, const std::string &caption="", int duration=0, int32_t replyToMessageId=0, const GenericReply::Ptr &replyMarkup=GenericReply::Ptr(), bool disableNotification=false) constTgBot::Api
setWebhook(const std::string &url="", const InputFile::Ptr &certificate=nullptr, int32_t maxConnection=40, const StringArrayPtr &allowedUpdates=nullptr) constTgBot::Api
unbanChatMember(int64_t chatId, int32_t userId) constTgBot::Api
+
+ + + + -- cgit v1.2.3