disconnect
Advanced tools
Comparing version 0.6.3 to 0.6.4
@@ -0,1 +1,6 @@ | ||
0.6.4 / 2015-07-09 | ||
================== | ||
* Prevent `JSON.parse()` crash when the Discogs API returns HTML instead of json (maintainance mode) | ||
* Added Discogs API version to `DiscogsClient` config (only the default `v2` is supported at the moment) | ||
0.6.3 / 2015-05-28 | ||
@@ -2,0 +7,0 @@ ================== |
@@ -21,2 +21,3 @@ 'use strict'; | ||
userAgent: 'DisConnectClient/'+pkg.version+' +'+pkg.homepage, | ||
apiVersion: 'v2', | ||
outputFormat: 'discogs' // Possible values: 'discogs' / 'plaintext' / 'html' | ||
@@ -132,3 +133,3 @@ }; | ||
'User-Agent': this.config.userAgent, | ||
'Accept': 'application/json,application/vnd.discogs.v2.'+this.config.outputFormat+'+json,application/octet-stream', | ||
'Accept': 'application/json,application/vnd.discogs.'+this.config.apiVersion+'.'+this.config.outputFormat+'+json,application/octet-stream', | ||
'Accept-Encoding': 'gzip,deflate', | ||
@@ -230,3 +231,3 @@ 'Host': this.config.host, | ||
* { | ||
* url: '', // May be a relative path when accessing the discogs API | ||
* url: '', // May be a relative path when accessing the Discogs API | ||
* method: '', // Defaults to GET | ||
@@ -243,3 +244,3 @@ * data: {} // POST/PUT data as an object | ||
self._rawRequest(options, function(err, data, rateLimit){ | ||
if(data && ((typeof options === 'string') || options.json)){ | ||
if(data && options.json && (data.indexOf('<!') !== 0)){ | ||
data = JSON.parse(data); | ||
@@ -246,0 +247,0 @@ } |
{ | ||
"name": "disconnect", | ||
"description": "A full featured Discogs API v2.0 client library", | ||
"version": "0.6.3", | ||
"version": "0.6.4", | ||
"keywords": ["discogs", "api", "client", "oauth"], | ||
@@ -6,0 +6,0 @@ "homepage": "https://github.com/bartve/disconnect", |
@@ -36,3 +36,3 @@ var wru = require('wru'), | ||
}, | ||
teardown: function () { | ||
teardown: function(){ | ||
nock.cleanAll(); | ||
@@ -39,0 +39,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52022
1152