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-11 17:47:23 +03:00

26 lines
526 B
Go

package main
import (
"fmt"
"github.com/irlndts/go-discogs"
)
func main() {
d := discogs.NewClient().UserAgent("TestDiscogsClient/0.0.1 +http://irlndts.moscow")
/*
params := &discogs.ReleaseParams{Release_id: "8138518"}
release, _, err := d.Release.Release(params)
*/
params := &discogs.LabelParams{Label_id: "890477", Page: 2, Per_page: 3}
label, _, err := d.Label.Releases(params)
if err != nil {
fmt.Println(err)
} else {
for _, release := range label.Releases {
fmt.Println(release.Title)
}
}
}