Skip to content

Latest commit

 

History

History
85 lines (50 loc) · 1.48 KB

README.md

File metadata and controls

85 lines (50 loc) · 1.48 KB

album-art Build Status

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

Install

$ npm install --save album-art

Usage

var albumArt = require('album-art');

albumArt('The Beatles', function (err, url) {
    console.log(url);
    //=> http://path/to/beatles.jpg
});

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

API

albumArt(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 album-art

Usage

$ album-art --help

Usage
  $ album-art artist [album] [small|medium|large|extralarge|mega]

Example
  $ album-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