syntax update and sperate variable for dynu domain id
This commit is contained in:
parent
acd33bbbad
commit
1754dd8385
@ -26,10 +26,11 @@ int main() {
|
||||
logger.logToLogfile(" [INFO] ip changed! -- from :" + oldip + "to: " + ip);
|
||||
std::cout << "ip changed! -- from :" << oldip << "to: " << ip << std::endl;
|
||||
|
||||
//api key: 88vNpMfDhMM2YYDNfWR1DNYfRX9W6fYg
|
||||
//dynu api key: 88vNpMfDhMM2YYDNfWR1DNYfRX9W6fYg
|
||||
|
||||
static std::string domainid = "8506047"; //id of the dynu domain
|
||||
|
||||
Hashmap<std::string, std::string> args;
|
||||
|
||||
args.add("name", "luki.dynu.net");
|
||||
args.add("ipv4Address", ip);
|
||||
|
||||
@ -38,7 +39,7 @@ int main() {
|
||||
headers.push_back("User-Agent: Mozilla/5.0 (compatible; Rigor/1.0.0; http://rigor.com)");
|
||||
headers.push_back("API-Key: 88vNpMfDhMM2YYDNfWR1DNYfRX9W6fYg");
|
||||
|
||||
std::string dynurepl = api.request("https://api.dynu.com/v2/dns/8506047",true, args,headers);
|
||||
std::string dynurepl = api.request("https://api.dynu.com/v2/dns/" + domainid, true, args, headers);
|
||||
|
||||
std::cout << "[ DEBUG ] api reply:: " << dynurepl << std::endl;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user