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
2016-03-05 01:05:14 +03:00

34 lines
652 B
Go

package discogs
import (
"github.com/irlndts/go-apirequest"
//"io/ioutil"
"net/http"
)
type ReleaseService struct {
api *apirequest.API
}
type ReleaseParams struct {
Release_id int
}
type Release struct {
Title string `json:"title"`
Id int `json:"id"`
//data_quality string
}
func newReleaseService(api *apirequest.API) *ReleaseService {
return &ReleaseService{
api: api.Path("releases/"),
}
}
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
}