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/discogs/discogs.go
Пискун Артем 5c75cd32bb first steps
2016-02-12 18:22:50 +03:00

24 lines
493 B
Go

package discogs
import (
"github.com/irlndts/go-apirequest"
"net/http"
)
const discogsAPI = "https://api.discogs.com/"
// Client is a Discogs client for making Discogs API requests.
type Client struct {
api *apirequest.API
Releases *ReleaseService
}
// NewClient returns a new Client.
func NewClient(httpClient *http.Client) *Client {
base := apirequest.New().Client(httpClient).Base(discogsAPI)
return &Client{
api: base,
Releases: newReleaseService(base.New()),
}
}