This repository has been archived on 2023-04-13. You can view files and clone it, but cannot push or open issues or pull requests.
go-discogs/examples/discogs_example.go
2016-03-10 17:25:55 +03:00

28 lines
576 B
Go

package main
import (
"fmt"
"github.com/irlndts/go-discogs"
"net/http"
)
func main() {
client := &http.Client{}
d := discogs.NewClient(client).UserAgent("TestDiscogsClient/0.0.1 +http://irlndts.moscow")
/*
params := &discogs.ReleaseParams{Release_id: "8138518"}
release, _, err := d.Release.Release(params)
*/
params := &discogs.MasterVersionParams{Master_id: "1000", Page: 2, Per_page: 1}
master, _, err := d.Master.Versions(params)
if err != nil {
fmt.Println(err)
} else {
//fmt.Println(release.Title)
fmt.Println(master)
}
//fmt.Println(resp)
}