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