minor comment fix

This commit is contained in:
irlndts 2017-05-09 18:52:58 +03:00
parent 86244f6665
commit 0f41f45197
3 changed files with 10 additions and 3 deletions

View File

@ -1,14 +1,17 @@
package discogs
import (
"github.com/irlndts/go-apirequest"
"net/http"
"github.com/irlndts/go-apirequest"
)
// ArtistService ...
type ArtistService struct {
api *apirequest.API
}
// ArtistParams ...
type ArtistParams struct {
Artist_id string
Sort string // year, title, format
@ -17,6 +20,7 @@ type ArtistParams struct {
Per_page int
}
// Artist ...
type Artist struct {
Namevariations []string `json:"namevariations"`
Profile string `json:"profile"`
@ -30,6 +34,7 @@ type Artist struct {
Members []Member `json:"members"`
}
// ArtistReleases ...
type ArtistReleases struct {
Paginastion Page `json:"pagination"`
Releases []ReleaseSource `json:"releases"`
@ -41,6 +46,7 @@ func newArtistService(api *apirequest.API) *ArtistService {
}
}
// Artist ...
func (self *ArtistService) Artist(params *ArtistParams) (*Artist, *http.Response, error) {
artist := new(Artist)
apiError := new(APIError)
@ -49,6 +55,7 @@ func (self *ArtistService) Artist(params *ArtistParams) (*Artist, *http.Response
return artist, resp, relevantError(err, *apiError)
}
// Releases ...
func (self *ArtistService) Releases(params *ArtistParams) (*ArtistReleases, *http.Response, error) {
releases := new(ArtistReleases)
apiError := new(APIError)

View File

@ -7,7 +7,7 @@ import (
)
func main() {
d := discogs.NewClient().UserAgent("TestDiscogsClient/0.0.1 +http://irlndts.moscow").Token()
d := discogs.NewClient().UserAgent("TestDiscogsClient/0.0.1 +http://irlndts.moscow").Token("oQTQKAprakIQfWOkAxTdYyDpgUqahHtdbHTuYkIy")
if err := d.Currency("EUR"); err != nil {
fmt.Println(err)

View File

@ -28,7 +28,7 @@ type Release struct {
MasterID int `json:"master_id"`
MasterURL string `json:"master_url"`
Notes string `json:"notes,omitempty"`
NumForSale int `json:"numfor_sale,omitempty"`
NumForSale int `json:"num_for_sale,omitempty"`
Released string `json:"released"`
ReleasedFormatted string `json:"released_formatted"`
ResourceURL string `json:"resource_url"`