Skip to content

Commit

Permalink
add/improve examples
Browse files Browse the repository at this point in the history
  • Loading branch information
adelholtz committed Apr 23, 2021
1 parent a7851b1 commit b36a078
Show file tree
Hide file tree
Showing 38 changed files with 208 additions and 118 deletions.
8 changes: 4 additions & 4 deletions examples/certificate/CertificateCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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",
Expand Down Expand Up @@ -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)

Expand Down
8 changes: 4 additions & 4 deletions examples/certificate/CertificateCreateRealtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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",
Expand Down Expand Up @@ -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)

Expand Down
6 changes: 3 additions & 3 deletions examples/certificate/CertificateDelete.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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",
Expand All @@ -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)

Expand Down
6 changes: 3 additions & 3 deletions examples/certificate/CertificateInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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",
Expand All @@ -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)

Expand Down
8 changes: 4 additions & 4 deletions examples/certificate/CertificateList.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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",
Expand Down Expand Up @@ -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)

Expand Down
8 changes: 4 additions & 4 deletions examples/certificate/CertificatePrepareOrder.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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",
Expand Down Expand Up @@ -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)

Expand Down
8 changes: 4 additions & 4 deletions examples/contact/ContactCreate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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",
Expand Down Expand Up @@ -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)

Expand Down
6 changes: 3 additions & 3 deletions examples/contact/ContactDelete.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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",
Expand All @@ -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)

Expand Down
6 changes: 3 additions & 3 deletions examples/contact/ContactInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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",
Expand All @@ -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)

Expand Down
8 changes: 4 additions & 4 deletions examples/contact/ContactList.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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",
Expand Down Expand Up @@ -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)

Expand Down
10 changes: 5 additions & 5 deletions examples/contact/ContactUpdate.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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",
Expand All @@ -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)

Expand Down
6 changes: 3 additions & 3 deletions examples/domain/DomainAuthInfo1Create.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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",
Expand All @@ -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)

Expand Down
6 changes: 3 additions & 3 deletions examples/domain/DomainAuthInfo1Delete.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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",
Expand All @@ -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)

Expand Down
6 changes: 3 additions & 3 deletions examples/domain/DomainAuthInfo2Create.js
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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",
Expand All @@ -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)

Expand Down
Loading

0 comments on commit b36a078

Please sign in to comment.