Documentation ¶
Overview ¶
Package bandcamp provides Web API access to undocumented user API.
Index ¶
- Variables
- type APIError
- type AlbumID
- type ArtID
- type BandID
- type Client
- func (c *Client) Download(d *DigitalItemDownload) (*http.Response, error)
- func (c *Client) GetCollectionItems(id FanID) (*CollectionItems, error)
- func (c *Client) GetCollectionSummary() (*FanSummary, error)
- func (c *Client) GetDigitalItem(item *Item) (*DigitalItem, error)
- func (c *Client) GetDigitalItemDownload(item *Item, format string) (*DigitalItemDownload, error)
- func (c *Client) GetItems(id FanID) ([]Item, error)
- func (c *Client) Request(method, endpoint string, body, data interface{}) error
- type CollectionItem
- type CollectionItems
- type CollectionSummary
- type CollectionSummaryItem
- type DigitalItem
- type DigitalItemDownload
- type DownloadURLs
- type EncodingsID
- type FanID
- type FanSummary
- type FollowsFans
- type GenreID
- type Item
- type ItemArt
- type ItemArtID
- type ItemID
- type ItemType
- type MerchID
- type PaymentID
- type SaleItemID
- type SaleItemType
- type TrackID
- type TralbumID
- type URLHints
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoData = errors.New("no download data found") ErrNoFormat = errors.New("format not found for downloadable") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetCollectionItems ¶
func (c *Client) GetCollectionItems(id FanID) (*CollectionItems, error)
func (*Client) GetCollectionSummary ¶
func (c *Client) GetCollectionSummary() (*FanSummary, error)
func (*Client) GetDigitalItem ¶
func (c *Client) GetDigitalItem(item *Item) (*DigitalItem, error)
func (*Client) GetDigitalItemDownload ¶
func (c *Client) GetDigitalItemDownload(item *Item, format string) (*DigitalItemDownload, error)
type CollectionItem ¶
type CollectionItem struct { // Many fields ommitted - out of scope AlsoCollectedCount int64 `json:"also_collected_count"` BandID BandID `json:"band_id"` BandName string `json:"band_name"` BandURL string `json:"band_url"` FanID FanID `json:"fan_id"` HasDigitalDownload bool `json:"has_digital_download"` Hidden bool `json:"hidden"` Art ItemArt `json:"item_art"` // Replacement for "item_art_"* ID ItemID `json:"item_id"` // Replacement for "album_id" & "tralbum_id" Title string `json:"item_title"` // Replacement for "album_title" Type ItemType `json:"item_type"` // Replacement(?) for "tralbum_type" URL string `json:"item_url"` SaleItemID SaleItemID `json:"sale_item_id"` SaleItemType SaleItemType `json:"sale_item_type"` Token string `json:"token"` }
func (CollectionItem) String ¶
func (ci CollectionItem) String() string
type CollectionItems ¶
type CollectionItems struct { LastToken string `json:"last_token"` Items []CollectionItem `json:"items"` MoreAvailable bool `json:"more_available"` RedownloadURLs DownloadURLs `json:"redownload_urls"` }
type CollectionSummary ¶
type CollectionSummary struct { ID FanID `json:"fan_id"` Username string `json:"username"` URL string `json:"url"` Lookup map[string]CollectionSummary `json:"tralbum_lookup"` Follows FollowsFans `json:"follows"` }
type CollectionSummaryItem ¶
type DigitalItem ¶
type DigitalItem struct { // Many fields omitted - out of scope Type ItemType `json:"type"` Title string `json:"title"` Artist string `json:"artist"` ArtID ArtID `json:"art_id"` ID ItemID `json:"item_id"` ItemType ItemType `json:"item_type"` Downloads map[string]DigitalItemDownload `json:"downloads"` DownloadTypeStr ItemType `json:"download_type_str"` }
type DigitalItemDownload ¶
type EncodingsID ¶
type EncodingsID int64
type FanSummary ¶
type FanSummary struct { ID FanID `json:"fan_id"` Collection CollectionSummary `json:"collection_summary"` }
type FollowsFans ¶
type Item ¶
type Item struct { DownloadURL string CollectionItem }
type SaleItemID ¶
type SaleItemID int64
type SaleItemType ¶
type SaleItemType string
Click to show internal directories.
Click to hide internal directories.