Skip to content

Latest commit

 

History

History
54 lines (46 loc) · 1.57 KB

README_LASTFM.md

File metadata and controls

54 lines (46 loc) · 1.57 KB

go-coverart/lastfmart

Build Status GoDoc

A simple Go package to get a track, artist or album artwork from Last.fm

Read more about the last.fm API.

Important: This package is strictly for a non-commercial use.

Install

go get -u github.com/piraveen/go-coverart/lastfmart

### Commands

  • Importing
import "github.com/piraveen/go-coverart/lastfmart"
  • Configuration
lastfmart.Configure("LASTFM_APIKEY")
  • Checking if API Key is set and it's validity
err := lastfmart.CheckAPIKey()
  • Enable Auto correction
lastfmart.AutoCorrect(true)
  • Get Album Artwork
result, err = lastfmart.AlbumCover("album name", "artist name")
  • Get Artist Artwork
result, err = lastfmart.ArtistCover("artist name")
  • Get Track Artwork
result, err = lastfmart.TrackArt("track name", "artist name")

Examples

You can get some sample code for testing from this file.

Documentation

You can read the package documentation details in Godoc.

Feedback

If you have any suggestions or improvements, please do open an issue here.

Cheers :)