2019-05-08 17:19:42 +00:00
|
|
|
//
|
|
|
|
// Created by lukas on 08.05.19.
|
|
|
|
//
|
|
|
|
|
2019-08-01 19:19:02 +00:00
|
|
|
#pragma once
|
2019-05-08 17:19:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include "API.h"
|
|
|
|
|
2019-05-08 17:31:49 +00:00
|
|
|
class TelegramAPI : API {
|
2019-05-08 17:19:42 +00:00
|
|
|
public:
|
2019-08-01 19:19:02 +00:00
|
|
|
/**
|
|
|
|
* send telegram Message to predefined destination
|
|
|
|
* @param text message
|
|
|
|
*/
|
2020-04-30 17:37:11 +00:00
|
|
|
int sendMessage(const std::string& text);
|
2019-05-08 17:19:42 +00:00
|
|
|
|
2019-08-02 20:44:42 +00:00
|
|
|
/**
|
|
|
|
* init Telegram api with apikey and chatid
|
|
|
|
* @param apikey recieved API key
|
|
|
|
* @param chatid chatid where bot should post into
|
|
|
|
*/
|
|
|
|
void init(std::string apikey, std::string chatid);
|
|
|
|
|
2019-05-08 17:19:42 +00:00
|
|
|
private:
|
2019-08-02 20:44:42 +00:00
|
|
|
std::string apikey;
|
|
|
|
std::string chatid;
|
2019-05-08 17:19:42 +00:00
|
|
|
};
|