DankLyrics
A lyrics finder with the legendary cs1.6 theme.
About
DankLyrics: A lyrics finder API, Website and Go package!
Go Package Docs
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 :)
go get codeberg.org/dankstuff/danklyrics/pkg
package main
import (
"codeberg.org/dankstuff/danklyrics/pkg/client"
"codeberg.org/dankstuff/danklyrics/pkg/provider"
)
func main() {
lyricser, err := client.NewHttp(client.Config{
// available providers are the following.
Providers: []provider.Name{provider.Dank, provider.LyricFind, provider.Genius},
ProvidersAuth: map[provider.Name]provider.Auth{
provider.Genius: provider.Auth{
ClientId: os.Getenv("GENIUS_CLIENT_ID"),
ClientSecret: os.Getenv("GENIUS_CLIENT_SECRET"),
},
},
})
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 Docs
Rest API is available at danklyrics.com/api
Displays this message
refer to (https://codeberg.org/dankstuff/danklyrics) for API docs!
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 /api/lyrics/providers:
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" }
}
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 Lord Baraa.