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

disconnect

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

disconnect - npm Package Compare versions

Comparing version 0.6.3 to 0.6.4

5

HISTORY.md

@@ -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 @@ ==================

7

lib/client.js

@@ -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 @@ }

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