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

digitalocean

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

digitalocean - npm Package Compare versions

Comparing version 0.8.1 to 0.8.2

3

CHANGELOG.md

@@ -17,2 +17,5 @@ # Change Log

## [0.8.2] - 2016-08-05
### Fixed
- Incorrect route for domain record calls.

@@ -19,0 +22,0 @@ ## [0.8.1] - 2016-08-03

10

lib/digitalocean/domain.js

@@ -73,3 +73,3 @@ (function() {

var args = util.extractListArguments(arguments, 1);
var url = util.safeUrl('domains', args.identifier, 'domain_records');
var url = util.safeUrl('domains', args.identifier, 'records');

@@ -88,3 +88,3 @@ return this.client.get.apply(this.client, [url, {}].concat(slice.call(args.params), [200, 'domain_records', args.callback]));

Domain.prototype.getRecord = function(domainName, id, callback) {
var url = util.safeUrl('domains', domainName, 'domain_records', id);
var url = util.safeUrl('domains', domainName, 'records', id);
return this.client.get(url, {}, 200, 'domain_record', callback);

@@ -102,3 +102,3 @@ };

Domain.prototype.createRecord = function(domainName, attributes, callback) {
var url = util.safeUrl('domains', domainName, 'domain_records');
var url = util.safeUrl('domains', domainName, 'records');
return this.client.post(url, attributes, 201, 'domain_record', callback);

@@ -117,3 +117,3 @@ };

Domain.prototype.updateRecord = function(domainName, id, attributes, callback) {
var url = util.safeUrl('domains', domainName, 'domain_records', id);
var url = util.safeUrl('domains', domainName, 'records', id);
return this.client.put(url, attributes, 200, 'domain_record', callback);

@@ -131,3 +131,3 @@ };

Domain.prototype.deleteRecord = function(domainName, id, callback) {
var url = util.safeUrl('domains', domainName, 'domain_records', id);
var url = util.safeUrl('domains', domainName, 'records', id);
return this.client.delete(url, {}, 204, [], callback);

@@ -134,0 +134,0 @@ };

{
"name": "digitalocean",
"version": "0.8.1",
"version": "0.8.2",
"author": "Phillip Baker <phillbaker@retrodict.com>",

@@ -5,0 +5,0 @@ "description": "nodejs wrapper for digitalocean v2 api",

@@ -193,3 +193,3 @@ 'use strict';

it('returns domain records', function() {
testUtils.api.get('/v2/domains/example.com/domain_records').reply(200, JSON.stringify(data));
testUtils.api.get('/v2/domains/example.com/records').reply(200, JSON.stringify(data));

@@ -202,3 +202,3 @@ client.domains.listRecords('example.com', function(err, domainRecords, headers) {

it('returns domain records at page', function() {
testUtils.api.get('/v2/domains/example.com/domain_records?page=2').reply(200, JSON.stringify(data));
testUtils.api.get('/v2/domains/example.com/records?page=2').reply(200, JSON.stringify(data));

@@ -211,3 +211,3 @@ client.domains.listRecords('example.com', 2, function(err, domainRecords, headers) {

it('returns domain records at page with length', function() {
testUtils.api.get('/v2/domains/example.com/domain_records?page=2&per_page=1').reply(200, JSON.stringify(data));
testUtils.api.get('/v2/domains/example.com/records?page=2&per_page=1').reply(200, JSON.stringify(data));

@@ -220,3 +220,3 @@ client.domains.listRecords('example.com', 2, 1, function(err, domainRecords, headers) {

it('escapes the name', function() {
testUtils.api.get('/v2/domains/foo%2Fbar.com/domain_records').reply(200, JSON.stringify(data));
testUtils.api.get('/v2/domains/foo%2Fbar.com/records').reply(200, JSON.stringify(data));

@@ -229,3 +229,3 @@ client.domains.listRecords('foo/bar.com', function(err, domainRecords, headers) {

it('returns a promisable', function(done) {
testUtils.api.get('/v2/domains/example.com/domain_records').reply(200, JSON.stringify(data));
testUtils.api.get('/v2/domains/example.com/records').reply(200, JSON.stringify(data));

@@ -241,3 +241,3 @@ client.domains.listRecords('example.com').then(function(domainRecords) {

it('returns a promisable with a query object', function(done) {
testUtils.api.get('/v2/domains/example.com/domain_records?page=2&per_page=1').reply(200, JSON.stringify(data));
testUtils.api.get('/v2/domains/example.com/records?page=2&per_page=1').reply(200, JSON.stringify(data));

@@ -272,3 +272,3 @@ client.domains.listRecords('example.com', { page: 2, per_page: 1 }).then(function(domainRecords) {

it('creates the domain record', function() {
testUtils.api.post('/v2/domains/example.com/domain_records', attributes).reply(201, data);
testUtils.api.post('/v2/domains/example.com/records', attributes).reply(201, data);

@@ -281,3 +281,3 @@ client.domains.createRecord('example.com', attributes, function(err, domainRecord, headers) {

it('escapes the name', function() {
testUtils.api.post('/v2/domains/foo%2Fbar.com/domain_records', attributes).reply(201, data);
testUtils.api.post('/v2/domains/foo%2Fbar.com/records', attributes).reply(201, data);

@@ -290,3 +290,3 @@ client.domains.createRecord('foo/bar.com', attributes, function(err, domainRecord, headers) {

it('returns a promisable', function(done) {
testUtils.api.post('/v2/domains/example.com/domain_records', attributes).reply(201, data);
testUtils.api.post('/v2/domains/example.com/records', attributes).reply(201, data);

@@ -316,3 +316,3 @@ client.domains.createRecord('example.com', attributes).then(function(domainRecord) {

it('returns the domain record', function() {
testUtils.api.get('/v2/domains/example.com/domain_records/123').reply(200, JSON.stringify(data));
testUtils.api.get('/v2/domains/example.com/records/123').reply(200, JSON.stringify(data));

@@ -325,3 +325,3 @@ client.domains.getRecord('example.com', 123, function(err, domainRecord, headers) {

it('escapes the name', function() {
testUtils.api.get('/v2/domains/foo%2Fbar.com/domain_records/123').reply(200, JSON.stringify(data));
testUtils.api.get('/v2/domains/foo%2Fbar.com/records/123').reply(200, JSON.stringify(data));

@@ -334,3 +334,3 @@ client.domains.getRecord('foo/bar.com', 123, function(err, domainRecord, headers) {

it('returns a promisable', function(done) {
testUtils.api.get('/v2/domains/example.com/domain_records/123').reply(200, JSON.stringify(data));
testUtils.api.get('/v2/domains/example.com/records/123').reply(200, JSON.stringify(data));

@@ -364,3 +364,3 @@ client.domains.getRecord('example.com', 123).then(function(domainRecord) {

it('returns the domain record', function() {
testUtils.api.put('/v2/domains/example.com/domain_records/123', attributes).reply(200, JSON.stringify(data));
testUtils.api.put('/v2/domains/example.com/records/123', attributes).reply(200, JSON.stringify(data));

@@ -373,3 +373,3 @@ client.domains.updateRecord('example.com', 123, attributes, function(err, domainRecord, headers) {

it('escapes the name', function() {
testUtils.api.put('/v2/domains/foo%2Fbar.com/domain_records/foo%2Fbar', attributes).reply(200, JSON.stringify(data));
testUtils.api.put('/v2/domains/foo%2Fbar.com/records/foo%2Fbar', attributes).reply(200, JSON.stringify(data));

@@ -382,3 +382,3 @@ client.domains.updateRecord('foo/bar.com', 'foo/bar', attributes, function(err, domainRecord, headers) {

it('returns a promisable', function(done) {
testUtils.api.put('/v2/domains/example.com/domain_records/123', attributes).reply(200, JSON.stringify(data));
testUtils.api.put('/v2/domains/example.com/records/123', attributes).reply(200, JSON.stringify(data));

@@ -396,3 +396,3 @@ client.domains.updateRecord('example.com', 123, attributes).then(function(domainRecord) {

it('deletes the domain record', function() {
testUtils.api.delete('/v2/domains/example.com/domain_records/123').reply(204, '');
testUtils.api.delete('/v2/domains/example.com/records/123').reply(204, '');

@@ -405,3 +405,3 @@ client.domains.deleteRecord('example.com', 123, function(err) {

it('escapes the name', function() {
testUtils.api.delete('/v2/domains/foo%2Fbar.com/domain_records/foo%2Fbar').reply(204, '');
testUtils.api.delete('/v2/domains/foo%2Fbar.com/records/foo%2Fbar').reply(204, '');

@@ -414,3 +414,3 @@ client.domains.deleteRecord('foo/bar.com', 'foo/bar', function(err) {

it('returns a promisable', function(done) {
testUtils.api.delete('/v2/domains/example.com/domain_records/123').reply(204, '');
testUtils.api.delete('/v2/domains/example.com/records/123').reply(204, '');

@@ -417,0 +417,0 @@ client.domains.deleteRecord('example.com', 123).then(function(domainRecord) {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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