0.9.11 • Published 2 years ago

vinyldns-js v0.9.11

Weekly downloads
11
License
Apache-2.0
Repository
github
Last release
2 years ago

verify NPM

vinyldns-js

A JavaScript VinylDNS client.

View the docs »

Usage

All methods return a Promise. See the documentation for more details.

const VinylDNS = require('vinyldns-js');

const vinylClient = new VinylDNS({
  apiUrl: 'http://my-vinyldns.com',
  accessKeyId: '123',
  secretAccessKey: '123'
});

vinylClient.createZone({
  adminGroupId: '123',
  name: 'dummy.',
  email: 'test@example.com'
}).then(result => {
  console.log(result);
}).catch(err => {
  console.log(err);
});

vinylClient.getZone('123')
.then(result => {
  console.log(result);
}).catch(err => {
  console.log(err);
});

REPL

vinyldns-js ships with a built in REPL. To use the REPL...

Install dependencies:

npm install

Create the required environment variables:

export VINYLDNS_API_SERVER=http://my-vinyldns.com
export VINYLDNS_ACCESS_KEY_ID=123
export VINYLDNS_SECRET_ACCESS_KEY=123

Start the REPL:

npm run repl

Use the vinyl vinyldns-js client instance:

> vinyl.getZones().then(res => { console.log(res) }).catch(err => { console.log(err) })

Contributing

Install dependencies:

npm install

Run unit tests, lint code, and build documentation microsite:

npm test

Run integration tests against a Dockerized VinylDNS API running on localhost:9000:

npm run integration-tests
0.9.10

2 years ago

0.9.11

2 years ago

0.9.9

3 years ago

0.9.8

3 years ago

0.9.5

5 years ago

0.9.3

5 years ago

0.9.2

5 years ago

0.9.1

5 years ago

0.9.0

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago