This commit is contained in:
irlndts 2018-04-10 15:39:54 +03:00
parent 110a37661a
commit dd501a3f65
2 changed files with 2 additions and 7 deletions

View File

@ -25,11 +25,6 @@ func newDatabaseService(url string, currency string) *DatabaseService {
} }
} }
// ReqRelease serves release request
type ReqRelease struct {
CurrAbbr string
}
// Release serves relesase response from discogs // Release serves relesase response from discogs
type Release struct { type Release struct {
Title string `json:"title"` Title string `json:"title"`
@ -70,7 +65,7 @@ type Release struct {
// Release returns release by release's ID // Release returns release by release's ID
func (s *DatabaseService) Release(releaseID int) (*Release, error) { func (s *DatabaseService) Release(releaseID int) (*Release, error) {
params := url.Values{} params := url.Values{}
params.Set("CurrAbbr", s.currency) params.Set("curr_abbr", s.currency)
var release *Release var release *Release
if err := request(s.url+releasesURI+strconv.Itoa(releaseID), params, &release); err != nil { if err := request(s.url+releasesURI+strconv.Itoa(releaseID), params, &release); err != nil {

View File

@ -11,7 +11,7 @@ type Error struct {
} }
func (e *Error) Error() string { func (e *Error) Error() string {
return fmt.Sprintf("%s", strings.ToLower(e.Message)) return fmt.Sprintf("discogs error: %s", strings.ToLower(e.Message))
} }
// APIErrors // APIErrors