danklyrics

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2025 License: GPL-3.0

README

DankLyrics

A Genius and LyricFind powered lyrics finder with the legendary cs1.6 theme.

rex-deployment

Go Report Card GoDoc

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 :)

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 in addition to Genius, and you need to provide client id and token to use it.
		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 Docs

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.
genius_client_id conditional to set genius' client id when genius is used as a provider.
genius_client_secret conditional same as genius_client_id but for client secret.
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.

Directories

Path Synopsis
cmd
api command
web command
internal
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL