discogs

package
v0.0.0-...-2094810 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package discogs provides a client for interacting with the Discogs API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artist

type Artist struct {
	Name string `json:"name"`
}

type BasicInformation

type BasicInformation struct {
	Artists []Artist `json:"artists"`
	Title   string   `json:"title"`
	Year    int      `json:"year"`
}

BasicInformation contains the core details about a release.

type Client

type Client struct {
	LegacyClient discogs.Discogs // For existing collection/search calls
	HTTPClient   *http.Client
	Token        string
}

Client manages requests to the Discogs API, including the wantlist.

func NewClient

func NewClient() *Client

NewClient creates a new configured Discogs API client.

func (*Client) WantlistRequest

func (c *Client) WantlistRequest(method, url string, target interface{}) error

WantlistRequest performs a raw HTTP request to a given Discogs API endpoint. It is used for wantlist operations not covered by the legacy client.

type Image

type Image struct {
	Type        string `json:"type"`
	URI         string `json:"uri"`
	ResourceURL string `json:"resource_url"`
	URI150      string `json:"uri150"`
	Width       int    `json:"width"`
	Height      int    `json:"height"`
}

type Release

type Release struct {
	Title   string   `json:"title"`
	Artists []Artist `json:"artists"`
	Images  []Image  `json:"images"`
}

type Want

type Want struct {
	ID               int              `json:"id"`
	BasicInformation BasicInformation `json:"basic_information"`
}

Want represents a single item in the user's wantlist.

type Wantlist

type Wantlist struct {
	Wants []Want `json:"wants"`
}

Wantlist defines the structure for the entire wantlist response from Discogs.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL