You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

334 lines
44 KiB

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>LibTgBotPP: TelegramBot.cc Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">LibTgBotPP
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('TelegramBot_8cc_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Macros</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">TelegramBot.cc</div> </div>
</div><!--header-->
<div class="contents">
<a href="TelegramBot_8cc.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="TelegramBot_8h.html">Telegram/TelegramBot.h</a>&quot;</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;</div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;</div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="preprocessor">#include &lt;curlpp/cURLpp.hpp&gt;</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="preprocessor">#include &lt;curlpp/Easy.hpp&gt;</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="preprocessor">#include &lt;curlpp/Infos.hpp&gt;</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="preprocessor">#include &lt;curlpp/Options.hpp&gt;</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;</div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="http__build__query_8h.html">http_build_query.h</a>&quot;</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="json__encode_8h.html">json_encode.h</a>&quot;</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="std_8h.html">std.h</a>&quot;</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;</div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="Message_8h.html">Telegram/Message.h</a>&quot;</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="MessageEntity_8h.html">Telegram/MessageEntity.h</a>&quot;</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;</div>
<div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="TelegramBot_8cc.html#a47cbcc6d148fe0c8f9fb95966026aa97"> 17</a></span>&#160;<span class="preprocessor">#define API_URL &quot;https://api.telegram.org/bot&quot;</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="classTelegram_1_1TelegramBot.html#a99b561e695953e6b69a3ddf6937a4811"> 22</a></span>&#160;<a class="code" href="classTelegram_1_1TelegramBot.html#a99b561e695953e6b69a3ddf6937a4811">Telegram::TelegramBot::TelegramBot</a>() {</div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;</div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160; this-&gt;<a class="code" href="classTelegram_1_1TelegramBot.html#a1ca971ccfb242f7b8656eca3ab7666dd">api_url</a> = <span class="stringliteral">&quot;&quot;</span>;</div>
<div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160; this-&gt;<a class="code" href="classTelegram_1_1TelegramBot.html#ae0d0fe5d54afcc9e6ee16b3d4f8ae895">init</a>();</div>
<div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;}</div>
<div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;</div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="classTelegram_1_1TelegramBot.html#a52f2a5f734bac5f83d2c0e5068618646"> 33</a></span>&#160;<a class="code" href="classTelegram_1_1TelegramBot.html#a99b561e695953e6b69a3ddf6937a4811">Telegram::TelegramBot::TelegramBot</a>(std::string token) {</div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;</div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; this-&gt;api_url = <a class="code" href="TelegramBot_8cc.html#a47cbcc6d148fe0c8f9fb95966026aa97">API_URL</a> + token + <span class="stringliteral">&quot;/&quot;</span>;</div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; this-&gt;init();</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;}</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;</div>
<div class="line"><a name="l00044"></a><span class="lineno"><a class="line" href="classTelegram_1_1TelegramBot.html#a398bd76186e27d514afd835c5437c6ed"> 44</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classTelegram_1_1TelegramBot.html#a398bd76186e27d514afd835c5437c6ed">Telegram::TelegramBot::addCommand</a>(<a class="code" href="structTelegram_1_1TCommand.html">TCommand</a> cmd) {</div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;</div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; <span class="keywordflow">if</span> (cmd.<a class="code" href="structTelegram_1_1TCommand.html#a1c051d162e478b9f98efafbeeed19f9b">command</a>[0] != <span class="charliteral">&#39;/&#39;</span>) {</div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; cmd.<a class="code" href="structTelegram_1_1TCommand.html#a1c051d162e478b9f98efafbeeed19f9b">command</a> = <span class="stringliteral">&quot;/&quot;</span> + cmd.<a class="code" href="structTelegram_1_1TCommand.html#a1c051d162e478b9f98efafbeeed19f9b">command</a>;</div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; }</div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; this-&gt;command_map[cmd.<a class="code" href="structTelegram_1_1TCommand.html#a1c051d162e478b9f98efafbeeed19f9b">command</a>] = cmd;</div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;}</div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160;</div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="classTelegram_1_1TelegramBot.html#aabd1a825b1d7f127f15bf336b985d70d"> 60</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classTelegram_1_1TelegramBot.html#aabd1a825b1d7f127f15bf336b985d70d">Telegram::TelegramBot::setWebhook</a>(std::string url) {</div>
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;</div>
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; std::map&lt;std::string, std::string&gt; params;</div>
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;</div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; params[<span class="stringliteral">&quot;url&quot;</span>] = url;</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; this-&gt;apiRequest(<span class="stringliteral">&quot;setWebhook&quot;</span>, params);</div>
<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;}</div>
<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160;</div>
<div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="classTelegram_1_1TelegramBot.html#af6fbb842f679b33dd8a60f94f82d7c81"> 74</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classTelegram_1_1TelegramBot.html#af6fbb842f679b33dd8a60f94f82d7c81">Telegram::TelegramBot::processMessage</a>(std::string message) {</div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160;</div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; this-&gt;msg = <span class="keyword">new</span> <a class="code" href="classTelegram_1_1Message.html">Telegram::Message</a>(message);</div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160;</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; <a class="code" href="namespaceTelegram.html#aa7927193a64b09836112d3be24c45d85">Telegram::TMessageEntities</a> entities = this-&gt;msg-&gt;getEntities();</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160;</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; <span class="keywordflow">if</span> (entities.size() &amp;&amp; (entities[0]-&gt;getType() == <span class="stringliteral">&quot;bot_command&quot;</span>)) {</div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; this-&gt;sendMessage(this-&gt;processCommand(this-&gt;msg-&gt;getText()), this-&gt;msg-&gt;getChat()-&gt;getId());</div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; this-&gt;sendMessage(<span class="stringliteral">&quot;Hello &quot;</span> + this-&gt;msg-&gt;getChat()-&gt;getUsername() + <span class="stringliteral">&quot;, you told me: &#39;&quot;</span> + msg-&gt;getText() + <span class="stringliteral">&quot;&#39;&quot;</span>, this-&gt;msg-&gt;getChat()-&gt;getId());</div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; }</div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160;}</div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160;</div>
<div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="classTelegram_1_1TelegramBot.html#a1645dae5fdfb1437bb8976f44c237563"> 90</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classTelegram_1_1TelegramBot.html#a1645dae5fdfb1437bb8976f44c237563">Telegram::TelegramBot::sendMessage</a>(std::string message, Json::Int64 chat_id) {</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;</div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; this-&gt;sendMessage(message, <a class="code" href="example01_8cc.html#a0d2f37137ee1fd6ff4a0ef803849dd63">SSTR</a>(chat_id));</div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160;}</div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160;</div>
<div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="classTelegram_1_1TelegramBot.html#ac9fdf927b0ebf72b40a0a75639e39d18"> 98</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classTelegram_1_1TelegramBot.html#a1645dae5fdfb1437bb8976f44c237563">Telegram::TelegramBot::sendMessage</a>(std::string message, std::string chat_id) {</div>
<div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160;</div>
<div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; std::map&lt;std::string, std::string&gt; params;</div>
<div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; params[<span class="stringliteral">&quot;chat_id&quot;</span>] = chat_id;</div>
<div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; params[<span class="stringliteral">&quot;text&quot;</span>] = message;</div>
<div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160;</div>
<div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; this-&gt;apiRequestJson(<span class="stringliteral">&quot;sendMessage&quot;</span>, params);</div>
<div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160;}</div>
<div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160;</div>
<div class="line"><a name="l00110"></a><span class="lineno"><a class="line" href="classTelegram_1_1TelegramBot.html#a58e633cc42dcd964a37e2814102764bc"> 110</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classTelegram_1_1TelegramBot.html#a58e633cc42dcd964a37e2814102764bc">Telegram::TelegramBot::sendPhoto</a>(std::string URL, Json::Int64 chat_id) {</div>
<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160;</div>
<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; this-&gt;sendPhoto(URL, <a class="code" href="example01_8cc.html#a0d2f37137ee1fd6ff4a0ef803849dd63">SSTR</a>(chat_id));</div>
<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160;}</div>
<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160;</div>
<div class="line"><a name="l00118"></a><span class="lineno"><a class="line" href="classTelegram_1_1TelegramBot.html#a257660b7cead3d886d94824efe9819f6"> 118</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classTelegram_1_1TelegramBot.html#a58e633cc42dcd964a37e2814102764bc">Telegram::TelegramBot::sendPhoto</a>(std::string URL, std::string chat_id) {</div>
<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160;</div>
<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; std::map&lt;std::string, std::string&gt; params;</div>
<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160;</div>
<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; params[<span class="stringliteral">&quot;chat_id&quot;</span>] = chat_id;</div>
<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; params[<span class="stringliteral">&quot;photo&quot;</span>] = URL;</div>
<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160;</div>
<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; this-&gt;apiRequestJson(<span class="stringliteral">&quot;sendPhoto&quot;</span>, params);</div>
<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160;}</div>
<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160;</div>
<div class="line"><a name="l00128"></a><span class="lineno"><a class="line" href="classTelegram_1_1TelegramBot.html#a7c54766f656974b35f03ea510d7b6a4f"> 128</a></span>&#160;<a class="code" href="classTelegram_1_1Message.html">Telegram::Message</a> *<a class="code" href="classTelegram_1_1TelegramBot.html#a7c54766f656974b35f03ea510d7b6a4f">Telegram::TelegramBot::getMessage</a>() {</div>
<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;</div>
<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; <span class="keywordflow">return</span>(this-&gt;msg);</div>
<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160;}</div>
<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160;</div>
<div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="classTelegram_1_1TelegramBot.html#aae9aba06108ce34f9766199c6588e1d6"> 133</a></span>&#160;<a class="code" href="namespaceTelegram.html#ad82f4bcddd3c7921e8842bb30170a1c2">Telegram::TCommandMap</a> <a class="code" href="classTelegram_1_1TelegramBot.html#aae9aba06108ce34f9766199c6588e1d6">Telegram::TelegramBot::getCommandMap</a>() {</div>
<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160;</div>
<div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160; <span class="keywordflow">return</span>(this-&gt;command_map);</div>
<div class="line"><a name="l00136"></a><span class="lineno"> 136</span>&#160;}</div>
<div class="line"><a name="l00137"></a><span class="lineno"> 137</span>&#160;</div>
<div class="line"><a name="l00138"></a><span class="lineno"> 138</span>&#160;<span class="comment">// Private methods</span></div>
<div class="line"><a name="l00139"></a><span class="lineno"><a class="line" href="classTelegram_1_1TelegramBot.html#ae0d0fe5d54afcc9e6ee16b3d4f8ae895"> 139</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classTelegram_1_1TelegramBot.html#ae0d0fe5d54afcc9e6ee16b3d4f8ae895">Telegram::TelegramBot::init</a>() {</div>
<div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160;</div>
<div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160; std::cout &lt;&lt; <span class="stringliteral">&quot;Content-type: text/html\r\n\r\n&quot;</span> &lt;&lt; std::endl;</div>
<div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160;}</div>
<div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;</div>
<div class="line"><a name="l00147"></a><span class="lineno"><a class="line" href="classTelegram_1_1TelegramBot.html#a7e07f1ca99390958ef5c6c95cbf18258"> 147</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classTelegram_1_1TelegramBot.html#a7e07f1ca99390958ef5c6c95cbf18258">Telegram::TelegramBot::apiRequest</a>(std::string method, std::map&lt;std::string, std::string&gt; parameters) {</div>
<div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160;</div>
<div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; parameters[<span class="stringliteral">&quot;method&quot;</span>] = method;</div>
<div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160;</div>
<div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; Json::Value jValues;</div>
<div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; Json::StyledWriter w;</div>
<div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160;</div>
<div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; <span class="keywordflow">for</span>(std::map&lt;std::string, std::string&gt;::iterator it = parameters.begin(); it != parameters.end(); ++it) {</div>
<div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; jValues[(*it).first] = (*it).second;</div>
<div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; }</div>
<div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;</div>
<div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; <span class="keywordflow">try</span> {</div>
<div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; cURLpp::Easy handle;</div>
<div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; std::string url = this-&gt;api_url + method + <span class="stringliteral">&quot;?&quot;</span> + <a class="code" href="http__build__query_8cc.html#a1e3cd58bbf46d30f168bbc0ee5cc486b">http_build_query</a>(parameters);</div>
<div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160;</div>
<div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; handle.setOpt(cURLpp::Options::Url(url));</div>
<div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; handle.setOpt(cURLpp::Options::ConnectTimeout(5));</div>
<div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; handle.setOpt(cURLpp::Options::Timeout(60));</div>
<div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; handle.perform(); <span class="comment">// Do the curl request</span></div>
<div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160;</div>
<div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; <span class="keywordtype">int</span> code;</div>
<div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; code = cURLpp::Infos::ResponseCode::get(handle);</div>
<div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; }</div>
<div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; <span class="keywordflow">catch</span>(cURLpp::LogicError &amp;e) {</div>
<div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; <a class="code" href="std_8cc.html#a55fa50be9360d756a7cf448d7e9e0cc9">Log</a>(e.what());</div>
<div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; }</div>
<div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; <span class="keywordflow">catch</span>(cURLpp::RuntimeError &amp;e) {</div>
<div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; <a class="code" href="std_8cc.html#a55fa50be9360d756a7cf448d7e9e0cc9">Log</a>(e.what());</div>
<div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; }</div>
<div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; <span class="keywordflow">catch</span>(std::exception &amp;e) {</div>
<div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; <a class="code" href="std_8cc.html#a55fa50be9360d756a7cf448d7e9e0cc9">Log</a>(e.what());</div>
<div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; }</div>
<div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160;}</div>
<div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160;</div>
<div class="line"><a name="l00184"></a><span class="lineno"><a class="line" href="classTelegram_1_1TelegramBot.html#a9ee0c2d12f906cb2e0a9b7fb2d7e45a5"> 184</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classTelegram_1_1TelegramBot.html#a9ee0c2d12f906cb2e0a9b7fb2d7e45a5">Telegram::TelegramBot::apiRequestJson</a>(std::string method, std::map&lt;std::string, std::string&gt; parameters) {</div>
<div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160;</div>
<div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160; parameters[<span class="stringliteral">&quot;method&quot;</span>] = method;</div>
<div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160;</div>
<div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160; <span class="keywordflow">try</span> {</div>
<div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160; cURLpp::Easy handle;</div>
<div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; std::list&lt;std::string&gt; header;</div>
<div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; header.push_back(<span class="stringliteral">&quot;Content-Type: application/json&quot;</span>);</div>
<div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160;</div>
<div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160; handle.setOpt(cURLpp::Options::Url(this-&gt;api_url));</div>
<div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; handle.setOpt(cURLpp::Options::ConnectTimeout(5));</div>
<div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; handle.setOpt(cURLpp::Options::Timeout(60));</div>
<div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; handle.setOpt(cURLpp::Options::HttpHeader(header));</div>
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; handle.setOpt(cURLpp::Options::PostFields(<a class="code" href="json__encode_8cc.html#ad8ce82c71c39fc700005394fccc714e2">json_encode</a>(parameters)));</div>
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; handle.perform(); <span class="comment">// Do the curl request</span></div>
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; }</div>
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; <span class="keywordflow">catch</span>(cURLpp::LogicError &amp;e) {</div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; <a class="code" href="std_8cc.html#a55fa50be9360d756a7cf448d7e9e0cc9">Log</a>(e.what());</div>
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; }</div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; <span class="keywordflow">catch</span>(cURLpp::RuntimeError &amp;e) {</div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160; <a class="code" href="std_8cc.html#a55fa50be9360d756a7cf448d7e9e0cc9">Log</a>(e.what());</div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; }</div>
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160; <span class="keywordflow">catch</span>(std::exception &amp;e) {</div>
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; <a class="code" href="std_8cc.html#a55fa50be9360d756a7cf448d7e9e0cc9">Log</a>(e.what());</div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160; }</div>
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160;}</div>
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160;</div>
<div class="line"><a name="l00211"></a><span class="lineno"><a class="line" href="classTelegram_1_1TelegramBot.html#aed4dd1ce506259c0e82f0c46fe125ca4"> 211</a></span>&#160;std::string <a class="code" href="classTelegram_1_1TelegramBot.html#aed4dd1ce506259c0e82f0c46fe125ca4">Telegram::TelegramBot::processCommand</a>(std::string cmd) {</div>
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160;</div>
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160; <span class="comment">// Process command</span></div>
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160; std::string sCommand;</div>
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160; std::string sResult;</div>
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160; std::vector&lt;std::string&gt; vCmdLine = <a class="code" href="std_8cc.html#ae7427d6dcae9b9190db26d2e1b6700af">split</a>(cmd, <span class="charliteral">&#39; &#39;</span>);</div>
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160;</div>
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160; <span class="keywordflow">if</span>((vCmdLine.size() &gt; 0) &amp;&amp; (this-&gt;command_map.find(vCmdLine[0]) != this-&gt;command_map.end())) {</div>
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160; sCommand = vCmdLine[0];</div>
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160; vCmdLine.erase(vCmdLine.begin()); <span class="comment">// First value is the command itself</span></div>
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160; <a class="code" href="structTelegram_1_1TCommand.html">TCommand</a> cs = this-&gt;command_map[sCommand];</div>
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160; sResult = (*cs.<a class="code" href="structTelegram_1_1TCommand.html#a3f2c8ecbfd34be25baa577afee2e6e52">callback</a>)(<span class="keyword">this</span>, vCmdLine);</div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160; } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160; sResult = <span class="stringliteral">&quot;Unknown command&quot;</span>;</div>
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160; }</div>
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160;</div>
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160; <span class="keywordflow">return</span>(sResult);</div>
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160;}</div>
<div class="ttc" id="classTelegram_1_1TelegramBot_html_ae0d0fe5d54afcc9e6ee16b3d4f8ae895"><div class="ttname"><a href="classTelegram_1_1TelegramBot.html#ae0d0fe5d54afcc9e6ee16b3d4f8ae895">Telegram::TelegramBot::init</a></div><div class="ttdeci">void init()</div><div class="ttdef"><b>Definition:</b> <a href="TelegramBot_8cc_source.html#l00139">TelegramBot.cc:139</a></div></div>
<div class="ttc" id="structTelegram_1_1TCommand_html_a1c051d162e478b9f98efafbeeed19f9b"><div class="ttname"><a href="structTelegram_1_1TCommand.html#a1c051d162e478b9f98efafbeeed19f9b">Telegram::TCommand::command</a></div><div class="ttdeci">std::string command</div><div class="ttdoc">The command, e.g. /help. </div><div class="ttdef"><b>Definition:</b> <a href="TelegramBot_8h_source.html#l00026">TelegramBot.h:26</a></div></div>
<div class="ttc" id="Message_8h_html"><div class="ttname"><a href="Message_8h.html">Message.h</a></div></div>
<div class="ttc" id="example01_8cc_html_a0d2f37137ee1fd6ff4a0ef803849dd63"><div class="ttname"><a href="example01_8cc.html#a0d2f37137ee1fd6ff4a0ef803849dd63">SSTR</a></div><div class="ttdeci">#define SSTR(x)</div><div class="ttdef"><b>Definition:</b> <a href="example01_8cc_source.html#l00035">example01.cc:35</a></div></div>
<div class="ttc" id="classTelegram_1_1Message_html"><div class="ttname"><a href="classTelegram_1_1Message.html">Telegram::Message</a></div><div class="ttdef"><b>Definition:</b> <a href="Message_8h_source.html#l00027">Message.h:27</a></div></div>
<div class="ttc" id="classTelegram_1_1TelegramBot_html_a1645dae5fdfb1437bb8976f44c237563"><div class="ttname"><a href="classTelegram_1_1TelegramBot.html#a1645dae5fdfb1437bb8976f44c237563">Telegram::TelegramBot::sendMessage</a></div><div class="ttdeci">void sendMessage(std::string, Json::Int64)</div><div class="ttdef"><b>Definition:</b> <a href="TelegramBot_8cc_source.html#l00090">TelegramBot.cc:90</a></div></div>
<div class="ttc" id="std_8cc_html_ae7427d6dcae9b9190db26d2e1b6700af"><div class="ttname"><a href="std_8cc.html#ae7427d6dcae9b9190db26d2e1b6700af">split</a></div><div class="ttdeci">std::vector&lt; std::string &gt; split(const std::string &amp;text, char sep)</div><div class="ttdef"><b>Definition:</b> <a href="std_8cc_source.html#l00042">std.cc:42</a></div></div>
<div class="ttc" id="classTelegram_1_1TelegramBot_html_aabd1a825b1d7f127f15bf336b985d70d"><div class="ttname"><a href="classTelegram_1_1TelegramBot.html#aabd1a825b1d7f127f15bf336b985d70d">Telegram::TelegramBot::setWebhook</a></div><div class="ttdeci">void setWebhook(std::string)</div><div class="ttdef"><b>Definition:</b> <a href="TelegramBot_8cc_source.html#l00060">TelegramBot.cc:60</a></div></div>
<div class="ttc" id="classTelegram_1_1TelegramBot_html_af6fbb842f679b33dd8a60f94f82d7c81"><div class="ttname"><a href="classTelegram_1_1TelegramBot.html#af6fbb842f679b33dd8a60f94f82d7c81">Telegram::TelegramBot::processMessage</a></div><div class="ttdeci">void processMessage(std::string)</div><div class="ttdef"><b>Definition:</b> <a href="TelegramBot_8cc_source.html#l00074">TelegramBot.cc:74</a></div></div>
<div class="ttc" id="classTelegram_1_1TelegramBot_html_a7e07f1ca99390958ef5c6c95cbf18258"><div class="ttname"><a href="classTelegram_1_1TelegramBot.html#a7e07f1ca99390958ef5c6c95cbf18258">Telegram::TelegramBot::apiRequest</a></div><div class="ttdeci">void apiRequest(std::string, std::map&lt; std::string, std::string &gt;)</div><div class="ttdef"><b>Definition:</b> <a href="TelegramBot_8cc_source.html#l00147">TelegramBot.cc:147</a></div></div>
<div class="ttc" id="classTelegram_1_1TelegramBot_html_aae9aba06108ce34f9766199c6588e1d6"><div class="ttname"><a href="classTelegram_1_1TelegramBot.html#aae9aba06108ce34f9766199c6588e1d6">Telegram::TelegramBot::getCommandMap</a></div><div class="ttdeci">std::map&lt; std::string, TCommand &gt; getCommandMap()</div><div class="ttdef"><b>Definition:</b> <a href="TelegramBot_8cc_source.html#l00133">TelegramBot.cc:133</a></div></div>
<div class="ttc" id="classTelegram_1_1TelegramBot_html_a58e633cc42dcd964a37e2814102764bc"><div class="ttname"><a href="classTelegram_1_1TelegramBot.html#a58e633cc42dcd964a37e2814102764bc">Telegram::TelegramBot::sendPhoto</a></div><div class="ttdeci">void sendPhoto(std::string, Json::Int64)</div><div class="ttdef"><b>Definition:</b> <a href="TelegramBot_8cc_source.html#l00110">TelegramBot.cc:110</a></div></div>
<div class="ttc" id="classTelegram_1_1TelegramBot_html_aed4dd1ce506259c0e82f0c46fe125ca4"><div class="ttname"><a href="classTelegram_1_1TelegramBot.html#aed4dd1ce506259c0e82f0c46fe125ca4">Telegram::TelegramBot::processCommand</a></div><div class="ttdeci">std::string processCommand(std::string)</div><div class="ttdef"><b>Definition:</b> <a href="TelegramBot_8cc_source.html#l00211">TelegramBot.cc:211</a></div></div>
<div class="ttc" id="structTelegram_1_1TCommand_html"><div class="ttname"><a href="structTelegram_1_1TCommand.html">Telegram::TCommand</a></div><div class="ttdef"><b>Definition:</b> <a href="TelegramBot_8h_source.html#l00025">TelegramBot.h:25</a></div></div>
<div class="ttc" id="TelegramBot_8h_html"><div class="ttname"><a href="TelegramBot_8h.html">TelegramBot.h</a></div></div>
<div class="ttc" id="http__build__query_8h_html"><div class="ttname"><a href="http__build__query_8h.html">http_build_query.h</a></div></div>
<div class="ttc" id="classTelegram_1_1TelegramBot_html_a99b561e695953e6b69a3ddf6937a4811"><div class="ttname"><a href="classTelegram_1_1TelegramBot.html#a99b561e695953e6b69a3ddf6937a4811">Telegram::TelegramBot::TelegramBot</a></div><div class="ttdeci">TelegramBot()</div><div class="ttdef"><b>Definition:</b> <a href="TelegramBot_8cc_source.html#l00022">TelegramBot.cc:22</a></div></div>
<div class="ttc" id="structTelegram_1_1TCommand_html_a3f2c8ecbfd34be25baa577afee2e6e52"><div class="ttname"><a href="structTelegram_1_1TCommand.html#a3f2c8ecbfd34be25baa577afee2e6e52">Telegram::TCommand::callback</a></div><div class="ttdeci">CommandCallback callback</div><div class="ttdoc">Pointer to the callback function. </div><div class="ttdef"><b>Definition:</b> <a href="TelegramBot_8h_source.html#l00027">TelegramBot.h:27</a></div></div>
<div class="ttc" id="std_8cc_html_a55fa50be9360d756a7cf448d7e9e0cc9"><div class="ttname"><a href="std_8cc.html#a55fa50be9360d756a7cf448d7e9e0cc9">Log</a></div><div class="ttdeci">void Log(std::string msg)</div><div class="ttdef"><b>Definition:</b> <a href="std_8cc_source.html#l00091">std.cc:91</a></div></div>
<div class="ttc" id="std_8h_html"><div class="ttname"><a href="std_8h.html">std.h</a></div></div>
<div class="ttc" id="namespaceTelegram_html_ad82f4bcddd3c7921e8842bb30170a1c2"><div class="ttname"><a href="namespaceTelegram.html#ad82f4bcddd3c7921e8842bb30170a1c2">Telegram::TCommandMap</a></div><div class="ttdeci">std::map&lt; std::string, TCommand &gt; TCommandMap</div><div class="ttdoc">Map that stores the known commands. </div><div class="ttdef"><b>Definition:</b> <a href="TelegramBot_8h_source.html#l00030">TelegramBot.h:30</a></div></div>
<div class="ttc" id="TelegramBot_8cc_html_a47cbcc6d148fe0c8f9fb95966026aa97"><div class="ttname"><a href="TelegramBot_8cc.html#a47cbcc6d148fe0c8f9fb95966026aa97">API_URL</a></div><div class="ttdeci">#define API_URL</div><div class="ttdef"><b>Definition:</b> <a href="TelegramBot_8cc_source.html#l00017">TelegramBot.cc:17</a></div></div>
<div class="ttc" id="classTelegram_1_1TelegramBot_html_a398bd76186e27d514afd835c5437c6ed"><div class="ttname"><a href="classTelegram_1_1TelegramBot.html#a398bd76186e27d514afd835c5437c6ed">Telegram::TelegramBot::addCommand</a></div><div class="ttdeci">void addCommand(TCommand)</div><div class="ttdef"><b>Definition:</b> <a href="TelegramBot_8cc_source.html#l00044">TelegramBot.cc:44</a></div></div>
<div class="ttc" id="classTelegram_1_1TelegramBot_html_a7c54766f656974b35f03ea510d7b6a4f"><div class="ttname"><a href="classTelegram_1_1TelegramBot.html#a7c54766f656974b35f03ea510d7b6a4f">Telegram::TelegramBot::getMessage</a></div><div class="ttdeci">Telegram::Message * getMessage()</div><div class="ttdef"><b>Definition:</b> <a href="TelegramBot_8cc_source.html#l00128">TelegramBot.cc:128</a></div></div>
<div class="ttc" id="MessageEntity_8h_html"><div class="ttname"><a href="MessageEntity_8h.html">MessageEntity.h</a></div></div>
<div class="ttc" id="namespaceTelegram_html_aa7927193a64b09836112d3be24c45d85"><div class="ttname"><a href="namespaceTelegram.html#aa7927193a64b09836112d3be24c45d85">Telegram::TMessageEntities</a></div><div class="ttdeci">std::vector&lt; Telegram::MessageEntity * &gt; TMessageEntities</div><div class="ttdef"><b>Definition:</b> <a href="MessageEntity_8h_source.html#l00023">MessageEntity.h:23</a></div></div>
<div class="ttc" id="json__encode_8h_html"><div class="ttname"><a href="json__encode_8h.html">json_encode.h</a></div></div>
<div class="ttc" id="http__build__query_8cc_html_a1e3cd58bbf46d30f168bbc0ee5cc486b"><div class="ttname"><a href="http__build__query_8cc.html#a1e3cd58bbf46d30f168bbc0ee5cc486b">http_build_query</a></div><div class="ttdeci">std::string http_build_query(std::map&lt; std::string, std::string &gt; data)</div><div class="ttdef"><b>Definition:</b> <a href="http__build__query_8cc_source.html#l00003">http_build_query.cc:3</a></div></div>
<div class="ttc" id="classTelegram_1_1TelegramBot_html_a9ee0c2d12f906cb2e0a9b7fb2d7e45a5"><div class="ttname"><a href="classTelegram_1_1TelegramBot.html#a9ee0c2d12f906cb2e0a9b7fb2d7e45a5">Telegram::TelegramBot::apiRequestJson</a></div><div class="ttdeci">void apiRequestJson(std::string, std::map&lt; std::string, std::string &gt;)</div><div class="ttdef"><b>Definition:</b> <a href="TelegramBot_8cc_source.html#l00184">TelegramBot.cc:184</a></div></div>
<div class="ttc" id="json__encode_8cc_html_ad8ce82c71c39fc700005394fccc714e2"><div class="ttname"><a href="json__encode_8cc.html#ad8ce82c71c39fc700005394fccc714e2">json_encode</a></div><div class="ttdeci">std::string json_encode(std::map&lt; std::string, std::string &gt; parameters)</div><div class="ttdef"><b>Definition:</b> <a href="json__encode_8cc_source.html#l00003">json_encode.cc:3</a></div></div>
<div class="ttc" id="classTelegram_1_1TelegramBot_html_a1ca971ccfb242f7b8656eca3ab7666dd"><div class="ttname"><a href="classTelegram_1_1TelegramBot.html#a1ca971ccfb242f7b8656eca3ab7666dd">Telegram::TelegramBot::api_url</a></div><div class="ttdeci">std::string api_url</div><div class="ttdef"><b>Definition:</b> <a href="TelegramBot_8h_source.html#l00051">TelegramBot.h:51</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_8eb10e03c11ffa27f12b298464ec3629.html">src</a></li><li class="navelem"><a class="el" href="TelegramBot_8cc.html">TelegramBot.cc</a></li>
<li class="footer">Generated on Sun Jun 4 2017 13:31:53 for LibTgBotPP by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
</ul>
</div>
</body>
</html>