lyrics-api-go-extended
This is a fork of known lyrics-api-go providing extended functionality.
Status
Work in progress...
Table of contents
- Why
- Extended Functionality
- Examples
Why
Due to lack of response for issue, I forked repo to extend it for my needs
Extended functionality
Examples
import (
"fmt"
"github.com/hashicorp/go-retryablehttp"
"git.itmodulo.eu/Forks/lyrics-api-go-extended"
)
myClient := retryablehttp.NewClient().StandardClient()
lyrics.DefaultHeaderUserAgent()
lyrics.AddToheaderMap("User-Agent", "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0")
l := lyrics.New(*myClient)
l := lyrics.New(*myClient, lyrics.WithoutProviders(), lyrics.WithGeniusLyrics("your_access_token_here"))
artist := "..."
songTitle := "..."
lyric, err := l.Search(artist, songTitle)
if err != nil {
fmt.Printf("%v: Lyrics for %v-%v were not found", err, artist, songTitle)
}
fmt.Println(lyric)