2019-06-18 09:23:24 +00:00
|
|
|
//
|
|
|
|
// Created by lukas on 18.06.19.
|
|
|
|
//
|
|
|
|
|
2019-08-01 19:19:02 +00:00
|
|
|
#pragma once
|
2019-06-18 09:23:24 +00:00
|
|
|
|
|
|
|
#include "API.h"
|
|
|
|
|
|
|
|
class DynuAPI : API{
|
|
|
|
public:
|
2019-08-01 19:19:02 +00:00
|
|
|
/**
|
|
|
|
* refresh the ip of domain on Dynu server
|
|
|
|
* @param ip new ip
|
|
|
|
* @return request status
|
|
|
|
*/
|
2019-06-18 09:23:24 +00:00
|
|
|
int refreshIp(std::string ip);
|
2020-02-11 15:42:05 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* init Telegram api with apikey and chatid
|
|
|
|
* @param dynuApiKey Dynu Api key
|
|
|
|
* @param domainId ID of domain received by Dynu
|
|
|
|
* @param domainName domainname to refresh
|
|
|
|
*/
|
2020-04-30 17:37:11 +00:00
|
|
|
void init(const std::string& dynuApiKey, const std::string& domainId, const std::string& domainName);
|
2019-06-18 09:23:24 +00:00
|
|
|
private:
|
2020-04-30 17:37:11 +00:00
|
|
|
std::string dynuapikey; // Dynu API key
|
2019-06-18 09:23:24 +00:00
|
|
|
|
2020-02-11 15:42:05 +00:00
|
|
|
std::string domainid; //id of the dynu domain
|
|
|
|
std::string domainname;
|
2019-06-18 09:23:24 +00:00
|
|
|
};
|