Coder Social home page Coder Social logo

dme-node's Introduction

dme-sdk

A node module for DNSMadeEasy's V2.0 API

To use

  • Import the module
var dme = require('dme-sdk');
  • Setup config
var config = {
	apikey: <INSERT_APIKEY>,
	secret: <INSERT_APISECRET>,
	debug: false
};
  • Create client
var client = dme.createClient(config);
  • Access ManagedDNS
var mgdns = dme.ManagedDNS.createManagedDNS(client);
mgdns.getAllDomains()
	.then(function(data) {
		console.log(data);
	})
	.catch(function(err) {
		console.log(err);
	});
  • Access Usage
var usage = dme.Usage.create(client);
usage.getUsage()
	.then(function(data) {
		console.log(data);
	})
	.catch(function(err) {
		console.log(err);
	});

Working submodules

ManagedDNS

  • getDomain(domainId)
  • createDomain(payload)
  • updateDomain(domainId, payload)
  • deleteDomain(domainId)
  • deleteDomain(domainId)
  • getAllDomains()
  • updateMultipleDomains(payload)
  • deleteMultipleDomains(payload)
  • createRecordForDomain(domainId, payload)
  • updateRecordForDomain(domainId, recordId, payload)
  • deleteRecordForDomain(domainId, recordId)
  • getRecordsForDomain(domainId)
  • createRecordsForDomain(domainId, payload)
  • updateRecordsForDomain(domainId, payload)

Usage

  • getUsage()

dme-node's People

Contributors

gergelyke avatar szeist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dme-node's Issues

npm installation warnings due to dependency issues

There are several installation warnings due to installation issues. These could likely all be easily addressed by upgrading the dependencies.

npm WARN peerDependencies The peer dependency chai@>=1.9.2 <4 included from sinon-chai will no                                               
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency                                                    
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.                                                  
npm WARN deprecated [email protected]: use uuid module instead                                                                                 
npm WARN deprecated [email protected]: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130                        
npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade                      
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue                                 
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.   

No license.

No license is defined in either package.json or the README. Please define one in at least package.json.

npm currently warns about this upon installation:

 npm WARN package.json [email protected] No license field.  

Exception thrown while parsing DME response when calling deleteRecordForDomain

Per DME v2 API documentation, a successful response returns no output. This causes the JSON.parse to fail for a successful response.

http://www.dnsmadeeasy.com/pdf/API-Docv2.pdf Page 24
"Example Output: No output on successful call. "

dnsmadeeasy/core.js:107
resolve(JSON.parse(body));

Strack trace ...

SyntaxError: Unexpected end of input
at Object.parse (native)
at Request._callback (/home/vyelevich/myapp/node_modules/dme-sdk/lib/dnsmadeeasy/core.js:107:22)
at Request.self.callback (/home/vyelevich/myapp/node_modules/dme-sdk/node_modules/request/request.js:198:22)
at Request.emit (events.js:98:17)
at Request. (/home/vyelevich/myapp/node_modules/dme-sdk/node_modules/request/request.js:1063:14)
at Request.emit (events.js:117:20)
at IncomingMessage. (/home/vyelevich/myapp/node_modules/dme-sdk/node_modules/request/request.js:1009:12)
at IncomingMessage.emit (events.js:117:20)
at _stream_readable.js:944:16
at process._tickCallback (node.js:448:13)

getRecordsForDomain() only returns the first page of results.

getRecordsForDomain() only returns the first page of results and then at the end includes a response ending like:

       type: 'CNAME' },
   ... 328 more items ],
page: 0 }

This is further complicated by the lack of accepting a parameter to get pages other than page 0.

Wish: document data structures returned

Thanks for this module.

The current README which lists which methods are supported, but there is documentation or examples of the data structures returned, which would be helpful.

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.