Skip to content

Richienb/one-dot

Repository files navigation

One Dot Travis CI Build Status

CloudFlare's 1.1.1.1 DNS service in NodeJS.

NPM Badge

Install

npm install one-dot

Usage

const oneDot = require("one-dot");

oneDot({ domain: "richie-bendall.ml", type: "a" }).then(console.log);
//=> [{ domain: 'richie-bendall.ml.', type: "A", ttl: 200, data: '104.28.8.130' }, { domain: 'richie-bendall.ml.', type: "A", ttl: 200, data: '104.28.9.130' }]

API

oneDot(options)

oneDot.https(options)

oneDot.tls(options)

options

Type: object

domain

Type: string

The domain name to obtain the DNS records for.

type

Type: string or number

The type of DNS record to obtain.

Upgrading from v1

  • Removed the method option. Instead use oneDot or oneDot.https for HTTPS and oneDot.tls for TLS.
  • The Promise system has been changed to use native Promises via async/await instead of Bluebird.
  • Callback support has been removed.
  • TypeErrors instead of ReferenceErrors are now returned if an invalid domain or type is provided.

About

CloudFlare's 1.1.1.1 DNS service in NodeJS.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published