DankLyrics: A lyrics finder API, Website and Go package!
DankLyrics provides a Go package, since the project is written in Go lol.
Here's a sample usage, it's pretty straight forward, as the client only has one method :)
package main
import (
"github.com/mbaraa/danklyrics/pkg/client"
"github.com/mbaraa/danklyrics/pkg/provider"
)
func main() {
lyricser, err := client.NewHttp(client.Config{
// available providers are the following.
Providers: []provider.Name{provider.Dank, provider.LyricFind},
})
if err != nil {
panic(err)
}
searchInput := provider.SearchParams{
SongName: "sos",
ArtistName: "abba",
}
lyrics, err := lyricser.GetSongLyrics(searchInput)
if err != nil {
panic(err)
}
fmt.Println(lyrics.String())
fmt.Println(lyrics.Parts)
fmt.Println(lyrics.Synced)
}
Rest API is available at api.danklyrics.com
GET /
:
Displays this message
refer to (https://github.com/mbaraa/danklyrics) for API docs!
GET /providers
:
Returns a list of the current supported lyrics providers
[
{
"name": "string: Name of the provider",
"id": "string: id to specify the provider to use in /lyrics"
}
]
GET /lyrics
:
Finds lyrics for a song using the specified providers
Query parameters
name | required | description |
---|---|---|
providers |
required (at least 1) | to specify which lyrics provider(s) to use, list is fetched from GET /providers . |
song |
required | song's name to search for. |
artist |
optional | artist's name to search for, if the song's name isn't enough. |
album |
optional | album's name to search for, if the song's name isn't enough. |
{
"parts": ["string lyrics parts of the song"],
"synced": { "time": "lyrics part" }
}
GET /dank/lyrics
:
Find lyrics from DankLyrics' database, equivalent to using the Go client with provider.Dank
set
Query parameters
name | required | description |
---|---|---|
song |
required | song's name to search for. |
artist |
optional | artist's name to search for, if the song's name isn't enough. |
album |
optional | album's name to search for, if the song's name isn't enough. |
[
{
"song_name": "string: represents the song's name",
"artist_name": "string: represents the song artist's name",
"album_name": "string: represents the song album's name",
"parts": ["string lyrics parts of the song"],
"synced": { "time": "lyrics part" }
}
]
A DankStuff product!
Made with 🧉 by Baraa Al-Masri.