Go-Musixmatch!
This is a Go wrapper for working with the Musixmatch API.
Documentation can be found at: Go-Musixmatch Documentation
It aims to support every task listed in the Web API Endpoint Reference, located here.
All of the API endpoints are covered except the premium ones.
💻 Installation
To install the library simply open a terminal and type:
go get github.com/milindmadhukar/go-musixmatch
️️🛠️ Tools Used
This project was written purely in Golang
for Golang
.
The module helps with the usage of the Musixmatch API.
⛏️ Acquiring Musixmatch API Key.
- Go to the Musixmatch Developer Page and select a plan.
- Fill in the necessary details to create an account and verify it from your email.
- Go to your Account Dashboard and you should see an API Key.
- Note the API Key down and don't reveal it to anyone.
🏁 Basic Setup:
For all the endpoints and parameters that can be used, check the Musixmatch API docs
package main
import (
"context"
"fmt"
"log"
"net/http"
mxm "github.com/milindmadhukar/go-musixmatch"
"github.com/milindmadhukar/go-musixmatch/params"
)
func main() {
client := mxm.New("<YOUR API KEY>", http.DefaultClient)
artists, err := client.SearchArtist(context.Background(), params.QueryArtist("Martin Garrix"))
if err != nil {
log.Fatal(err)
}
fmt.Println((*artists)[0])
}
Output
{24407895 Martin Garrix [91 93] NL [{MARTIJN GARRITSEN}] 67 {[]} 0 2017-02-03 07:02:12 +0000 UTC 1996 1996-05-15 0000-00-00}
🧿 Extras
If you face any difficulties contact me here.
Thats it, have fun ✚✖