Rewriting Lyric API in Golang

I had originally written a Lyric API as a hobby project way back using Node. I published it on github as a combination of API server hosted on Heroku along with a library hosted on NPM. It still gets 50 downloads a week and the hosted Heroku API server is actually used by many people even though it offers little to no functionality. I was recently looking at wtf dashboard and even contributed a small patch to it. wtf is written in Go and I am using it daily. I want to build a widget for Spotify on the dashboard. So I thought having lyrics was going to be very useful for this widget as I could display the current playing song on the widget and below it, the lyrics.

A Go API for connecting with the Spotify Web API is already available but for getting the lyrics, I decided that since Lyric API I had written in Node was so small that I could essentially rewrite it in golang in less than a day.

Voila! Lyrics API Go is now available with two providers at the moment (more than what was initially in the Node project). I plan to add Genius as another provider soon.

After that, the major work left would be to write a Current Song Fetcher using the Spotify Web API and based on the artist and song name, calling Lyrics API Go to fetch the lyrics and write the data to bytes and display it on the widget.

Leave a Reply

Scroll to Top