0.0.7 • Published 7 years ago

random-record-sleeve v0.0.7

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

random-record-sleeve

Gets a random record sleeve from Discogs. Mostly just a try at making my first npm module 🎉

To use in any web project.

You need a Discogs API access since image consuming is not publicly available.

Works both in Node.js and in the browser thanks to axios

Usage

// Require the module
var randomRecordSleeve = require('random-record-sleeve');

// Set your Discogs API credentials (mandatory)
randomRecordSleeve.setCredentials('k3y', 's3cr3t');

// Get a random sleeve from https://www.discogs.com/lists/Discogs-Most-Popular-Albums/2056
var sleeve = randomRecordSleeve.getSleeve();
console.log(sleeve.url); // The sleeve picture
console.log(sleeve.title); // The record title
console.log(sleeve.year); // The record year

// Options (default values)
var sleeve = randomRecordSleeve.getSleeve({
    listId: 2056, // List ID to get a sleeve from
    size150: false // Gets the small sized (150x150) image if true
});
0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago