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.1 to 0.6.2

5

HISTORY.md

@@ -0,1 +1,6 @@

0.6.2 / 2015-02-25
==================
* `database().image()` now requires the full image url as the first parameter due to the new Discogs image cluster
* Local request throttling by `disconnect` has been disabled for `database().image()`
0.6.1 / 2015-02-17

@@ -2,0 +7,0 @@ ==================

6

lib/database.js

@@ -90,8 +90,8 @@ 'use strict';

* Get an image
* @param {string} file - The image file name
* @param {string} url - The full image url
* @param {function} [callback] - Callback function
*/
database.image = function(file, callback){
client.get({url: '/images/'+file, encoding: 'binary', authLevel: 2, json: false}, callback);
database.image = function(url, callback){
client.get({url: url, encoding: 'binary', queue: false, json: false}, callback);
};

@@ -98,0 +98,0 @@

{
"name": "disconnect",
"description": "An easy to use client library to connect with the discogs.com API v2.0",
"version": "0.6.1",
"description": "A full featured Discogs API v2.0 client library",
"version": "0.6.2",
"keywords": ["discogs", "api", "client", "oauth"],

@@ -6,0 +6,0 @@ "homepage": "https://github.com/bartve/disconnect",

@@ -142,11 +142,12 @@ ## About

### Images
Image requests require authentication and are subject to [rate limiting](http://www.discogs.com/developers/#page:home,header:home-rate-limiting).
Image requests themselves don't require authentication, but obtaining the image URLs through, for example, release data does.
```javascript
var db = new Discogs(accessData).database(), file = 'R-176126-1322456477.jpeg';
db.image(file, function(err, data, rateLimit){
// Data contains the raw binary image data
require('fs').writeFile(file, data, 'binary', function(err){
// See your current limits
console.log(rateLimit);
console.log('Image saved!');
var db = new Discogs(accessData).database();
db.release(176126, function(err, data){
var url = data.images[0].resource_url;
db.image(url, function(err, data, rateLimit){
// Data contains the raw binary image data
require('fs').writeFile(file, data, 'binary', function(err){
console.log('Image saved!');
});
});

@@ -153,0 +154,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