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/releases.go

34 lines
652 B
Go
Raw Normal View History

2016-03-04 16:08:02 +00:00
package discogs
import (
"github.com/irlndts/go-apirequest"
2016-03-04 16:48:26 +00:00
//"io/ioutil"
"net/http"
2016-03-04 16:08:02 +00:00
)
type ReleaseService struct {
api *apirequest.API
}
2016-03-04 16:48:26 +00:00
type ReleaseParams struct {
Release_id int
}
type Release struct {
Title string `json:"title"`
2016-03-04 22:05:14 +00:00
Id int `json:"id"`
2016-03-04 16:48:26 +00:00
//data_quality string
}
2016-03-04 16:08:02 +00:00
func newReleaseService(api *apirequest.API) *ReleaseService {
return &ReleaseService{
api: api.Path("releases/"),
}
}
2016-03-04 16:48:26 +00:00
func (self *ReleaseService) Release(params *ReleaseParams) (*Release, *http.Response, error) {
release := new(Release)
resp, err := self.api.New().Get("248504").QueryStruct(params).Receive(release, nil)
return release, resp, err
}