2020-05-08 14:45:27 +00:00
|
|
|
/**
|
|
|
|
* Dynu API - Refresh the IP
|
|
|
|
*
|
|
|
|
* @author Lukas Heiligenbrunner
|
|
|
|
* @date 18.06.2019
|
|
|
|
*/
|
2019-06-18 09:23:24 +00:00
|
|
|
|
2019-08-01 19:19:02 +00:00
|
|
|
#pragma once
|
2019-06-18 09:23:24 +00:00
|
|
|
|
|
|
|
#include "API.h"
|
|
|
|
|
2020-05-07 12:54:40 +00:00
|
|
|
class DynuAPI : API {
|
2019-06-18 09:23:24 +00:00
|
|
|
public:
|
2019-08-01 19:19:02 +00:00
|
|
|
/**
|
|
|
|
* refresh the ip of domain on Dynu server
|
|
|
|
* @param ip new ip
|
|
|
|
* @return request status
|
|
|
|
*/
|
2020-05-07 12:54:40 +00:00
|
|
|
bool 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-05-07 12:54:40 +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-05-08 14:45:27 +00:00
|
|
|
/**
|
|
|
|
* Dynu API Key
|
|
|
|
*/
|
|
|
|
std::string dynuapikey;
|
2019-06-18 09:23:24 +00:00
|
|
|
|
2020-05-08 14:45:27 +00:00
|
|
|
/**
|
|
|
|
* Dynu Domain ID
|
|
|
|
*/
|
|
|
|
std::string domainid;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Domain name eg. "mydomain.dynu.net"
|
|
|
|
*/
|
2020-02-11 15:42:05 +00:00
|
|
|
std::string domainname;
|
2019-06-18 09:23:24 +00:00
|
|
|
};
|