DISCOGS-2 Search implementation
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user