Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dnsimple

Package Overview
Dependencies
Maintainers
2
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dnsimple

DNSimple v2 API wrapper

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.4K
increased by14.45%
Maintainers
2
Weekly downloads
 
Created
Source

Node JS DNSimple API Wrapper

A node client for the DNSimple API v2.

DNSimple provides DNS hosting and domain registration that is simple and friendly. We provide a full API and an easy-to-use web interface so you can get your domain registered and set up with a minimal amount of effort.

:warning: Beta Warning

This library is currently in beta version, the methods and the implementation should be considered a work-in-progress. Changes in the method naming, method signatures, public or internal APIs may happen during the beta period.

Requirements

The dnsimple-node package requires node 6.0.0 or higher.

You must also have an activated DNSimple account to access the DNSimple API.

Installation

Currently you can install this repo with npm install dnsimple/dnsimple-node

Usage

This library is a nodejs client you can use to interact with the DNSimple API v2.

The DNSimple nodejs library uses promises exclusively, thus all client calls that call out to the DNSimple API will return a Promise. The examples below demonstrate basic usage.

var client = require('dnsimple')({
  accessToken: process.env.TOKEN,
});

// Fetch your details
client.identity.whoami().then(function(response) {
  console.log(response.data);
}, function(error) {
  console.log(error);
});

// List your domains
var accountId = '1010';
client.domains.listDomains(accountId).then(function(response) {
  console.log(response.data);
}, function(error) {
  console.log(error);
});

client.domains.listDomains(accountId, {page: 3}).then(function(response) {
  console.log(response.data);
}, function(error) {
  console.log(error);
});

// Create a domain
client.domains.createDomain(accountId, "example.com").then(function(response) {
  console.log(response.data);
}, function(error) {
  console.log(error);
});

// Get a domain
client.domains.getDomain(accountId, "example.com").then(function(response) {
  console.log(response.data);
}, function(error) {
  console.log(error);
});

Take a look at https://github.com/dnsimple/hello-domains-node for an example app that authorizes via OAuth and displays your domain list.

Sandbox Usage

If you would like to test in the DNSimple sandbox environment then pass the 'baseUrl' option when creating the client:

var client = require('dnsimple')({
  baseUrl: 'https://api.sandbox.dnsimple.com',
  accessToken: process.env.TOKEN,
});

You will need to ensure you are using an access token created in the sandbox environment. Production tokens will not work in the sandbox environment.

Keywords

FAQs

Package last updated on 09 Sep 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc