Added getMe

This commit is contained in:
Hauke Zühl
2017-06-07 20:39:42 +02:00
parent f109c19fb6
commit b003811183
2 changed files with 13 additions and 0 deletions
+10
View File
@@ -84,6 +84,16 @@ void Telegram::TelegramBot::processMessage(std::string message) {
}
}
Telegram::User *Telegram::TelegramBot::getMe(void) {
Json::Value obj;
std::map<std::string, std::string> params;
obj = this->apiRequestJson("getMe", params);
return(new Telegram::User(obj["result"]));
}
/**
* Send a text message to a user
*/