Socket
Socket
Sign inDemoInstall

godaddy-dns-api

Package Overview
Dependencies
5
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    godaddy-dns-api

Godaddy client library.


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
376 kB
Created
Weekly downloads
 

Readme

Source

godaddy-dns-api

A Node.js client library for interacting with GoDaddy DNS API.

Install

npm i --save godaddy-dns-api

Example

const { DNS, RecordTypes } = require('godaddy-dns-api')

// create dns api object with specified options
const options = {
  environment: 'OTE or Production',
  key: 'api key',
  secret: 'api secret',
  domain: 'your domain on Godaddy',
}
const dns = new DNS(options)

const start = async () => {
  // list
  const [err, result] = await dns.getList({
    type: 'A',
    // name: 'optional record name',
  })
  console.log(err ? err.message : result)

  // create
  const data2 = Object.assign({}, RecordTypes.A) // clone a record type A template object
  data2.name = 'olala' // sub domain
  data2.data = '127.0.0.4' // point to an IP
  const [err3, result3] = await dns.create(data2) // call API
  console.log(err3 ? err3 : result3)

  // update a specific record
  const [err2, result2] = await dns.update({
    type: 'A',
    name: 'foo',
  }, {
    data: '127.0.0.1' // new IP
  })
  console.log(err2 ? err2 : result2) // call API
}

start()

FAQs

Last updated on 15 Mar 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc