DISCOGS-2 Search implementation

This commit is contained in:
irlndts
2017-02-14 22:01:50 +03:00
parent 20710e3f3e
commit d5292c30c9
10 changed files with 135 additions and 51 deletions

View File

@@ -7,10 +7,10 @@ import (
)
func main() {
d := discogs.NewClient().UserAgent("TestDiscogsClient/0.0.1 +http://irlndts.moscow").Token("")
d := discogs.NewClient("TestDiscogsClient/0.0.1 +http://irlndts.moscow", "")
params := &discogs.SearchRequest{Release_title: "nevermind", Artist: "nirvana"}
search, _, err := d.Search.Search(params)
request := &discogs.SearchRequest{Q: "The Reggaenauts - River Rock / Thursday Kick-off", Page: 0, Per_page: 1}
search, _, err := d.Search.Search(request)
if err != nil {
fmt.Println(err)
@@ -18,6 +18,6 @@ func main() {
}
for _, r := range search.Results {
fmt.Println(r)
fmt.Println(r.Id, r.Title)
}
}