@foxiko/client
Advanced tools
Comparing version 1.0.46 to 1.0.47
@@ -34,2 +34,24 @@ const {Domain, DNSServer, DNSRecord} = require("./../entities/Domain"); | ||
/** | ||
* Checks if a specific domain is available to register | ||
* @param domain {String} domain | ||
* @param tld {String} tld | ||
* @returns {Promise<{price: {Number}, available: {Boolean}}>} | ||
*/ | ||
async getAvailability(domain, tld) { | ||
const data = await this.client.request() | ||
.url(`${CLOUD.DOMAIN.AVAILABLE}`) | ||
.contentType().json() | ||
.body({ | ||
domain, | ||
tld, | ||
}) | ||
.responseType().json() | ||
.send(); | ||
if(data['error']) { | ||
throw `${data['error']} ${data['error_description']}`; | ||
} | ||
return data; | ||
} | ||
/** | ||
* Gets a specific domain | ||
@@ -36,0 +58,0 @@ * @param id {String} archive ID |
{ | ||
"name": "@foxiko/client", | ||
"version": "1.0.46", | ||
"version": "1.0.47", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
163848
3168