From d2baea74a0ac09db992ab36a861d09caccdab697 Mon Sep 17 00:00:00 2001 From: Andrea Giove Date: Sun, 27 Mar 2016 16:31:11 +0200 Subject: Add answerInlineQuery method --- include/tgbot/net/HttpReqArg.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'include/tgbot/net/HttpReqArg.h') diff --git a/include/tgbot/net/HttpReqArg.h b/include/tgbot/net/HttpReqArg.h index f0e4492..5056e6c 100644 --- a/include/tgbot/net/HttpReqArg.h +++ b/include/tgbot/net/HttpReqArg.h @@ -24,6 +24,7 @@ #define TGBOT_HTTPPARAMETER_H #include +#include #include @@ -42,6 +43,22 @@ public: { } + template + HttpReqArg(const std::string& name, const std::vector& list, function parsingFunction){ + this->name = name; + value = "["; + for (const T& item : list){ + value += parsingFunction(item); + value += ','; + } + value.erase(this->value.length() - 1); + value += ']'; + + isFile = false; + mimeType = "text/plain"; + fileName = ""; + } + /** * Name of an argument. */ -- cgit v1.2.3 From 405d973af3460ee2860d01c7169cf6749fa98b07 Mon Sep 17 00:00:00 2001 From: Andrea Giove Date: Sun, 27 Mar 2016 18:24:03 +0200 Subject: Fixed compilation errors --- include/tgbot/net/HttpReqArg.h | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'include/tgbot/net/HttpReqArg.h') diff --git a/include/tgbot/net/HttpReqArg.h b/include/tgbot/net/HttpReqArg.h index 5056e6c..5aa60fd 100644 --- a/include/tgbot/net/HttpReqArg.h +++ b/include/tgbot/net/HttpReqArg.h @@ -25,6 +25,7 @@ #include #include +#include #include @@ -43,22 +44,6 @@ public: { } - template - HttpReqArg(const std::string& name, const std::vector& list, function parsingFunction){ - this->name = name; - value = "["; - for (const T& item : list){ - value += parsingFunction(item); - value += ','; - } - value.erase(this->value.length() - 1); - value += ']'; - - isFile = false; - mimeType = "text/plain"; - fileName = ""; - } - /** * Name of an argument. */ -- cgit v1.2.3