cover-art

1.0.5 • Public • Published

cover-art

Forked from lacymorrow/album-art

I made no changes (except for changing the module name), it's just that there were some changes I needed from it that were in the Github repo but not in the npm package.

Get an album or artist image url in node: "The Beatles" ➔ http://path/to/beatles.jpg

Install

$ npm install --save cover-art

Usage

 
var coverArt = require('cover-art');
 
coverArt('The Beatles', function (err, url) {
    console.log(url);
    //=> http://path/to/beatles.jpg
});
 
coverArt('The Beatles', 'Abbey Road', 'large', function (err, url) {
    console.log(url);
    //=> http://path/to/beatles/abbey_road_large.jpg
});

API

coverArt(artist [, album] [, size ] , callback)

artist

Required
Type: string

Artist to search for.

album

Type: string

Album to search for.

size

Type: string

possible values: small, medium, large, extralarge, mega

Size of image to return.

callback(err, url)

Required

CLI

You can also use it as a CLI app by installing it globally:

$ npm install --global cover-art

Usage

$ cover-art --help
 
Usage
  $ cover-art artist [album] [small|medium|large|extralarge|mega]
 
Example
  $ cover-art 'The Beatles' 'Abbey Road' large
  http://path/to/beatles/abbey_road_large.jpg

License

This package uses the Last.fm API for it's data. You may consult the Last.fm API Terms of Service for license details.

MIT © Lacy Morrow

Package Sidebar

Install

npm i cover-art

Weekly Downloads

3

Version

1.0.5

License

MIT

Last publish

Collaborators

  • facekapow