Skip to content

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

License

Notifications You must be signed in to change notification settings

ProjectRecommend/album-art

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%