Coder Social home page Coder Social logo

vinyldns-js's Introduction

Build Status

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: '[email protected]'
}).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

Releasing

TravisCI performs an npm release on each creation of a git tag. TravisCI also publishes docs to GitHub Pages at vinyldns.github.io/vinyldns-js.

npm run tag offers a convenience task for performing a release.

vinyldns-js's People

Contributors

mdb avatar nimaeskandary avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.