diff --git a/doc/html/namespaces.html b/doc/html/namespaces.html
index 05ce324..9299880 100644
--- a/doc/html/namespaces.html
+++ b/doc/html/namespaces.html
@@ -115,7 +115,7 @@ $(document).ready(function(){initNavTree('namespaces.html','');});
diff --git a/doc/html/navtree.js b/doc/html/navtree.js
index c556729..25611cf 100644
--- a/doc/html/navtree.js
+++ b/doc/html/navtree.js
@@ -32,7 +32,7 @@ var NAVTREE =
var NAVTREEINDEX =
[
"Audio_8cc.html",
-"pages.html"
+"json__encode_8h_source.html"
];
var SYNCONMSG = 'click to disable panel synchronisation';
diff --git a/doc/html/navtreeindex0.js b/doc/html/navtreeindex0.js
index 3a1297d..5cad3f2 100644
--- a/doc/html/navtreeindex0.js
+++ b/doc/html/navtreeindex0.js
@@ -16,51 +16,51 @@ var NAVTREEINDEX0 =
"Document_8cc_source.html":[2,0,6],
"Document_8h.html":[2,0,7],
"Document_8h_source.html":[2,0,7],
-"Location_8cc.html":[2,0,13],
-"Location_8cc_source.html":[2,0,13],
-"Location_8h.html":[2,0,14],
-"Location_8h_source.html":[2,0,14],
-"MessageEntity_8cc.html":[2,0,17],
-"MessageEntity_8cc_source.html":[2,0,17],
-"MessageEntity_8h.html":[2,0,18],
-"MessageEntity_8h.html#aa7927193a64b09836112d3be24c45d85":[2,0,18,1],
-"MessageEntity_8h_source.html":[2,0,18],
-"Message_8cc.html":[2,0,15],
-"Message_8cc_source.html":[2,0,15],
-"Message_8h.html":[2,0,16],
-"Message_8h_source.html":[2,0,16],
-"PhotoSize_8cc.html":[2,0,19],
-"PhotoSize_8cc_source.html":[2,0,19],
-"PhotoSize_8h.html":[2,0,20],
-"PhotoSize_8h_source.html":[2,0,20],
-"Sticker_8cc.html":[2,0,23],
-"Sticker_8cc_source.html":[2,0,23],
-"Sticker_8h.html":[2,0,24],
-"Sticker_8h_source.html":[2,0,24],
-"TelegramBot_8cc.html":[2,0,25],
-"TelegramBot_8cc.html#a47cbcc6d148fe0c8f9fb95966026aa97":[2,0,25,0],
-"TelegramBot_8cc_source.html":[2,0,25],
-"TelegramBot_8h.html":[2,0,26],
-"TelegramBot_8h.html#a91fee4a272faa7eb5f1aeb68ed0b54a4":[2,0,26,2],
-"TelegramBot_8h.html#a97c1241696e3250bf462adae6b65a563":[2,0,26,3],
-"TelegramBot_8h.html#ad82f4bcddd3c7921e8842bb30170a1c2":[2,0,26,4],
-"TelegramBot_8h_source.html":[2,0,26],
-"User_8cc.html":[2,0,27],
-"User_8cc_source.html":[2,0,27],
-"User_8h.html":[2,0,28],
-"User_8h_source.html":[2,0,28],
-"Venue_8cc.html":[2,0,29],
-"Venue_8cc_source.html":[2,0,29],
-"Venue_8h.html":[2,0,30],
-"Venue_8h_source.html":[2,0,30],
-"Video_8cc.html":[2,0,31],
-"Video_8cc_source.html":[2,0,31],
-"Video_8h.html":[2,0,32],
-"Video_8h_source.html":[2,0,32],
-"Voice_8cc.html":[2,0,33],
-"Voice_8cc_source.html":[2,0,33],
-"Voice_8h.html":[2,0,34],
-"Voice_8h_source.html":[2,0,34],
+"Location_8cc.html":[2,0,14],
+"Location_8cc_source.html":[2,0,14],
+"Location_8h.html":[2,0,15],
+"Location_8h_source.html":[2,0,15],
+"MessageEntity_8cc.html":[2,0,18],
+"MessageEntity_8cc_source.html":[2,0,18],
+"MessageEntity_8h.html":[2,0,19],
+"MessageEntity_8h.html#aa7927193a64b09836112d3be24c45d85":[2,0,19,1],
+"MessageEntity_8h_source.html":[2,0,19],
+"Message_8cc.html":[2,0,16],
+"Message_8cc_source.html":[2,0,16],
+"Message_8h.html":[2,0,17],
+"Message_8h_source.html":[2,0,17],
+"PhotoSize_8cc.html":[2,0,20],
+"PhotoSize_8cc_source.html":[2,0,20],
+"PhotoSize_8h.html":[2,0,21],
+"PhotoSize_8h_source.html":[2,0,21],
+"Sticker_8cc.html":[2,0,24],
+"Sticker_8cc_source.html":[2,0,24],
+"Sticker_8h.html":[2,0,25],
+"Sticker_8h_source.html":[2,0,25],
+"TelegramBot_8cc.html":[2,0,26],
+"TelegramBot_8cc.html#a47cbcc6d148fe0c8f9fb95966026aa97":[2,0,26,0],
+"TelegramBot_8cc_source.html":[2,0,26],
+"TelegramBot_8h.html":[2,0,27],
+"TelegramBot_8h.html#a91fee4a272faa7eb5f1aeb68ed0b54a4":[2,0,27,2],
+"TelegramBot_8h.html#a97c1241696e3250bf462adae6b65a563":[2,0,27,3],
+"TelegramBot_8h.html#ad82f4bcddd3c7921e8842bb30170a1c2":[2,0,27,4],
+"TelegramBot_8h_source.html":[2,0,27],
+"User_8cc.html":[2,0,28],
+"User_8cc_source.html":[2,0,28],
+"User_8h.html":[2,0,29],
+"User_8h_source.html":[2,0,29],
+"Venue_8cc.html":[2,0,30],
+"Venue_8cc_source.html":[2,0,30],
+"Venue_8h.html":[2,0,31],
+"Venue_8h_source.html":[2,0,31],
+"Video_8cc.html":[2,0,32],
+"Video_8cc_source.html":[2,0,32],
+"Video_8h.html":[2,0,33],
+"Video_8h_source.html":[2,0,33],
+"Voice_8cc.html":[2,0,34],
+"Voice_8cc_source.html":[2,0,34],
+"Voice_8h.html":[2,0,35],
+"Voice_8h_source.html":[2,0,35],
"annotated.html":[1,0],
"classTelegram_1_1Audio.html":[1,0,0,0],
"classTelegram_1_1Audio.html#a0899f968c1a3e9403582921d684c2bea":[1,0,0,0,0],
@@ -159,26 +159,27 @@ var NAVTREEINDEX0 =
"classTelegram_1_1Sticker.html#aabc8e28c3a383cc23e286684240a1e89":[1,0,0,8,6],
"classTelegram_1_1Sticker.html#af33b08581c53a2613a334157460cc5e5":[1,0,0,8,1],
"classTelegram_1_1TelegramBot.html":[1,0,0,10],
-"classTelegram_1_1TelegramBot.html#a18326a958f926cdea62339899a29a1e1":[1,0,0,10,6],
-"classTelegram_1_1TelegramBot.html#a1ca971ccfb242f7b8656eca3ab7666dd":[1,0,0,10,16],
-"classTelegram_1_1TelegramBot.html#a1f3a5159b2868b2aa7a84f3ca8f0104c":[1,0,0,10,14],
-"classTelegram_1_1TelegramBot.html#a27ee4520baa0cf7f36ec6f13e69867a5":[1,0,0,10,19],
-"classTelegram_1_1TelegramBot.html#a33ce0cbad266e831c834aa2e3d854e5a":[1,0,0,10,17],
+"classTelegram_1_1TelegramBot.html#a18326a958f926cdea62339899a29a1e1":[1,0,0,10,7],
+"classTelegram_1_1TelegramBot.html#a1ca971ccfb242f7b8656eca3ab7666dd":[1,0,0,10,17],
+"classTelegram_1_1TelegramBot.html#a1f3a5159b2868b2aa7a84f3ca8f0104c":[1,0,0,10,15],
+"classTelegram_1_1TelegramBot.html#a27ee4520baa0cf7f36ec6f13e69867a5":[1,0,0,10,20],
+"classTelegram_1_1TelegramBot.html#a33ce0cbad266e831c834aa2e3d854e5a":[1,0,0,10,18],
"classTelegram_1_1TelegramBot.html#a398bd76186e27d514afd835c5437c6ed":[1,0,0,10,2],
-"classTelegram_1_1TelegramBot.html#a4729f977e1d564326f0061c1417dc09c":[1,0,0,10,18],
+"classTelegram_1_1TelegramBot.html#a4729f977e1d564326f0061c1417dc09c":[1,0,0,10,19],
"classTelegram_1_1TelegramBot.html#a52f2a5f734bac5f83d2c0e5068618646":[1,0,0,10,1],
-"classTelegram_1_1TelegramBot.html#a592741f23db9675eb5e6ae60f6ee926b":[1,0,0,10,12],
-"classTelegram_1_1TelegramBot.html#a7c54766f656974b35f03ea510d7b6a4f":[1,0,0,10,7],
+"classTelegram_1_1TelegramBot.html#a592741f23db9675eb5e6ae60f6ee926b":[1,0,0,10,13],
+"classTelegram_1_1TelegramBot.html#a7c54766f656974b35f03ea510d7b6a4f":[1,0,0,10,8],
"classTelegram_1_1TelegramBot.html#a7e07f1ca99390958ef5c6c95cbf18258":[1,0,0,10,3],
"classTelegram_1_1TelegramBot.html#a99b561e695953e6b69a3ddf6937a4811":[1,0,0,10,0],
-"classTelegram_1_1TelegramBot.html#aabd1a825b1d7f127f15bf336b985d70d":[1,0,0,10,15],
-"classTelegram_1_1TelegramBot.html#aae9aba06108ce34f9766199c6588e1d6":[1,0,0,10,5],
-"classTelegram_1_1TelegramBot.html#aba249898870b8250da0ac67ba6a55e88":[1,0,0,10,4],
-"classTelegram_1_1TelegramBot.html#acd21ba91f309c6d5fbcf7dc0063375ae":[1,0,0,10,11],
-"classTelegram_1_1TelegramBot.html#adb9d623814ecbbeeefef4faa073b73c3":[1,0,0,10,13],
-"classTelegram_1_1TelegramBot.html#ae0d0fe5d54afcc9e6ee16b3d4f8ae895":[1,0,0,10,8],
-"classTelegram_1_1TelegramBot.html#aed4dd1ce506259c0e82f0c46fe125ca4":[1,0,0,10,9],
-"classTelegram_1_1TelegramBot.html#af6fbb842f679b33dd8a60f94f82d7c81":[1,0,0,10,10],
+"classTelegram_1_1TelegramBot.html#aabd1a825b1d7f127f15bf336b985d70d":[1,0,0,10,16],
+"classTelegram_1_1TelegramBot.html#aae9aba06108ce34f9766199c6588e1d6":[1,0,0,10,6],
+"classTelegram_1_1TelegramBot.html#aba249898870b8250da0ac67ba6a55e88":[1,0,0,10,5],
+"classTelegram_1_1TelegramBot.html#acd21ba91f309c6d5fbcf7dc0063375ae":[1,0,0,10,12],
+"classTelegram_1_1TelegramBot.html#adb9d623814ecbbeeefef4faa073b73c3":[1,0,0,10,14],
+"classTelegram_1_1TelegramBot.html#ae0d0fe5d54afcc9e6ee16b3d4f8ae895":[1,0,0,10,9],
+"classTelegram_1_1TelegramBot.html#aed4dd1ce506259c0e82f0c46fe125ca4":[1,0,0,10,10],
+"classTelegram_1_1TelegramBot.html#af6fbb842f679b33dd8a60f94f82d7c81":[1,0,0,10,11],
+"classTelegram_1_1TelegramBot.html#afc52db678c8dacb568075b8c013eafde":[1,0,0,10,4],
"classTelegram_1_1User.html":[1,0,0,11],
"classTelegram_1_1User.html#a07ce0c326306ce8a26a31948585a27a1":[1,0,0,11,0],
"classTelegram_1_1User.html#a10253e675207d18bee321d34e461f335":[1,0,0,11,8],
@@ -224,6 +225,11 @@ var NAVTREEINDEX0 =
"example01_8cc.html#ad80d7c455c0c87f879a92658ad28329d":[2,0,8,5],
"example01_8cc.html#aecdda2b4770f85617b26cf01e056354b":[2,0,8,8],
"example01_8cc_source.html":[2,0,8],
+"example02_8cc.html":[2,0,9],
+"example02_8cc.html#a3c04138a5bfe5d72780bb7e82a18e627":[2,0,9,2],
+"example02_8cc.html#a46ae855efe2974950d236ddeb7a7118a":[2,0,9,0],
+"example02_8cc.html#a879c9d54cce72d602eb541ccdadb0ea6":[2,0,9,1],
+"example02_8cc_source.html":[2,0,9],
"files.html":[2,0],
"functions.html":[1,2,0],
"functions_func.html":[1,2,1],
@@ -232,22 +238,16 @@ var NAVTREEINDEX0 =
"globals_defs.html":[2,1,3],
"globals_func.html":[2,1,1],
"globals_type.html":[2,1,2],
-"http__build__query_8cc.html":[2,0,9],
-"http__build__query_8cc.html#a1e3cd58bbf46d30f168bbc0ee5cc486b":[2,0,9,0],
-"http__build__query_8cc_source.html":[2,0,9],
-"http__build__query_8h.html":[2,0,10],
-"http__build__query_8h.html#a7c7058f6d8d20f7e273b4ce5051a0cc2":[2,0,10,0],
-"http__build__query_8h_source.html":[2,0,10],
+"http__build__query_8cc.html":[2,0,10],
+"http__build__query_8cc.html#a1e3cd58bbf46d30f168bbc0ee5cc486b":[2,0,10,0],
+"http__build__query_8cc_source.html":[2,0,10],
+"http__build__query_8h.html":[2,0,11],
+"http__build__query_8h.html#a7c7058f6d8d20f7e273b4ce5051a0cc2":[2,0,11,0],
+"http__build__query_8h_source.html":[2,0,11],
"index.html":[],
-"json__encode_8cc.html":[2,0,11],
-"json__encode_8cc.html#ad8ce82c71c39fc700005394fccc714e2":[2,0,11,0],
-"json__encode_8cc_source.html":[2,0,11],
-"json__encode_8h.html":[2,0,12],
-"json__encode_8h.html#a359b21c4402aac0db9ebc868b11ea570":[2,0,12,0],
-"json__encode_8h_source.html":[2,0,12],
-"namespaceTelegram.html":[1,0,0],
-"namespaceTelegram.html":[0,0,0],
-"namespacemembers.html":[0,1,0],
-"namespacemembers_type.html":[0,1,1],
-"namespaces.html":[0,0]
+"json__encode_8cc.html":[2,0,12],
+"json__encode_8cc.html#ad8ce82c71c39fc700005394fccc714e2":[2,0,12,0],
+"json__encode_8cc_source.html":[2,0,12],
+"json__encode_8h.html":[2,0,13],
+"json__encode_8h.html#a359b21c4402aac0db9ebc868b11ea570":[2,0,13,0]
};
diff --git a/doc/html/navtreeindex1.js b/doc/html/navtreeindex1.js
index a5d3fc3..047e369 100644
--- a/doc/html/navtreeindex1.js
+++ b/doc/html/navtreeindex1.js
@@ -1,28 +1,34 @@
var NAVTREEINDEX1 =
{
+"json__encode_8h_source.html":[2,0,13],
+"namespaceTelegram.html":[1,0,0],
+"namespaceTelegram.html":[0,0,0],
+"namespacemembers.html":[0,1,0],
+"namespacemembers_type.html":[0,1,1],
+"namespaces.html":[0,0],
"pages.html":[],
-"std_8cc.html":[2,0,21],
-"std_8cc.html#a1a32c4d3bd87256731e67936766c65ca":[2,0,21,7],
-"std_8cc.html#a230811235a7175a778aae192178288b9":[2,0,21,2],
-"std_8cc.html#a55fa50be9360d756a7cf448d7e9e0cc9":[2,0,21,3],
-"std_8cc.html#a9362a88e9b672f9ec4431f148e0198e0":[2,0,21,0],
-"std_8cc.html#a9637d86cdcad5363e2b2cc4cdc5af182":[2,0,21,6],
-"std_8cc.html#ac4b125d7c350b2302931e3555ab389fc":[2,0,21,1],
-"std_8cc.html#ae18e39c996053e1ded0c8d88a8f40460":[2,0,21,5],
-"std_8cc.html#ae7427d6dcae9b9190db26d2e1b6700af":[2,0,21,4],
-"std_8cc_source.html":[2,0,21],
-"std_8h.html":[2,0,22],
-"std_8h.html#a03845e6551d4ffa438067407dc862ae7":[2,0,22,8],
-"std_8h.html#a0d2f37137ee1fd6ff4a0ef803849dd63":[2,0,22,0],
-"std_8h.html#a1fd2890e4baae769302e1537f7b6f90c":[2,0,22,9],
-"std_8h.html#a2834615d491c11fba337095447f25886":[2,0,22,1],
-"std_8h.html#a283fc24c6ba72b945193ea6994256667":[2,0,22,6],
-"std_8h.html#a43d4a0b214d7948a4ba43696b9dd9f4d":[2,0,22,5],
-"std_8h.html#a5fbfbda033e5ed44376f04e10ee1398d":[2,0,22,7],
-"std_8h.html#a9362a88e9b672f9ec4431f148e0198e0":[2,0,22,2],
-"std_8h.html#ab759d0531efcdac4d10c966f785d200a":[2,0,22,4],
-"std_8h.html#ac4b125d7c350b2302931e3555ab389fc":[2,0,22,3],
-"std_8h_source.html":[2,0,22],
+"std_8cc.html":[2,0,22],
+"std_8cc.html#a1a32c4d3bd87256731e67936766c65ca":[2,0,22,7],
+"std_8cc.html#a230811235a7175a778aae192178288b9":[2,0,22,2],
+"std_8cc.html#a55fa50be9360d756a7cf448d7e9e0cc9":[2,0,22,3],
+"std_8cc.html#a9362a88e9b672f9ec4431f148e0198e0":[2,0,22,0],
+"std_8cc.html#a9637d86cdcad5363e2b2cc4cdc5af182":[2,0,22,6],
+"std_8cc.html#ac4b125d7c350b2302931e3555ab389fc":[2,0,22,1],
+"std_8cc.html#ae18e39c996053e1ded0c8d88a8f40460":[2,0,22,5],
+"std_8cc.html#ae7427d6dcae9b9190db26d2e1b6700af":[2,0,22,4],
+"std_8cc_source.html":[2,0,22],
+"std_8h.html":[2,0,23],
+"std_8h.html#a03845e6551d4ffa438067407dc862ae7":[2,0,23,8],
+"std_8h.html#a0d2f37137ee1fd6ff4a0ef803849dd63":[2,0,23,0],
+"std_8h.html#a1fd2890e4baae769302e1537f7b6f90c":[2,0,23,9],
+"std_8h.html#a2834615d491c11fba337095447f25886":[2,0,23,1],
+"std_8h.html#a283fc24c6ba72b945193ea6994256667":[2,0,23,6],
+"std_8h.html#a43d4a0b214d7948a4ba43696b9dd9f4d":[2,0,23,5],
+"std_8h.html#a5fbfbda033e5ed44376f04e10ee1398d":[2,0,23,7],
+"std_8h.html#a9362a88e9b672f9ec4431f148e0198e0":[2,0,23,2],
+"std_8h.html#ab759d0531efcdac4d10c966f785d200a":[2,0,23,4],
+"std_8h.html#ac4b125d7c350b2302931e3555ab389fc":[2,0,23,3],
+"std_8h_source.html":[2,0,23],
"structTelegram_1_1TCommand.html":[1,0,0,9],
"structTelegram_1_1TCommand.html#a1c051d162e478b9f98efafbeeed19f9b":[1,0,0,9,1],
"structTelegram_1_1TCommand.html#a3f2c8ecbfd34be25baa577afee2e6e52":[1,0,0,9,0],
diff --git a/doc/html/search/all_0.js b/doc/html/search/all_0.js
index cdecb40..aaac9b3 100644
--- a/doc/html/search/all_0.js
+++ b/doc/html/search/all_0.js
@@ -4,6 +4,7 @@ var searchData=
['address',['address',['../classTelegram_1_1Venue.html#a7c5651dddcd090f12375f5c9a5603a6d',1,'Telegram::Venue']]],
['api_5furl',['api_url',['../classTelegram_1_1TelegramBot.html#a1ca971ccfb242f7b8656eca3ab7666dd',1,'Telegram::TelegramBot::api_url()'],['../TelegramBot_8cc.html#a47cbcc6d148fe0c8f9fb95966026aa97',1,'API_URL(): TelegramBot.cc']]],
['apirequest',['apiRequest',['../classTelegram_1_1TelegramBot.html#a7e07f1ca99390958ef5c6c95cbf18258',1,'Telegram::TelegramBot']]],
+ ['apirequestfile',['apiRequestFile',['../classTelegram_1_1TelegramBot.html#afc52db678c8dacb568075b8c013eafde',1,'Telegram::TelegramBot']]],
['apirequestjson',['apiRequestJson',['../classTelegram_1_1TelegramBot.html#aba249898870b8250da0ac67ba6a55e88',1,'Telegram::TelegramBot']]],
['audio',['Audio',['../classTelegram_1_1Audio.html',1,'Telegram']]],
['audio',['Audio',['../classTelegram_1_1Audio.html#a0899f968c1a3e9403582921d684c2bea',1,'Telegram::Audio::Audio()'],['../classTelegram_1_1Message.html#af920fd411ed1f70d67b4de88c97e75ff',1,'Telegram::Message::audio()']]],
diff --git a/doc/html/search/all_1.js b/doc/html/search/all_1.js
index 5064547..172c839 100644
--- a/doc/html/search/all_1.js
+++ b/doc/html/search/all_1.js
@@ -1,4 +1,4 @@
var searchData=
[
- ['bot_5ftoken',['BOT_TOKEN',['../example01_8cc.html#a46ae855efe2974950d236ddeb7a7118a',1,'example01.cc']]]
+ ['bot_5ftoken',['BOT_TOKEN',['../example01_8cc.html#a46ae855efe2974950d236ddeb7a7118a',1,'BOT_TOKEN(): example01.cc'],['../example02_8cc.html#a46ae855efe2974950d236ddeb7a7118a',1,'BOT_TOKEN(): example02.cc']]]
];
diff --git a/doc/html/search/all_14.js b/doc/html/search/all_14.js
index 94b2b2a..9171a1b 100644
--- a/doc/html/search/all_14.js
+++ b/doc/html/search/all_14.js
@@ -1,6 +1,6 @@
var searchData=
[
- ['webhook_5furl',['WEBHOOK_URL',['../example01_8cc.html#a879c9d54cce72d602eb541ccdadb0ea6',1,'example01.cc']]],
+ ['webhook_5furl',['WEBHOOK_URL',['../example01_8cc.html#a879c9d54cce72d602eb541ccdadb0ea6',1,'WEBHOOK_URL(): example01.cc'],['../example02_8cc.html#a879c9d54cce72d602eb541ccdadb0ea6',1,'WEBHOOK_URL(): example02.cc']]],
['whoami',['whoami',['../example01_8cc.html#a127652392bff79b07e87fc7cfa88508c',1,'example01.cc']]],
['width',['width',['../classTelegram_1_1PhotoSize.html#ad27235d3fab212065b48437468b8c6b6',1,'Telegram::PhotoSize::width()'],['../classTelegram_1_1Sticker.html#aabc8e28c3a383cc23e286684240a1e89',1,'Telegram::Sticker::width()'],['../classTelegram_1_1Video.html#a6c8d76a126866901a66080063c2ddc84',1,'Telegram::Video::width()']]]
];
diff --git a/doc/html/search/all_4.js b/doc/html/search/all_4.js
index 3358b57..48342d0 100644
--- a/doc/html/search/all_4.js
+++ b/doc/html/search/all_4.js
@@ -3,6 +3,7 @@ var searchData=
['emoji',['emoji',['../classTelegram_1_1Sticker.html#af33b08581c53a2613a334157460cc5e5',1,'Telegram::Sticker']]],
['entities',['entities',['../classTelegram_1_1Message.html#ac2e686d9aeec42b8d4bc5707564f567c',1,'Telegram::Message']]],
['example01_2ecc',['example01.cc',['../example01_8cc.html',1,'']]],
+ ['example02_2ecc',['example02.cc',['../example02_8cc.html',1,'']]],
['exec',['exec',['../example01_8cc.html#a43b669bccb8bce8ea862a58a9dc116bd',1,'example01.cc']]],
['explode',['explode',['../example01_8cc.html#a316c9e2b99ca29094112ea9f4f131b85',1,'example01.cc']]]
];
diff --git a/doc/html/search/all_b.js b/doc/html/search/all_b.js
index 4518c05..1f39433 100644
--- a/doc/html/search/all_b.js
+++ b/doc/html/search/all_b.js
@@ -1,6 +1,6 @@
var searchData=
[
- ['main',['main',['../example01_8cc.html#a3c04138a5bfe5d72780bb7e82a18e627',1,'example01.cc']]],
+ ['main',['main',['../example01_8cc.html#a3c04138a5bfe5d72780bb7e82a18e627',1,'main(int argc, char **argv): example01.cc'],['../example02_8cc.html#a3c04138a5bfe5d72780bb7e82a18e627',1,'main(int argc, char **argv): example02.cc']]],
['message',['Message',['../classTelegram_1_1Message.html',1,'Telegram']]],
['message',['Message',['../classTelegram_1_1Message.html#a467585156f9036194509f7f969d38ee7',1,'Telegram::Message::Message(void)'],['../classTelegram_1_1Message.html#a05293cd3884ade64ae2ae9e523abafda',1,'Telegram::Message::Message(Json::Value)'],['../classTelegram_1_1Message.html#a34c66ab90402aaa8ed7cd49939112df8',1,'Telegram::Message::Message(std::string)']]],
['message_2ecc',['Message.cc',['../Message_8cc.html',1,'']]],
diff --git a/doc/html/search/defines_1.js b/doc/html/search/defines_1.js
index 5064547..172c839 100644
--- a/doc/html/search/defines_1.js
+++ b/doc/html/search/defines_1.js
@@ -1,4 +1,4 @@
var searchData=
[
- ['bot_5ftoken',['BOT_TOKEN',['../example01_8cc.html#a46ae855efe2974950d236ddeb7a7118a',1,'example01.cc']]]
+ ['bot_5ftoken',['BOT_TOKEN',['../example01_8cc.html#a46ae855efe2974950d236ddeb7a7118a',1,'BOT_TOKEN(): example01.cc'],['../example02_8cc.html#a46ae855efe2974950d236ddeb7a7118a',1,'BOT_TOKEN(): example02.cc']]]
];
diff --git a/doc/html/search/defines_3.js b/doc/html/search/defines_3.js
index 23d5a62..eccbcd5 100644
--- a/doc/html/search/defines_3.js
+++ b/doc/html/search/defines_3.js
@@ -1,4 +1,4 @@
var searchData=
[
- ['webhook_5furl',['WEBHOOK_URL',['../example01_8cc.html#a879c9d54cce72d602eb541ccdadb0ea6',1,'example01.cc']]]
+ ['webhook_5furl',['WEBHOOK_URL',['../example01_8cc.html#a879c9d54cce72d602eb541ccdadb0ea6',1,'WEBHOOK_URL(): example01.cc'],['../example02_8cc.html#a879c9d54cce72d602eb541ccdadb0ea6',1,'WEBHOOK_URL(): example02.cc']]]
];
diff --git a/doc/html/search/files_3.js b/doc/html/search/files_3.js
index e8fc88e..15d95e8 100644
--- a/doc/html/search/files_3.js
+++ b/doc/html/search/files_3.js
@@ -1,4 +1,5 @@
var searchData=
[
- ['example01_2ecc',['example01.cc',['../example01_8cc.html',1,'']]]
+ ['example01_2ecc',['example01.cc',['../example01_8cc.html',1,'']]],
+ ['example02_2ecc',['example02.cc',['../example02_8cc.html',1,'']]]
];
diff --git a/doc/html/search/functions_0.js b/doc/html/search/functions_0.js
index c3cc04e..cd2b59b 100644
--- a/doc/html/search/functions_0.js
+++ b/doc/html/search/functions_0.js
@@ -2,6 +2,7 @@ var searchData=
[
['addcommand',['addCommand',['../classTelegram_1_1TelegramBot.html#a398bd76186e27d514afd835c5437c6ed',1,'Telegram::TelegramBot']]],
['apirequest',['apiRequest',['../classTelegram_1_1TelegramBot.html#a7e07f1ca99390958ef5c6c95cbf18258',1,'Telegram::TelegramBot']]],
+ ['apirequestfile',['apiRequestFile',['../classTelegram_1_1TelegramBot.html#afc52db678c8dacb568075b8c013eafde',1,'Telegram::TelegramBot']]],
['apirequestjson',['apiRequestJson',['../classTelegram_1_1TelegramBot.html#aba249898870b8250da0ac67ba6a55e88',1,'Telegram::TelegramBot']]],
['audio',['Audio',['../classTelegram_1_1Audio.html#a0899f968c1a3e9403582921d684c2bea',1,'Telegram::Audio']]]
];
diff --git a/doc/html/search/functions_9.js b/doc/html/search/functions_9.js
index 3208eea..0491bed 100644
--- a/doc/html/search/functions_9.js
+++ b/doc/html/search/functions_9.js
@@ -1,6 +1,6 @@
var searchData=
[
- ['main',['main',['../example01_8cc.html#a3c04138a5bfe5d72780bb7e82a18e627',1,'example01.cc']]],
+ ['main',['main',['../example01_8cc.html#a3c04138a5bfe5d72780bb7e82a18e627',1,'main(int argc, char **argv): example01.cc'],['../example02_8cc.html#a3c04138a5bfe5d72780bb7e82a18e627',1,'main(int argc, char **argv): example02.cc']]],
['message',['Message',['../classTelegram_1_1Message.html#a467585156f9036194509f7f969d38ee7',1,'Telegram::Message::Message(void)'],['../classTelegram_1_1Message.html#a05293cd3884ade64ae2ae9e523abafda',1,'Telegram::Message::Message(Json::Value)'],['../classTelegram_1_1Message.html#a34c66ab90402aaa8ed7cd49939112df8',1,'Telegram::Message::Message(std::string)']]],
['messageentity',['MessageEntity',['../classTelegram_1_1MessageEntity.html#a11eea544ae55f7ac805d4071b346d3b9',1,'Telegram::MessageEntity']]]
];
diff --git a/doc/html/std_8cc.html b/doc/html/std_8cc.html
index 18f7e5c..dcce4c1 100644
--- a/doc/html/std_8cc.html
+++ b/doc/html/std_8cc.html
@@ -295,7 +295,7 @@ Functions
diff --git a/doc/html/std_8cc_source.html b/doc/html/std_8cc_source.html
index 7dc3ecc..610cacf 100644
--- a/doc/html/std_8cc_source.html
+++ b/doc/html/std_8cc_source.html
@@ -219,7 +219,7 @@ $(document).ready(function(){initNavTree('std_8cc_source.html','');});
diff --git a/doc/html/std_8h.html b/doc/html/std_8h.html
index 491130b..84c6a71 100644
--- a/doc/html/std_8h.html
+++ b/doc/html/std_8h.html
@@ -338,7 +338,7 @@ Functions
diff --git a/doc/html/std_8h_source.html b/doc/html/std_8h_source.html
index a08add7..117d1b7 100644
--- a/doc/html/std_8h_source.html
+++ b/doc/html/std_8h_source.html
@@ -143,7 +143,7 @@ $(document).ready(function(){initNavTree('std_8h_source.html','');});
diff --git a/doc/html/structTelegram_1_1TCommand-members.html b/doc/html/structTelegram_1_1TCommand-members.html
index 9f77862..3e24806 100644
--- a/doc/html/structTelegram_1_1TCommand-members.html
+++ b/doc/html/structTelegram_1_1TCommand-members.html
@@ -117,7 +117,7 @@ $(document).ready(function(){initNavTree('structTelegram_1_1TCommand.html','');}
diff --git a/doc/html/structTelegram_1_1TCommand.html b/doc/html/structTelegram_1_1TCommand.html
index c1a7bd2..a1aa274 100644
--- a/doc/html/structTelegram_1_1TCommand.html
+++ b/doc/html/structTelegram_1_1TCommand.html
@@ -186,7 +186,7 @@ Public Attributes
diff --git a/src/TelegramBot.cc b/src/TelegramBot.cc
index 0820e7c..4085834 100644
--- a/src/TelegramBot.cc
+++ b/src/TelegramBot.cc
@@ -17,7 +17,9 @@
#define API_URL "https://api.telegram.org/bot"
/**
- *Constructor of Bot
+ * Constructor of Bot
+ *
+ * Calls init
*/
Telegram::TelegramBot::TelegramBot() {
@@ -28,7 +30,10 @@ Telegram::TelegramBot::TelegramBot() {
/**
* Constructor of bot
*
- * @param token a std::string
+ * Sets the API URL and calls init
+ *
+ * @param token a std::string storing the bot token
+ *
*/
Telegram::TelegramBot::TelegramBot(std::string token) {
@@ -84,6 +89,11 @@ void Telegram::TelegramBot::processMessage(std::string message) {
}
}
+/**
+ * A simple command to the API to get some information about the bot.
+ *
+ * @return Telegram::User* a pointer of an object of type Telegram::User
+ */
Telegram::User *Telegram::TelegramBot::getMe(void) {
Json::Value obj;
@@ -95,7 +105,12 @@ Telegram::User *Telegram::TelegramBot::getMe(void) {
}
/**
- * Send a text message to a user
+ * Send a text message to a user or group
+ *
+ * @param message The text of the message
+ * @param chat_id the chat id
+ *
+ * @return A pointer to a Telegram message object
*/
Telegram::Message *Telegram::TelegramBot::sendMessage(std::string message, Json::Int64 chat_id) {
@@ -104,6 +119,11 @@ Telegram::Message *Telegram::TelegramBot::sendMessage(std::string message, Json:
/**
* sendMessage sends a simple text message to a given chat (might be a user or a group)
+ *
+ * @param message The text of the message
+ * @param chat_id the chat id
+ *
+ * @return A pointer to a Telegram message object
*/
Telegram::Message* Telegram::TelegramBot::sendMessage(std::string message, std::string chat_id) {
@@ -120,6 +140,11 @@ Telegram::Message* Telegram::TelegramBot::sendMessage(std::string message, std::
/**
* Sends a picture from the internet to a chat
+ *
+ * @param URL The URL of the picture
+ * @param chat_id the chat id
+ *
+ * @return A pointer to a Telegram message object
*/
Telegram::Message* Telegram::TelegramBot::sendPhoto(std::string URL, Json::Int64 chat_id) {
@@ -128,6 +153,11 @@ Telegram::Message* Telegram::TelegramBot::sendPhoto(std::string URL, Json::Int64
/**
* Sends a picture from the internet to a chat
+ *
+ * @param URL The URL of the picture
+ * @param chat_id the chat id
+ *
+ * @return A pointer to a Telegram message object
*/
Telegram::Message* Telegram::TelegramBot::sendPhoto(std::string URL, std::string chat_id) {
@@ -154,12 +184,22 @@ Telegram::Message *Telegram::TelegramBot::getMessage() {
return(this->msg);
}
+/**
+ * getCommandMap return the complete command list of the bot
+ *
+ * @return Map of the commands
+ */
Telegram::TCommandMap Telegram::TelegramBot::getCommandMap() {
return(this->command_map);
}
// Private methods
+
+/**
+ * inits the bot. That is only sending a content-type to stdout in case
+ * one uses the bot by an CGI script
+ */
void Telegram::TelegramBot::init() {
std::cout << "Content-type: text/html\r\n\r\n" << std::endl;
@@ -167,6 +207,11 @@ void Telegram::TelegramBot::init() {
/**
* A generic API request
+ *
+ * Might be removed in future!
+ *
+ * @param method might be sendPhoto, sendMessage or any command defined by Telegram's API
+ * @param parameters a map of further parameters, needed by the API call
*/
void Telegram::TelegramBot::apiRequest(std::string method, std::map
parameters) {
@@ -204,6 +249,11 @@ void Telegram::TelegramBot::apiRequest(std::string method, std::map parameters) {
@@ -246,9 +296,9 @@ Json::Value Telegram::TelegramBot::apiRequestJson(std::string method, std::map