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

27 lines
401 B
Go
Raw Permalink Normal View History

2016-03-04 16:08:02 +00:00
package main
import (
"fmt"
2017-02-13 16:40:27 +00:00
2016-03-04 16:48:26 +00:00
"github.com/irlndts/go-discogs"
2016-03-04 16:08:02 +00:00
)
func main() {
2018-02-20 15:13:04 +00:00
d, err := discogs.NewClient(&discogs.Options{
UserAgent: "TestDiscogsClient/0.0.1 +http://example.com",
2018-03-24 13:14:54 +00:00
Currency: "AAA",
2018-02-20 16:26:00 +00:00
Token: "",
2018-02-20 15:13:04 +00:00
})
if err != nil {
2016-03-09 15:14:42 +00:00
fmt.Println(err)
2017-02-13 16:40:27 +00:00
return
}
2018-03-21 18:17:40 +00:00
release, err := d.Database.Release(12345)
2017-04-26 12:57:03 +00:00
if err != nil {
fmt.Println(err)
return
2016-03-09 15:14:42 +00:00
}
2018-03-12 16:51:37 +00:00
fmt.Printf("%+v\n", release)
2016-03-04 16:08:02 +00:00
}