diff --git a/examples/certificate/CertificateCreate.js b/examples/certificate/CertificateCreate.js index 23856d7..7a10648 100644 --- a/examples/certificate/CertificateCreate.js +++ b/examples/certificate/CertificateCreate.js @@ -4,8 +4,8 @@ "use strict"; -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot -let DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels const Logger = use("Logger") @@ -17,7 +17,7 @@ class CertificateCreate { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -78,7 +78,7 @@ class CertificateCreate { // will be of the Type DomainRobotResult // Create the Certificate - let domainRobotResult = await domainRobot.certificate().create(certifcate) + const domainRobotResult = await domainRobot.certificate().create(certifcate) Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/certificate/CertificateCreateRealtime.js b/examples/certificate/CertificateCreateRealtime.js index 57e4f91..2de7d5e 100644 --- a/examples/certificate/CertificateCreateRealtime.js +++ b/examples/certificate/CertificateCreateRealtime.js @@ -4,8 +4,8 @@ "use strict"; -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot -let DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels const Logger = use("Logger") @@ -17,7 +17,7 @@ class CertificateCreateRealtime { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -78,7 +78,7 @@ class CertificateCreateRealtime { // will be of the Type DomainRobotResult // Create the Certificate in Realtime - let domainRobotResult = await domainRobot.certificate().createRealtime(certifcate) + const domainRobotResult = await domainRobot.certificate().createRealtime(certifcate) Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/certificate/CertificateDelete.js b/examples/certificate/CertificateDelete.js index a74d875..13fdec7 100644 --- a/examples/certificate/CertificateDelete.js +++ b/examples/certificate/CertificateDelete.js @@ -4,7 +4,7 @@ "use strict" -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot const Logger = use("Logger") @@ -16,7 +16,7 @@ class CertificateDelete { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -30,7 +30,7 @@ class CertificateDelete { // will be of the Type DomainRobotResult // Delete the Certificate - let domainRobotResult = await domainRobot.certificate().delete(2121) + const domainRobotResult = await domainRobot.certificate().delete(2121) Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/certificate/CertificateInfo.js b/examples/certificate/CertificateInfo.js index 5f50b78..2f620c8 100644 --- a/examples/certificate/CertificateInfo.js +++ b/examples/certificate/CertificateInfo.js @@ -4,7 +4,7 @@ "use strict" -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot const Logger = use("Logger") @@ -16,7 +16,7 @@ class CertificateInfo { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -30,7 +30,7 @@ class CertificateInfo { // will be of the Type DomainRobotResult // Query an existing Certificate - let domainRobotResult = await domainRobot.certificate().info(2121) + const domainRobotResult = await domainRobot.certificate().info(2121) Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/certificate/CertificateList.js b/examples/certificate/CertificateList.js index 0b194f3..06a44e1 100644 --- a/examples/certificate/CertificateList.js +++ b/examples/certificate/CertificateList.js @@ -4,8 +4,8 @@ "use strict"; -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot -let DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels const Logger = use("Logger") @@ -17,7 +17,7 @@ class CertificateList { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -47,7 +47,7 @@ class CertificateList { // will be of the Type DomainRobotResult // Query the Certificate List - let domainRobotResult = await domainRobot.certificate().list(query) + const domainRobotResult = await domainRobot.certificate().list(query) Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/certificate/CertificatePrepareOrder.js b/examples/certificate/CertificatePrepareOrder.js index b0e94ab..e13f246 100644 --- a/examples/certificate/CertificatePrepareOrder.js +++ b/examples/certificate/CertificatePrepareOrder.js @@ -4,8 +4,8 @@ "use strict"; -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot -let DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels const Logger = use("Logger") @@ -17,7 +17,7 @@ class CertificatePrepareOrder { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -58,7 +58,7 @@ class CertificatePrepareOrder { try { // If the Request is Successful the returned Object // will be of the Type DomainRobotResult - let domainRobotResult = await domainRobot.certificate().prepareOrder(certifcate) + const domainRobotResult = await domainRobot.certificate().prepareOrder(certifcate) Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/contact/ContactCreate.js b/examples/contact/ContactCreate.js index dceb5b7..8f56238 100644 --- a/examples/contact/ContactCreate.js +++ b/examples/contact/ContactCreate.js @@ -4,8 +4,8 @@ "use strict" -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot -let DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels const Logger = use("Logger") @@ -17,7 +17,7 @@ class ContactCreate { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -98,7 +98,7 @@ class ContactCreate { // will be of the Type DomainRobotResult // Create an Contact - let domainRobotResult = await domainRobot.contact().create(contact) + const domainRobotResult = await domainRobot.contact().create(contact) Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/contact/ContactDelete.js b/examples/contact/ContactDelete.js index 349dbb5..995f7a4 100644 --- a/examples/contact/ContactDelete.js +++ b/examples/contact/ContactDelete.js @@ -4,7 +4,7 @@ "use strict" -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot const Logger = use("Logger") @@ -16,7 +16,7 @@ class ContactDelete { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -30,7 +30,7 @@ class ContactDelete { // will be of the Type DomainRobotResult // Delete an Contact - let domainRobotResult = await domainRobot.contact().delete(23254102) + const domainRobotResult = await domainRobot.contact().delete(23254102) Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/contact/ContactInfo.js b/examples/contact/ContactInfo.js index 70c6488..8ab1473 100644 --- a/examples/contact/ContactInfo.js +++ b/examples/contact/ContactInfo.js @@ -4,7 +4,7 @@ "use strict" -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot const Logger = use("Logger") @@ -16,7 +16,7 @@ class ContactInfo { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -30,7 +30,7 @@ class ContactInfo { // will be of the Type DomainRobotResult // Query an existing Contact - let domainRobotResult = await domainRobot.contact().info(23254102) + const domainRobotResult = await domainRobot.contact().info(23254102) Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/contact/ContactList.js b/examples/contact/ContactList.js index b162602..6847a61 100644 --- a/examples/contact/ContactList.js +++ b/examples/contact/ContactList.js @@ -4,8 +4,8 @@ "use strict"; -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot -let DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels const Logger = use("Logger") @@ -17,7 +17,7 @@ class ContactList { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -54,7 +54,7 @@ class ContactList { // will be of the Type DomainRobotResult // Query the Contact List - let domainRobotResult = await domainRobot.contact().list(query) + const domainRobotResult = await domainRobot.contact().list(query) Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/contact/ContactUpdate.js b/examples/contact/ContactUpdate.js index 718de11..70ba703 100644 --- a/examples/contact/ContactUpdate.js +++ b/examples/contact/ContactUpdate.js @@ -4,9 +4,9 @@ "use strict" -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot -let DomainRobotHeaders = require("@internetx/js-domainrobot-sdk").DomainRobotHeaders -let DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobotHeaders = require("@internetx/js-domainrobot-sdk").DomainRobotHeaders +const DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels const Logger = use("Logger") @@ -18,7 +18,7 @@ class ContactUpdate { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -40,7 +40,7 @@ class ContactUpdate { // will be of the Type DomainRobotResult // Update the Contact - let domainRobotResult = await domainRobot.contact().update(contact) + const domainRobotResult = await domainRobot.contact().update(contact) Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/domain/DomainAuthInfo1Create.js b/examples/domain/DomainAuthInfo1Create.js index bfe14b9..2ab9db9 100644 --- a/examples/domain/DomainAuthInfo1Create.js +++ b/examples/domain/DomainAuthInfo1Create.js @@ -4,7 +4,7 @@ "use strict" -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot const Logger = use("Logger") @@ -16,7 +16,7 @@ class DomainAuthInfo1Create { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -30,7 +30,7 @@ class DomainAuthInfo1Create { // will be of the Type DomainRobotResult // Create an Authinfo1 Code for the given Domain - let domainRobotResult = await domainRobot.domain().authInfo1Create("js-sdk-test.de") + const domainRobotResult = await domainRobot.domain().authInfo1Create("js-sdk-test.de") Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/domain/DomainAuthInfo1Delete.js b/examples/domain/DomainAuthInfo1Delete.js index 0f3c771..83afb02 100644 --- a/examples/domain/DomainAuthInfo1Delete.js +++ b/examples/domain/DomainAuthInfo1Delete.js @@ -4,7 +4,7 @@ "use strict"; -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot const Logger = use("Logger") @@ -16,7 +16,7 @@ class DomainAuthInfo2Create { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -30,7 +30,7 @@ class DomainAuthInfo2Create { // will be of the Type DomainRobotResult // Delete an Authinfo1 Code for the given Domain - let domainRobotResult = await domainRobot.domain().authInfo2Create("js-sdk-test.de") + const domainRobotResult = await domainRobot.domain().authInfo2Create("js-sdk-test.de") Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/domain/DomainAuthInfo2Create.js b/examples/domain/DomainAuthInfo2Create.js index deff2e8..da0a9e8 100644 --- a/examples/domain/DomainAuthInfo2Create.js +++ b/examples/domain/DomainAuthInfo2Create.js @@ -4,7 +4,7 @@ "use strict"; -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot const Logger = use("Logger") @@ -16,7 +16,7 @@ class DomainAuthInfo2Create { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -31,7 +31,7 @@ class DomainAuthInfo2Create { // Create an Authinfo2 Code for the given Domain // Note: Is only supported for certain TLDs - let domainRobotResult = await domainRobot.domain().authInfo2Create("js-sdk-test.de") + const domainRobotResult = await domainRobot.domain().authInfo2Create("js-sdk-test.de") Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/domain/DomainCreate.js b/examples/domain/DomainCreate.js index 1d526bd..e2a941e 100644 --- a/examples/domain/DomainCreate.js +++ b/examples/domain/DomainCreate.js @@ -4,9 +4,9 @@ "use strict" -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot -let DomainRobotHeaders = require("@internetx/js-domainrobot-sdk").DomainRobotHeaders -let DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobotHeaders = require("@internetx/js-domainrobot-sdk").DomainRobotHeaders +const DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels const Logger = use("Logger") @@ -18,7 +18,7 @@ class DomainCreate { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -58,7 +58,7 @@ class DomainCreate { // will be of the Type DomainRobotResult // Create the Domain - let domainRobotResult = await domainRobot.domain().create(domain) + const domainRobotResult = await domainRobot.domain().create(domain) Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/domain/DomainInfo.js b/examples/domain/DomainInfo.js index a31a91c..8df7d42 100644 --- a/examples/domain/DomainInfo.js +++ b/examples/domain/DomainInfo.js @@ -4,7 +4,7 @@ "use strict"; -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot const Logger = use("Logger") @@ -16,7 +16,7 @@ class DomainInfo { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -30,7 +30,7 @@ class DomainInfo { // will be of the Type DomainRobotResult // Query an existing Domain - let domainRobotResult = await domainRobot.domain().info("js-sdk-test.de") + const domainRobotResult = await domainRobot.domain().info("js-sdk-test.de") Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/domain/DomainList.js b/examples/domain/DomainList.js index 095c4af..53fc3c6 100644 --- a/examples/domain/DomainList.js +++ b/examples/domain/DomainList.js @@ -4,8 +4,8 @@ "use strict"; -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot -let DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels const Logger = use("Logger") @@ -17,7 +17,7 @@ class DomainList { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -54,7 +54,7 @@ class DomainList { // will be of the Type DomainRobotResult // Query the Domain List - let domainRobotResult = await domainRobot.domain().list(query) + const domainRobotResult = await domainRobot.domain().list(query) Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/domain/DomainRenew.js b/examples/domain/DomainRenew.js index 77e461d..2e182c5 100644 --- a/examples/domain/DomainRenew.js +++ b/examples/domain/DomainRenew.js @@ -4,7 +4,7 @@ "use strict"; -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot const Logger = use("Logger") @@ -16,7 +16,7 @@ class DomainRenew { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -35,7 +35,7 @@ class DomainRenew { let domain = domainInfo.result.data[0] // Renew the Domain - let domainRobotResult = await domainRobot.domain().renew(domain) + const domainRobotResult = await domainRobot.domain().renew(domain) Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/domain/DomainRestore.js b/examples/domain/DomainRestore.js index 2ddaf95..707984d 100644 --- a/examples/domain/DomainRestore.js +++ b/examples/domain/DomainRestore.js @@ -4,8 +4,8 @@ "use strict"; -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot -let DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels const Logger = use("Logger") @@ -17,7 +17,7 @@ class DomainRestore { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -58,7 +58,7 @@ class DomainRestore { // will be of the Type DomainRobotResult // Restore the Domain - let domainRobotResult = await domainRobot.domain().restore(domainRestoreModel) + const domainRobotResult = await domainRobot.domain().restore(domainRestoreModel) Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/domain/DomainRestoreList.js b/examples/domain/DomainRestoreList.js index b84d9da..c97a5e1 100644 --- a/examples/domain/DomainRestoreList.js +++ b/examples/domain/DomainRestoreList.js @@ -4,8 +4,8 @@ "use strict"; -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot -let DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels const Logger = use("Logger") @@ -17,7 +17,7 @@ class DomainRestoreList { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -47,7 +47,7 @@ class DomainRestoreList { try { // If the Request is Successful the returned Object // will be of the Type DomainRobotResult - let domainRobotResult = await domainRobot.domain().restoreList(query) + const domainRobotResult = await domainRobot.domain().restoreList(query) Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/domain/DomainTransfer.js b/examples/domain/DomainTransfer.js index d284159..4714b2d 100644 --- a/examples/domain/DomainTransfer.js +++ b/examples/domain/DomainTransfer.js @@ -4,8 +4,8 @@ "use strict"; -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot -let DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels const Logger = use("Logger") @@ -17,7 +17,7 @@ class DomainTransfer { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -56,7 +56,7 @@ class DomainTransfer { try { // If the Request is Successful the returned Object // will be of the Type DomainRobotResult - let domainRobotResult = await domainRobot.domain().transfer(domainModel) + const domainRobotResult = await domainRobot.domain().transfer(domainModel) Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/domain/DomainUpdate.js b/examples/domain/DomainUpdate.js index 6bef1a0..9b49262 100644 --- a/examples/domain/DomainUpdate.js +++ b/examples/domain/DomainUpdate.js @@ -4,7 +4,7 @@ "use strict"; -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot const Logger = use("Logger") @@ -20,7 +20,7 @@ class DomainUpdate { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -55,7 +55,7 @@ class DomainUpdate { // will be of the Type DomainRobotResult // Update the Domain - let domainRobotResult = await domainRobot.domain().update(domain) + const domainRobotResult = await domainRobot.domain().update(domain) Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/domain/DomainUpdateStatus.js b/examples/domain/DomainUpdateStatus.js index 53f24c5..a1e1011 100644 --- a/examples/domain/DomainUpdateStatus.js +++ b/examples/domain/DomainUpdateStatus.js @@ -4,7 +4,7 @@ "use strict"; -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot const Logger = use("Logger") @@ -20,7 +20,7 @@ class DomainUpdateStatus { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -42,7 +42,7 @@ class DomainUpdateStatus { domain.registryStatus = "HOLD_LOCK" // Update the Status of the Domain - let domainRobotResult = await domainRobot.domain().updateStatus(domain) + const domainRobotResult = await domainRobot.domain().updateStatus(domain) Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/domainstudio/DomainStudioSearch.js b/examples/domainstudio/DomainStudioSearch.js index c03e5c4..28dab5d 100644 --- a/examples/domainstudio/DomainStudioSearch.js +++ b/examples/domainstudio/DomainStudioSearch.js @@ -4,8 +4,8 @@ "use strict"; -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot -let DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels const Logger = use("Logger") @@ -17,7 +17,7 @@ class DomainStudioSearch { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -53,7 +53,7 @@ class DomainStudioSearch { // will be of the Type DomainRobotResult // Search the DomainStudio - let domainRobotResult = await domainRobot.domainStudio().search(domainEnvelopeSearchRequest) + const domainRobotResult = await domainRobot.domainStudio().search(domainEnvelopeSearchRequest) Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/pc_domains/Alexa.js b/examples/pc_domains/Alexa.js index 5f28550..af8731a 100644 --- a/examples/pc_domains/Alexa.js +++ b/examples/pc_domains/Alexa.js @@ -4,7 +4,7 @@ "use strict"; -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot const Logger = use("Logger") @@ -16,7 +16,7 @@ class Alexa { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -33,7 +33,7 @@ class Alexa { // will be of the Type DomainRobotResult // Search with the Alexa Service - let domainRobotResult = await domainRobot.pcDomains().alexa(domain) + const domainRobotResult = await domainRobot.pcDomains().alexa(domain) Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/pc_domains/Estimation.js b/examples/pc_domains/Estimation.js index 083c5f0..4a672ed 100644 --- a/examples/pc_domains/Estimation.js +++ b/examples/pc_domains/Estimation.js @@ -4,8 +4,8 @@ "use strict"; -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot -let DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels const Logger = use("Logger") @@ -17,7 +17,7 @@ class Estimation { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -37,7 +37,7 @@ class Estimation { // will be of the Type DomainRobotResult // Perform an Estimation - let domainRobotResult = await domainRobot.pcDomains().estimation(estimationModel) + const domainRobotResult = await domainRobot.pcDomains().estimation(estimationModel) Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/pc_domains/Keyword.js b/examples/pc_domains/Keyword.js index 37d5ba7..ecff525 100644 --- a/examples/pc_domains/Keyword.js +++ b/examples/pc_domains/Keyword.js @@ -4,8 +4,8 @@ "use strict"; -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot -let DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels const Logger = use("Logger") @@ -17,7 +17,7 @@ class Keyword { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -34,7 +34,7 @@ class Keyword { // will be of the Type DomainRobotResult // Search with the Keyword Service - let domainRobotResult = await domainRobot.pcDomains().keyword(keywordsModel) + const domainRobotResult = await domainRobot.pcDomains().keyword(keywordsModel) Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/pc_domains/Majestic.js b/examples/pc_domains/Majestic.js index 80ae10b..a2692e4 100644 --- a/examples/pc_domains/Majestic.js +++ b/examples/pc_domains/Majestic.js @@ -4,8 +4,8 @@ "use strict"; -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot -let DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobotModels = require("@internetx/js-domainrobot-sdk").DomainRobotModels const Logger = use("Logger") @@ -17,7 +17,7 @@ class Majestic { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -34,7 +34,7 @@ class Majestic { // will be of the Type DomainRobotResult // Search with the Majestic Service - let domainRobotResult = await domainRobot.pcDomains().majestic(domainsModel) + const domainRobotResult = await domainRobot.pcDomains().majestic(domainsModel) Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/pc_domains/Meta.js b/examples/pc_domains/Meta.js index 79f7a02..a2375db 100644 --- a/examples/pc_domains/Meta.js +++ b/examples/pc_domains/Meta.js @@ -4,7 +4,7 @@ "use strict"; -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot const Logger = use("Logger") @@ -16,7 +16,7 @@ class Meta { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -32,7 +32,7 @@ class Meta { // will be of the Type DomainRobotResult // Perform the Meta Task - let domainRobotResult = await domainRobot.pcDomains().meta(domain) + const domainRobotResult = await domainRobot.pcDomains().meta(domain) Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/pc_domains/Sistrix.js b/examples/pc_domains/Sistrix.js index 5affd6d..6d100ba 100644 --- a/examples/pc_domains/Sistrix.js +++ b/examples/pc_domains/Sistrix.js @@ -4,7 +4,7 @@ "use strict"; -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot const Logger = use("Logger") @@ -16,7 +16,7 @@ class Sistrix { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -33,7 +33,7 @@ class Sistrix { // will be of the Type DomainRobotResult // Search the Sistrix Service - let domainRobotResult = await domainRobot.pcDomains().sistrix(domain, country) + const domainRobotResult = await domainRobot.pcDomains().sistrix(domain, country) Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/pc_domains/SocialMediaUsernameCheck.js b/examples/pc_domains/SocialMediaUsernameCheck.js index 4e61a6b..c28ffb3 100644 --- a/examples/pc_domains/SocialMediaUsernameCheck.js +++ b/examples/pc_domains/SocialMediaUsernameCheck.js @@ -4,7 +4,7 @@ "use strict"; -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot const Logger = use("Logger") @@ -16,7 +16,7 @@ class SocialMediaUsernameCheck { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -32,7 +32,7 @@ class SocialMediaUsernameCheck { // will be of the Type DomainRobotResult // Perform the SocialMedia Username Check - let domainRobotResult = await domainRobot.pcDomains().smuCheck(username) + const domainRobotResult = await domainRobot.pcDomains().smuCheck(username) Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/pc_domains/Wayback.js b/examples/pc_domains/Wayback.js index 41346e0..9a4ea84 100644 --- a/examples/pc_domains/Wayback.js +++ b/examples/pc_domains/Wayback.js @@ -4,7 +4,7 @@ "use strict"; -let DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot const Logger = use("Logger") @@ -16,7 +16,7 @@ class Wayback { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", @@ -32,7 +32,7 @@ class Wayback { // will be of the Type DomainRobotResult // Search the Wayback Service - let domainRobotResult = await domainRobot.pcDomains().wayback(domain) + const domainRobotResult = await domainRobot.pcDomains().wayback(domain) Logger.transport("file").info("Request success", domainRobotResult) diff --git a/examples/specials/work-as-subuser.js b/examples/specials/work-as-subuser.js new file mode 100644 index 0000000..64b660b --- /dev/null +++ b/examples/specials/work-as-subuser.js @@ -0,0 +1,37 @@ +const DomainRobot = require("@internetx/js-domainrobot-sdk").DomainRobot +const DomainRobotHeaders = require("@internetx/js-domainrobot-sdk").DomainRobotHeaders + + +// Create a new Instance of the Domainrobot SDK +// and provide your (AutoDNS) Authentication Data +// The Option auth.context is optional for non personal +// AutoDNS Users but mandatory for personal ones +const domainRobot = new DomainRobot({ + url: "https://api.demo.autodns.com/v1", + auth: { + user: "user", + password: "password", + context: "4" + } +}); + +let domainData; + +// Send an Request and react to Success or Error Results +try { + // If the Request is Successful the returned Object + // will be of the Type DomainRobotResult + domainData = domainRobot.domain() + .headers({ + //mandatory + [DomainRobotHeaders.DOMAINROBOT_HEADER_OWNER]: "subusername", + // mandatory if context is not 4 (default) + [DomainRobotHeaders.DOMAINROBOT_HEADER_CONTEXT]: 4 + }) + .info("example.com"); + +} catch (DomainRobotException) { + // If the Request produces an Error the returned Object + // will be of the Type DomainRobotException + Logger.transport("file").error("Request error", DomainRobotException) +} diff --git a/examples/specials/work-as-subuser.ts b/examples/specials/work-as-subuser.ts new file mode 100644 index 0000000..71e882f --- /dev/null +++ b/examples/specials/work-as-subuser.ts @@ -0,0 +1,53 @@ +import { + DomainRobot, + DomainRobotHeaders, + DomainRobotModels, + DomainRobotResult, + JsonResponseDataDomain } from "js-domainrobot-sdk"; + +// Create a new Instance of the Domainrobot SDK +// and provide your (AutoDNS) Authentication Data +// The Option auth.context is optional for non personal +// AutoDNS Users but mandatory for personal ones +const domainRobot: DomainRobot = new DomainRobot({ + url: "https://api.demo.autodns.com/v1", + auth: { + user: "user", + password: "password", + context: "4" + } +}); + +let domainRobotResult: DomainRobotResult; + +// Send an Request and react to Success or Error Results +try { + // If the Request is Successful the returned Object + // will be of the Type DomainRobotResult + domainRobotResult = domainRobot.domain() + .headers({ + //mandatory + [DomainRobotHeaders.DOMAINROBOT_HEADER_OWNER]: "subusername", + // mandatory if context is not 4 (default) + [DomainRobotHeaders.DOMAINROBOT_HEADER_CONTEXT]: 4 + }) + .info("example.com"); + +} catch (DomainRobotException) { + // If the Request produces an Error the returned Object + // will be of the Type DomainRobotException + console.log("Request error", DomainRobotException) +} + +// domainRobotResult.result.data will always be an array even for single inquires +// like in this example +const domainDataArray: DomainRobotModels.Domain[] = domainRobotResult.result.data; + +// if its just a single inquire like in this example you can do this to extract the +// domain data +const domainData: DomainRobotModels.Domain = domainRobotResult.result.data[0]; + +// an alternative approach with ramda (ramdajs.com) +import * as R from 'ramda'; + +const domain: DomainRobotModels.Domain | undefined = R.path(['result', 'data', '0'], domainRobotResult) || undefined; \ No newline at end of file diff --git a/examples/user/UserInfo.js b/examples/user/UserInfo.js index a39a2fb..d00ac0c 100644 --- a/examples/user/UserInfo.js +++ b/examples/user/UserInfo.js @@ -16,7 +16,7 @@ class UserInfo { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", diff --git a/examples/user/UserList.js b/examples/user/UserList.js index 618365e..119d266 100644 --- a/examples/user/UserList.js +++ b/examples/user/UserList.js @@ -17,7 +17,7 @@ class UserList { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", diff --git a/examples/whois/WhoisMulti.js b/examples/whois/WhoisMulti.js index f0a14c8..2ae588e 100644 --- a/examples/whois/WhoisMulti.js +++ b/examples/whois/WhoisMulti.js @@ -16,7 +16,7 @@ class WhoisMulti { // The Option auth.context is optional for non personal // AutoDNS Users but mandatory for personal ones let domainRobot = new DomainRobot({ - url: "http://dev-proxy-lab.intern.autodns-lab.com:10025", + url: "https://api.demo.autodns.com/v1", auth: { user: "user", password: "password", diff --git a/package.json b/package.json index 7f4dfad..c0f6bfb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "js-domainrobot-sdk", - "version": "2.0.5", + "version": "2.0.6", "description": "A (node)js package for easy integration of the domainrobot API powered by InterNetX GmbH.", "main": "index.js", "types": "index.d.ts",