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.
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")
You can get some sample code for testing from this file.
You can read the package documentation details in Godoc.
If you have any suggestions or improvements, please do open an issue here.
Cheers :)