added dns api

This commit is contained in:
2016-07-15 16:26:37 -04:00
parent 7c49a0c623
commit 432b056609
2 changed files with 25 additions and 2 deletions

View File

@ -113,6 +113,20 @@ api = function(key){
});
};
this.domianAddRecord = function(args, callback){
var options = {
url: this.BASEURL+'domains/'+ args.domain +'/records',
headers: this.headers,
body: JSON.stringify(args)
};
this.calls++;
return request.post(options, function(error, response, body){
return callback(body, response, error);
});
}
return this;
}