spotted

package module
v0.18.1 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2026 License: Apache-2.0 Imports: 20 Imported by: 2

README

Unofficial Spotify API Library

Go Reference

The Unofficial Spotify library provides convenient access to the Spotted REST API from applications written in Go.

It is generated with Stainless.

MCP Server

Use the Spotted MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.

Add to Cursor Install in VS Code

Note: You may need to set environment variables in your MCP client.

Installation

import (
	"github.com/cjavdev/spotted-go" // imported as spotted
)

Or to pin the version:

go get -u 'github.com/cjavdev/spotted-go@v0.18.1'

Requirements

This library requires Go 1.22+.

Usage

The full API of this library can be found in api.md.

package main

import (
	"context"
	"fmt"

	"github.com/cjavdev/spotted-go"
	"github.com/cjavdev/spotted-go/option"
)

func main() {
	client := spotted.NewClient(
		option.WithAccessToken("My Access Token"), // defaults to os.LookupEnv("SPOTIFY_ACCESS_TOKEN")
	)
	album, err := client.Albums.Get(
		context.TODO(),
		"4aawyAB9vmqN3uQ7FjRGTy",
		spotted.AlbumGetParams{},
	)
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", album.ID)
}

Request fields

The spotted library uses the omitzero semantics from the Go 1.24+ encoding/json release for request fields.

Required primitive fields (int64, string, etc.) feature the tag `json:"...,required"`. These fields are always serialized, even their zero values.

Optional primitive types are wrapped in a param.Opt[T]. These fields can be set with the provided constructors, spotted.String(string), spotted.Int(int64), etc.

Any param.Opt[T], map, slice, struct or string enum uses the tag `json:"...,omitzero"`. Its zero value is considered omitted.

The param.IsOmitted(any) function can confirm the presence of any omitzero field.

p := spotted.ExampleParams{
	ID:   "id_xxx",              // required property
	Name: spotted.String("..."), // optional property

	Point: spotted.Point{
		X: 0,              // required field will serialize as 0
		Y: spotted.Int(1), // optional field will serialize as 1
		// ... omitted non-required fields will not be serialized
	},

	Origin: spotted.Origin{}, // the zero value of [Origin] is considered omitted
}

To send null instead of a param.Opt[T], use param.Null[T](). To send null instead of a struct T, use param.NullStruct[T]().

p.Name = param.Null[string]()       // 'null' instead of string
p.Point = param.NullStruct[Point]() // 'null' instead of struct

param.IsNull(p.Name)  // true
param.IsNull(p.Point) // true

Request structs contain a .SetExtraFields(map[string]any) method which can send non-conforming fields in the request body. Extra fields overwrite any struct fields with a matching key. For security reasons, only use SetExtraFields with trusted data.

To send a custom value instead of a struct, use param.Override[T](value).

// In cases where the API specifies a given type,
// but you want to send something else, use [SetExtraFields]:
p.SetExtraFields(map[string]any{
	"x": 0.01, // send "x" as a float instead of int
})

// Send a number instead of an object
custom := param.Override[spotted.FooParams](12)
Request unions

Unions are represented as a struct with fields prefixed by "Of" for each of its variants, only one field can be non-zero. The non-zero field will be serialized.

Sub-properties of the union can be accessed via methods on the union struct. These methods return a mutable pointer to the underlying data, if present.

// Only one field can be non-zero, use param.IsOmitted() to check if a field is set
type AnimalUnionParam struct {
	OfCat *Cat `json:",omitzero,inline`
	OfDog *Dog `json:",omitzero,inline`
}

animal := AnimalUnionParam{
	OfCat: &Cat{
		Name: "Whiskers",
		Owner: PersonParam{
			Address: AddressParam{Street: "3333 Coyote Hill Rd", Zip: 0},
		},
	},
}

// Mutating a field
if address := animal.GetOwner().GetAddress(); address != nil {
	address.ZipCode = 94304
}
Response objects

All fields in response structs are ordinary value types (not pointers or wrappers). Response structs also include a special JSON field containing metadata about each property.

type Animal struct {
	Name   string `json:"name,nullable"`
	Owners int    `json:"owners"`
	Age    int    `json:"age"`
	JSON   struct {
		Name        respjson.Field
		Owner       respjson.Field
		Age         respjson.Field
		ExtraFields map[string]respjson.Field
	} `json:"-"`
}

To handle optional data, use the .Valid() method on the JSON field. .Valid() returns true if a field is not null, not present, or couldn't be marshaled.

If .Valid() is false, the corresponding field will simply be its zero value.

raw := `{"owners": 1, "name": null}`

var res Animal
json.Unmarshal([]byte(raw), &res)

// Accessing regular fields

res.Owners // 1
res.Name   // ""
res.Age    // 0

// Optional field checks

res.JSON.Owners.Valid() // true
res.JSON.Name.Valid()   // false
res.JSON.Age.Valid()    // false

// Raw JSON values

res.JSON.Owners.Raw()                  // "1"
res.JSON.Name.Raw() == "null"          // true
res.JSON.Name.Raw() == respjson.Null   // true
res.JSON.Age.Raw() == ""               // true
res.JSON.Age.Raw() == respjson.Omitted // true

These .JSON structs also include an ExtraFields map containing any properties in the json response that were not specified in the struct. This can be useful for API features not yet present in the SDK.

body := res.JSON.ExtraFields["my_unexpected_field"].Raw()
Response Unions

In responses, unions are represented by a flattened struct containing all possible fields from each of the object variants. To convert it to a variant use the .AsFooVariant() method or the .AsAny() method if present.

If a response value union contains primitive values, primitive fields will be alongside the properties but prefixed with Of and feature the tag json:"...,inline".

type AnimalUnion struct {
	// From variants [Dog], [Cat]
	Owner Person `json:"owner"`
	// From variant [Dog]
	DogBreed string `json:"dog_breed"`
	// From variant [Cat]
	CatBreed string `json:"cat_breed"`
	// ...

	JSON struct {
		Owner respjson.Field
		// ...
	} `json:"-"`
}

// If animal variant
if animal.Owner.Address.ZipCode == "" {
	panic("missing zip code")
}

// Switch on the variant
switch variant := animal.AsAny().(type) {
case Dog:
case Cat:
default:
	panic("unexpected type")
}
RequestOptions

This library uses the functional options pattern. Functions defined in the option package return a RequestOption, which is a closure that mutates a RequestConfig. These options can be supplied to the client or at individual requests. For example:

client := spotted.NewClient(
	// Adds a header to every request made by the client
	option.WithHeader("X-Some-Header", "custom_header_info"),
)

client.Albums.Get(context.TODO(), ...,
	// Override the header
	option.WithHeader("X-Some-Header", "some_other_custom_header_info"),
	// Add an undocumented field to the request body, using sjson syntax
	option.WithJSONSet("some.json.path", map[string]string{"my": "object"}),
)

The request option option.WithDebugLog(nil) may be helpful while debugging.

See the full list of request options.

Pagination

This library provides some conveniences for working with paginated list endpoints.

You can use .ListAutoPaging() methods to iterate through items across all pages:

iter := client.Shows.ListEpisodesAutoPaging(
	context.TODO(),
	"showid",
	spotted.ShowListEpisodesParams{
		Limit:  spotted.Int(10),
		Offset: spotted.Int(20),
	},
)
// Automatically fetches more pages as needed.
for iter.Next() {
	simplifiedEpisodeObject := iter.Current()
	fmt.Printf("%+v\n", simplifiedEpisodeObject)
}
if err := iter.Err(); err != nil {
	panic(err.Error())
}

Or you can use simple .List() methods to fetch a single page and receive a standard response object with additional helper methods like .GetNextPage(), e.g.:

page, err := client.Shows.ListEpisodes(
	context.TODO(),
	"showid",
	spotted.ShowListEpisodesParams{
		Limit:  spotted.Int(10),
		Offset: spotted.Int(20),
	},
)
for page != nil {
	for _, show := range page.Items {
		fmt.Printf("%+v\n", show)
	}
	page, err = page.GetNextPage()
}
if err != nil {
	panic(err.Error())
}
Errors

When the API returns a non-success status code, we return an error with type *spotted.Error. This contains the StatusCode, *http.Request, and *http.Response values of the request, as well as the JSON of the error body (much like other response objects in the SDK).

To handle errors, we recommend that you use the errors.As pattern:

_, err := client.Albums.Get(
	context.TODO(),
	"4aawyAB9vmqN3uQ7FjRGTy",
	spotted.AlbumGetParams{},
)
if err != nil {
	var apierr *spotted.Error
	if errors.As(err, &apierr) {
		println(string(apierr.DumpRequest(true)))  // Prints the serialized HTTP request
		println(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response
	}
	panic(err.Error()) // GET "/albums/{id}": 400 Bad Request { ... }
}

When other errors occur, they are returned unwrapped; for example, if HTTP transport fails, you might receive *url.Error wrapping *net.OpError.

Timeouts

Requests do not time out by default; use context to configure a timeout for a request lifecycle.

Note that if a request is retried, the context timeout does not start over. To set a per-retry timeout, use option.WithRequestTimeout().

// This sets the timeout for the request, including all the retries.
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
defer cancel()
client.Albums.Get(
	ctx,
	"4aawyAB9vmqN3uQ7FjRGTy",
	spotted.AlbumGetParams{},
	// This sets the per-retry timeout
	option.WithRequestTimeout(20*time.Second),
)
File uploads

Request parameters that correspond to file uploads in multipart requests are typed as io.Reader. The contents of the io.Reader will by default be sent as a multipart form part with the file name of "anonymous_file" and content-type of "application/octet-stream".

The file name and content-type can be customized by implementing Name() string or ContentType() string on the run-time type of io.Reader. Note that os.File implements Name() string, so a file returned by os.Open will be sent with the file name on disk.

We also provide a helper spotted.File(reader io.Reader, filename string, contentType string) which can be used to wrap any io.Reader with the appropriate file name and content type.

Retries

Certain errors will be automatically retried 2 times by default, with a short exponential backoff. We retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit, and >=500 Internal errors.

You can use the WithMaxRetries option to configure or disable this:

// Configure the default for all requests:
client := spotted.NewClient(
	option.WithMaxRetries(0), // default is 2
)

// Override per-request:
client.Albums.Get(
	context.TODO(),
	"4aawyAB9vmqN3uQ7FjRGTy",
	spotted.AlbumGetParams{},
	option.WithMaxRetries(5),
)
Accessing raw response data (e.g. response headers)

You can access the raw HTTP response data by using the option.WithResponseInto() request option. This is useful when you need to examine response headers, status codes, or other details.

// Create a variable to store the HTTP response
var response *http.Response
album, err := client.Albums.Get(
	context.TODO(),
	"4aawyAB9vmqN3uQ7FjRGTy",
	spotted.AlbumGetParams{},
	option.WithResponseInto(&response),
)
if err != nil {
	// handle error
}
fmt.Printf("%+v\n", album)

fmt.Printf("Status Code: %d\n", response.StatusCode)
fmt.Printf("Headers: %+#v\n", response.Header)
Making custom/undocumented requests

This library is typed for convenient access to the documented API. If you need to access undocumented endpoints, params, or response properties, the library can still be used.

Undocumented endpoints

To make requests to undocumented endpoints, you can use client.Get, client.Post, and other HTTP verbs. RequestOptions on the client, such as retries, will be respected when making these requests.

var (
    // params can be an io.Reader, a []byte, an encoding/json serializable object,
    // or a "…Params" struct defined in this library.
    params map[string]any

    // result can be an []byte, *http.Response, a encoding/json deserializable object,
    // or a model defined in this library.
    result *http.Response
)
err := client.Post(context.Background(), "/unspecified", params, &result)
if err != nil {
    …
}
Undocumented request params

To make requests using undocumented parameters, you may use either the option.WithQuerySet() or the option.WithJSONSet() methods.

params := FooNewParams{
    ID:   "id_xxxx",
    Data: FooNewParamsData{
        FirstName: spotted.String("John"),
    },
}
client.Foo.New(context.Background(), params, option.WithJSONSet("data.last_name", "Doe"))
Undocumented response properties

To access undocumented response properties, you may either access the raw JSON of the response as a string with result.JSON.RawJSON(), or get the raw JSON of a particular field on the result with result.JSON.Foo.Raw().

Any fields that are not present on the response struct will be saved and can be accessed by result.JSON.ExtraFields() which returns the extra fields as a map[string]Field.

Middleware

We provide option.WithMiddleware which applies the given middleware to requests.

func Logger(req *http.Request, next option.MiddlewareNext) (res *http.Response, err error) {
	// Before the request
	start := time.Now()
	LogReq(req)

	// Forward the request to the next handler
	res, err = next(req)

	// Handle stuff after the request
	end := time.Now()
	LogRes(res, err, start - end)

    return res, err
}

client := spotted.NewClient(
	option.WithMiddleware(Logger),
)

When multiple middlewares are provided as variadic arguments, the middlewares are applied left to right. If option.WithMiddleware is given multiple times, for example first in the client then the method, the middleware in the client will run first and the middleware given in the method will run next.

You may also replace the default http.Client with option.WithHTTPClient(client). Only one http client is accepted (this overwrites any previous client) and receives requests after any middleware has been applied.

Semantic versioning

This package generally follows SemVer conventions, though certain backwards-incompatible changes may be released as minor versions:

  1. Changes to library internals which are technically public but not intended or documented for external use. (Please open a GitHub issue to let us know if you are relying on such internals.)
  2. Changes that we do not expect to impact the vast majority of users in practice.

We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.

We are keen for your feedback; please open an issue with questions, bugs, or suggestions.

Contributing

See the contributing documentation.

Documentation

Index

Constants

View Source
const AlbumRestrictionObjectReasonExplicit = shared.AlbumRestrictionObjectReasonExplicit

Equals "explicit"

View Source
const AlbumRestrictionObjectReasonMarket = shared.AlbumRestrictionObjectReasonMarket

Equals "market"

View Source
const AlbumRestrictionObjectReasonProduct = shared.AlbumRestrictionObjectReasonProduct

Equals "product"

View Source
const ArtistObjectTypeArtist = shared.ArtistObjectTypeArtist

Equals "artist"

View Source
const EpisodeObjectReleaseDatePrecisionDay = shared.EpisodeObjectReleaseDatePrecisionDay

Equals "day"

View Source
const EpisodeObjectReleaseDatePrecisionMonth = shared.EpisodeObjectReleaseDatePrecisionMonth

Equals "month"

View Source
const EpisodeObjectReleaseDatePrecisionYear = shared.EpisodeObjectReleaseDatePrecisionYear

Equals "year"

View Source
const PlaylistUserObjectTypeUser = shared.PlaylistUserObjectTypeUser

Equals "user"

View Source
const SimplifiedArtistObjectTypeArtist = shared.SimplifiedArtistObjectTypeArtist

Equals "artist"

View Source
const SimplifiedEpisodeObjectReleaseDatePrecisionDay = shared.SimplifiedEpisodeObjectReleaseDatePrecisionDay

Equals "day"

View Source
const SimplifiedEpisodeObjectReleaseDatePrecisionMonth = shared.SimplifiedEpisodeObjectReleaseDatePrecisionMonth

Equals "month"

View Source
const SimplifiedEpisodeObjectReleaseDatePrecisionYear = shared.SimplifiedEpisodeObjectReleaseDatePrecisionYear

Equals "year"

View Source
const TrackObjectTypeTrack = shared.TrackObjectTypeTrack

Equals "track"

Variables

This section is empty.

Functions

func Bool

func Bool(b bool) param.Opt[bool]

func BoolPtr

func BoolPtr(v bool) *bool

func DefaultClientOptions

func DefaultClientOptions() []option.RequestOption

DefaultClientOptions read from the environment (SPOTIFY_ACCESS_TOKEN, SPOTTED_BASE_URL). This should be used to initialize new clients.

func File

func File(rdr io.Reader, filename string, contentType string) file

func Float

func Float(f float64) param.Opt[float64]

func FloatPtr

func FloatPtr(v float64) *float64

func Int

func Int(i int64) param.Opt[int64]

func IntPtr

func IntPtr(v int64) *int64

func Opt

func Opt[T comparable](v T) param.Opt[T]

func Ptr

func Ptr[T any](v T) *T

func String

func String(s string) param.Opt[string]

func StringPtr

func StringPtr(v string) *string

func Time

func Time(t time.Time) param.Opt[time.Time]

func TimePtr

func TimePtr(v time.Time) *time.Time

Types

type AlbumBulkGetParams

type AlbumBulkGetParams struct {
	// A comma-separated list of the
	// [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids) for the albums.
	// Maximum: 20 IDs.
	IDs string `query:"ids,required" json:"-"`
	// An
	// [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// If a country code is specified, only content that is available in that market
	// will be returned.<br/> If a valid user access token is specified in the request
	// header, the country associated with the user account will take priority over
	// this parameter.<br/> _**Note**: If neither market or user country are provided,
	// the content is considered unavailable for the client._<br/> Users can view the
	// country that is associated with their account in the
	// [account settings](https://www.spotify.com/account/overview/).
	Market param.Opt[string] `query:"market,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (AlbumBulkGetParams) URLQuery

func (r AlbumBulkGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes AlbumBulkGetParams's query parameters as `url.Values`.

type AlbumBulkGetResponse

type AlbumBulkGetResponse struct {
	Albums []AlbumBulkGetResponseAlbum `json:"albums,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Albums      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AlbumBulkGetResponse) RawJSON

func (r AlbumBulkGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*AlbumBulkGetResponse) UnmarshalJSON

func (r *AlbumBulkGetResponse) UnmarshalJSON(data []byte) error

type AlbumBulkGetResponseAlbum

type AlbumBulkGetResponseAlbum struct {
	// The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the
	// album.
	ID string `json:"id,required"`
	// The type of the album.
	//
	// Any of "album", "single", "compilation".
	AlbumType string `json:"album_type,required"`
	// The markets in which the album is available:
	// [ISO 3166-1 alpha-2 country codes](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// _**NOTE**: an album is considered available in a market when at least 1 of its
	// tracks is available in that market._
	AvailableMarkets []string `json:"available_markets,required"`
	// Known external URLs for this album.
	ExternalURLs shared.ExternalURLObject `json:"external_urls,required"`
	// A link to the Web API endpoint providing full details of the album.
	Href string `json:"href,required"`
	// The cover art for the album in various sizes, widest first.
	Images []shared.ImageObject `json:"images,required"`
	// The name of the album. In case of an album takedown, the value may be an empty
	// string.
	Name string `json:"name,required"`
	// The date the album was first released.
	ReleaseDate string `json:"release_date,required"`
	// The precision with which `release_date` value is known.
	//
	// Any of "year", "month", "day".
	ReleaseDatePrecision string `json:"release_date_precision,required"`
	// The number of tracks in the album.
	TotalTracks int64 `json:"total_tracks,required"`
	// The object type.
	Type constant.Album `json:"type,required"`
	// The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the
	// album.
	Uri string `json:"uri,required"`
	// The artists of the album. Each artist object includes a link in `href` to more
	// detailed information about the artist.
	Artists []shared.SimplifiedArtistObject `json:"artists"`
	// The copyright statements of the album.
	Copyrights []shared.CopyrightObject `json:"copyrights"`
	// Known external IDs for the album.
	ExternalIDs shared.ExternalIDObject `json:"external_ids"`
	// **Deprecated** The array is always empty.
	//
	// Deprecated: deprecated
	Genres []string `json:"genres"`
	// The label associated with the album.
	Label string `json:"label"`
	// The popularity of the album. The value will be between 0 and 100, with 100 being
	// the most popular.
	Popularity int64 `json:"popularity"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// Included in the response when a content restriction is applied.
	Restrictions shared.AlbumRestrictionObject `json:"restrictions"`
	// The tracks of the album.
	Tracks AlbumBulkGetResponseAlbumTracks `json:"tracks"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                   respjson.Field
		AlbumType            respjson.Field
		AvailableMarkets     respjson.Field
		ExternalURLs         respjson.Field
		Href                 respjson.Field
		Images               respjson.Field
		Name                 respjson.Field
		ReleaseDate          respjson.Field
		ReleaseDatePrecision respjson.Field
		TotalTracks          respjson.Field
		Type                 respjson.Field
		Uri                  respjson.Field
		Artists              respjson.Field
		Copyrights           respjson.Field
		ExternalIDs          respjson.Field
		Genres               respjson.Field
		Label                respjson.Field
		Popularity           respjson.Field
		Published            respjson.Field
		Restrictions         respjson.Field
		Tracks               respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AlbumBulkGetResponseAlbum) RawJSON

func (r AlbumBulkGetResponseAlbum) RawJSON() string

Returns the unmodified JSON received from the API

func (*AlbumBulkGetResponseAlbum) UnmarshalJSON

func (r *AlbumBulkGetResponseAlbum) UnmarshalJSON(data []byte) error

type AlbumBulkGetResponseAlbumTracks

type AlbumBulkGetResponseAlbumTracks struct {
	// A link to the Web API endpoint returning the full result of the request
	Href string `json:"href,required"`
	// The maximum number of items in the response (as set in the query or by default).
	Limit int64 `json:"limit,required"`
	// URL to the next page of items. ( `null` if none)
	Next string `json:"next,required"`
	// The offset of the items returned (as set in the query or by default)
	Offset int64 `json:"offset,required"`
	// URL to the previous page of items. ( `null` if none)
	Previous string `json:"previous,required"`
	// The total number of items available to return.
	Total int64                          `json:"total,required"`
	Items []shared.SimplifiedTrackObject `json:"items"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Href        respjson.Field
		Limit       respjson.Field
		Next        respjson.Field
		Offset      respjson.Field
		Previous    respjson.Field
		Total       respjson.Field
		Items       respjson.Field
		Published   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The tracks of the album.

func (AlbumBulkGetResponseAlbumTracks) RawJSON

Returns the unmodified JSON received from the API

func (*AlbumBulkGetResponseAlbumTracks) UnmarshalJSON

func (r *AlbumBulkGetResponseAlbumTracks) UnmarshalJSON(data []byte) error

type AlbumGetParams

type AlbumGetParams struct {
	// An
	// [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// If a country code is specified, only content that is available in that market
	// will be returned.<br/> If a valid user access token is specified in the request
	// header, the country associated with the user account will take priority over
	// this parameter.<br/> _**Note**: If neither market or user country are provided,
	// the content is considered unavailable for the client._<br/> Users can view the
	// country that is associated with their account in the
	// [account settings](https://www.spotify.com/account/overview/).
	Market param.Opt[string] `query:"market,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (AlbumGetParams) URLQuery

func (r AlbumGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes AlbumGetParams's query parameters as `url.Values`.

type AlbumGetResponse

type AlbumGetResponse struct {
	// The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the
	// album.
	ID string `json:"id,required"`
	// The type of the album.
	//
	// Any of "album", "single", "compilation".
	AlbumType AlbumGetResponseAlbumType `json:"album_type,required"`
	// The markets in which the album is available:
	// [ISO 3166-1 alpha-2 country codes](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// _**NOTE**: an album is considered available in a market when at least 1 of its
	// tracks is available in that market._
	AvailableMarkets []string `json:"available_markets,required"`
	// Known external URLs for this album.
	ExternalURLs shared.ExternalURLObject `json:"external_urls,required"`
	// A link to the Web API endpoint providing full details of the album.
	Href string `json:"href,required"`
	// The cover art for the album in various sizes, widest first.
	Images []shared.ImageObject `json:"images,required"`
	// The name of the album. In case of an album takedown, the value may be an empty
	// string.
	Name string `json:"name,required"`
	// The date the album was first released.
	ReleaseDate string `json:"release_date,required"`
	// The precision with which `release_date` value is known.
	//
	// Any of "year", "month", "day".
	ReleaseDatePrecision AlbumGetResponseReleaseDatePrecision `json:"release_date_precision,required"`
	// The number of tracks in the album.
	TotalTracks int64 `json:"total_tracks,required"`
	// The object type.
	Type constant.Album `json:"type,required"`
	// The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the
	// album.
	Uri string `json:"uri,required"`
	// The artists of the album. Each artist object includes a link in `href` to more
	// detailed information about the artist.
	Artists []shared.SimplifiedArtistObject `json:"artists"`
	// The copyright statements of the album.
	Copyrights []shared.CopyrightObject `json:"copyrights"`
	// Known external IDs for the album.
	ExternalIDs shared.ExternalIDObject `json:"external_ids"`
	// **Deprecated** The array is always empty.
	//
	// Deprecated: deprecated
	Genres []string `json:"genres"`
	// The label associated with the album.
	Label string `json:"label"`
	// The popularity of the album. The value will be between 0 and 100, with 100 being
	// the most popular.
	Popularity int64 `json:"popularity"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// Included in the response when a content restriction is applied.
	Restrictions shared.AlbumRestrictionObject `json:"restrictions"`
	// The tracks of the album.
	Tracks AlbumGetResponseTracks `json:"tracks"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                   respjson.Field
		AlbumType            respjson.Field
		AvailableMarkets     respjson.Field
		ExternalURLs         respjson.Field
		Href                 respjson.Field
		Images               respjson.Field
		Name                 respjson.Field
		ReleaseDate          respjson.Field
		ReleaseDatePrecision respjson.Field
		TotalTracks          respjson.Field
		Type                 respjson.Field
		Uri                  respjson.Field
		Artists              respjson.Field
		Copyrights           respjson.Field
		ExternalIDs          respjson.Field
		Genres               respjson.Field
		Label                respjson.Field
		Popularity           respjson.Field
		Published            respjson.Field
		Restrictions         respjson.Field
		Tracks               respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AlbumGetResponse) RawJSON

func (r AlbumGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*AlbumGetResponse) UnmarshalJSON

func (r *AlbumGetResponse) UnmarshalJSON(data []byte) error

type AlbumGetResponseAlbumType

type AlbumGetResponseAlbumType string

The type of the album.

const (
	AlbumGetResponseAlbumTypeAlbum       AlbumGetResponseAlbumType = "album"
	AlbumGetResponseAlbumTypeSingle      AlbumGetResponseAlbumType = "single"
	AlbumGetResponseAlbumTypeCompilation AlbumGetResponseAlbumType = "compilation"
)

type AlbumGetResponseReleaseDatePrecision

type AlbumGetResponseReleaseDatePrecision string

The precision with which `release_date` value is known.

const (
	AlbumGetResponseReleaseDatePrecisionYear  AlbumGetResponseReleaseDatePrecision = "year"
	AlbumGetResponseReleaseDatePrecisionMonth AlbumGetResponseReleaseDatePrecision = "month"
	AlbumGetResponseReleaseDatePrecisionDay   AlbumGetResponseReleaseDatePrecision = "day"
)

type AlbumGetResponseTracks

type AlbumGetResponseTracks struct {
	// A link to the Web API endpoint returning the full result of the request
	Href string `json:"href,required"`
	// The maximum number of items in the response (as set in the query or by default).
	Limit int64 `json:"limit,required"`
	// URL to the next page of items. ( `null` if none)
	Next string `json:"next,required"`
	// The offset of the items returned (as set in the query or by default)
	Offset int64 `json:"offset,required"`
	// URL to the previous page of items. ( `null` if none)
	Previous string `json:"previous,required"`
	// The total number of items available to return.
	Total int64                          `json:"total,required"`
	Items []shared.SimplifiedTrackObject `json:"items"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Href        respjson.Field
		Limit       respjson.Field
		Next        respjson.Field
		Offset      respjson.Field
		Previous    respjson.Field
		Total       respjson.Field
		Items       respjson.Field
		Published   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The tracks of the album.

func (AlbumGetResponseTracks) RawJSON

func (r AlbumGetResponseTracks) RawJSON() string

Returns the unmodified JSON received from the API

func (*AlbumGetResponseTracks) UnmarshalJSON

func (r *AlbumGetResponseTracks) UnmarshalJSON(data []byte) error

type AlbumListTracksParams

type AlbumListTracksParams struct {
	// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// An
	// [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// If a country code is specified, only content that is available in that market
	// will be returned.<br/> If a valid user access token is specified in the request
	// header, the country associated with the user account will take priority over
	// this parameter.<br/> _**Note**: If neither market or user country are provided,
	// the content is considered unavailable for the client._<br/> Users can view the
	// country that is associated with their account in the
	// [account settings](https://www.spotify.com/account/overview/).
	Market param.Opt[string] `query:"market,omitzero" json:"-"`
	// The index of the first item to return. Default: 0 (the first item). Use with
	// limit to get the next set of items.
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (AlbumListTracksParams) URLQuery

func (r AlbumListTracksParams) URLQuery() (v url.Values, err error)

URLQuery serializes AlbumListTracksParams's query parameters as `url.Values`.

type AlbumRestrictionObject

type AlbumRestrictionObject = shared.AlbumRestrictionObject

This is an alias to an internal type.

type AlbumRestrictionObjectReason

type AlbumRestrictionObjectReason = shared.AlbumRestrictionObjectReason

The reason for the restriction. Albums may be restricted if the content is not available in a given market, to the user's subscription type, or when the user's account is set to not play explicit content. Additional reasons may be added in the future.

This is an alias to an internal type.

type AlbumService

type AlbumService struct {
	Options []option.RequestOption
}

AlbumService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAlbumService method instead.

func NewAlbumService

func NewAlbumService(opts ...option.RequestOption) (r AlbumService)

NewAlbumService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*AlbumService) BulkGet

func (r *AlbumService) BulkGet(ctx context.Context, query AlbumBulkGetParams, opts ...option.RequestOption) (res *AlbumBulkGetResponse, err error)

Get Spotify catalog information for multiple albums identified by their Spotify IDs.

func (*AlbumService) Get

func (r *AlbumService) Get(ctx context.Context, id string, query AlbumGetParams, opts ...option.RequestOption) (res *AlbumGetResponse, err error)

Get Spotify catalog information for a single album.

func (*AlbumService) ListTracks

Get Spotify catalog information about an album’s tracks. Optional parameters can be used to limit the number of tracks returned.

func (*AlbumService) ListTracksAutoPaging

Get Spotify catalog information about an album’s tracks. Optional parameters can be used to limit the number of tracks returned.

type ArtistBulkGetParams

type ArtistBulkGetParams struct {
	// A comma-separated list of the
	// [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids) for the artists.
	// Maximum: 50 IDs.
	IDs string `query:"ids,required" json:"-"`
	// contains filtered or unexported fields
}

func (ArtistBulkGetParams) URLQuery

func (r ArtistBulkGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes ArtistBulkGetParams's query parameters as `url.Values`.

type ArtistBulkGetResponse

type ArtistBulkGetResponse struct {
	Artists []shared.ArtistObject `json:"artists,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Artists     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ArtistBulkGetResponse) RawJSON

func (r ArtistBulkGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ArtistBulkGetResponse) UnmarshalJSON

func (r *ArtistBulkGetResponse) UnmarshalJSON(data []byte) error

type ArtistListAlbumsParams

type ArtistListAlbumsParams struct {
	// A comma-separated list of keywords that will be used to filter the response. If
	// not supplied, all album types will be returned. <br/> Valid values are:<br/>-
	// `album`<br/>- `single`<br/>- `appears_on`<br/>- `compilation`<br/>For example:
	// `include_groups=album,single`.
	IncludeGroups param.Opt[string] `query:"include_groups,omitzero" json:"-"`
	// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// An
	// [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// If a country code is specified, only content that is available in that market
	// will be returned.<br/> If a valid user access token is specified in the request
	// header, the country associated with the user account will take priority over
	// this parameter.<br/> _**Note**: If neither market or user country are provided,
	// the content is considered unavailable for the client._<br/> Users can view the
	// country that is associated with their account in the
	// [account settings](https://www.spotify.com/account/overview/).
	Market param.Opt[string] `query:"market,omitzero" json:"-"`
	// The index of the first item to return. Default: 0 (the first item). Use with
	// limit to get the next set of items.
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ArtistListAlbumsParams) URLQuery

func (r ArtistListAlbumsParams) URLQuery() (v url.Values, err error)

URLQuery serializes ArtistListAlbumsParams's query parameters as `url.Values`.

type ArtistListAlbumsResponse

type ArtistListAlbumsResponse struct {
	// The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the
	// album.
	ID string `json:"id,required"`
	// This field describes the relationship between the artist and the album.
	//
	// Any of "album", "single", "compilation", "appears_on".
	AlbumGroup ArtistListAlbumsResponseAlbumGroup `json:"album_group,required"`
	// The type of the album.
	//
	// Any of "album", "single", "compilation".
	AlbumType ArtistListAlbumsResponseAlbumType `json:"album_type,required"`
	// The artists of the album. Each artist object includes a link in `href` to more
	// detailed information about the artist.
	Artists []shared.SimplifiedArtistObject `json:"artists,required"`
	// The markets in which the album is available:
	// [ISO 3166-1 alpha-2 country codes](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// _**NOTE**: an album is considered available in a market when at least 1 of its
	// tracks is available in that market._
	AvailableMarkets []string `json:"available_markets,required"`
	// Known external URLs for this album.
	ExternalURLs shared.ExternalURLObject `json:"external_urls,required"`
	// A link to the Web API endpoint providing full details of the album.
	Href string `json:"href,required"`
	// The cover art for the album in various sizes, widest first.
	Images []shared.ImageObject `json:"images,required"`
	// The name of the album. In case of an album takedown, the value may be an empty
	// string.
	Name string `json:"name,required"`
	// The date the album was first released.
	ReleaseDate string `json:"release_date,required"`
	// The precision with which `release_date` value is known.
	//
	// Any of "year", "month", "day".
	ReleaseDatePrecision ArtistListAlbumsResponseReleaseDatePrecision `json:"release_date_precision,required"`
	// The number of tracks in the album.
	TotalTracks int64 `json:"total_tracks,required"`
	// The object type.
	Type constant.Album `json:"type,required"`
	// The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the
	// album.
	Uri string `json:"uri,required"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// Included in the response when a content restriction is applied.
	Restrictions shared.AlbumRestrictionObject `json:"restrictions"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                   respjson.Field
		AlbumGroup           respjson.Field
		AlbumType            respjson.Field
		Artists              respjson.Field
		AvailableMarkets     respjson.Field
		ExternalURLs         respjson.Field
		Href                 respjson.Field
		Images               respjson.Field
		Name                 respjson.Field
		ReleaseDate          respjson.Field
		ReleaseDatePrecision respjson.Field
		TotalTracks          respjson.Field
		Type                 respjson.Field
		Uri                  respjson.Field
		Published            respjson.Field
		Restrictions         respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ArtistListAlbumsResponse) RawJSON

func (r ArtistListAlbumsResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ArtistListAlbumsResponse) UnmarshalJSON

func (r *ArtistListAlbumsResponse) UnmarshalJSON(data []byte) error

type ArtistListAlbumsResponseAlbumGroup

type ArtistListAlbumsResponseAlbumGroup string

This field describes the relationship between the artist and the album.

const (
	ArtistListAlbumsResponseAlbumGroupAlbum       ArtistListAlbumsResponseAlbumGroup = "album"
	ArtistListAlbumsResponseAlbumGroupSingle      ArtistListAlbumsResponseAlbumGroup = "single"
	ArtistListAlbumsResponseAlbumGroupCompilation ArtistListAlbumsResponseAlbumGroup = "compilation"
	ArtistListAlbumsResponseAlbumGroupAppearsOn   ArtistListAlbumsResponseAlbumGroup = "appears_on"
)

type ArtistListAlbumsResponseAlbumType

type ArtistListAlbumsResponseAlbumType string

The type of the album.

const (
	ArtistListAlbumsResponseAlbumTypeAlbum       ArtistListAlbumsResponseAlbumType = "album"
	ArtistListAlbumsResponseAlbumTypeSingle      ArtistListAlbumsResponseAlbumType = "single"
	ArtistListAlbumsResponseAlbumTypeCompilation ArtistListAlbumsResponseAlbumType = "compilation"
)

type ArtistListAlbumsResponseReleaseDatePrecision

type ArtistListAlbumsResponseReleaseDatePrecision string

The precision with which `release_date` value is known.

const (
	ArtistListAlbumsResponseReleaseDatePrecisionYear  ArtistListAlbumsResponseReleaseDatePrecision = "year"
	ArtistListAlbumsResponseReleaseDatePrecisionMonth ArtistListAlbumsResponseReleaseDatePrecision = "month"
	ArtistListAlbumsResponseReleaseDatePrecisionDay   ArtistListAlbumsResponseReleaseDatePrecision = "day"
)

type ArtistListRelatedArtistsResponse

type ArtistListRelatedArtistsResponse struct {
	Artists []shared.ArtistObject `json:"artists,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Artists     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ArtistListRelatedArtistsResponse) RawJSON

Returns the unmodified JSON received from the API

func (*ArtistListRelatedArtistsResponse) UnmarshalJSON

func (r *ArtistListRelatedArtistsResponse) UnmarshalJSON(data []byte) error

type ArtistObject

type ArtistObject = shared.ArtistObject

This is an alias to an internal type.

type ArtistObjectType

type ArtistObjectType = shared.ArtistObjectType

The object type.

This is an alias to an internal type.

type ArtistService

type ArtistService struct {
	Options []option.RequestOption
}

ArtistService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewArtistService method instead.

func NewArtistService

func NewArtistService(opts ...option.RequestOption) (r ArtistService)

NewArtistService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ArtistService) BulkGet

Get Spotify catalog information for several artists based on their Spotify IDs.

func (*ArtistService) Get

func (r *ArtistService) Get(ctx context.Context, id string, opts ...option.RequestOption) (res *shared.ArtistObject, err error)

Get Spotify catalog information for a single artist identified by their unique Spotify ID.

func (*ArtistService) ListAlbums

Get Spotify catalog information about an artist's albums.

func (*ArtistService) ListAlbumsAutoPaging

Get Spotify catalog information about an artist's albums.

func (*ArtistService) ListRelatedArtists deprecated

func (r *ArtistService) ListRelatedArtists(ctx context.Context, id string, opts ...option.RequestOption) (res *ArtistListRelatedArtistsResponse, err error)

Get Spotify catalog information about artists similar to a given artist. Similarity is based on analysis of the Spotify community's listening history.

Deprecated: deprecated

func (*ArtistService) TopTracks

Get Spotify catalog information about an artist's top tracks by country.

type ArtistTopTracksParams

type ArtistTopTracksParams struct {
	// An
	// [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// If a country code is specified, only content that is available in that market
	// will be returned.<br/> If a valid user access token is specified in the request
	// header, the country associated with the user account will take priority over
	// this parameter.<br/> _**Note**: If neither market or user country are provided,
	// the content is considered unavailable for the client._<br/> Users can view the
	// country that is associated with their account in the
	// [account settings](https://www.spotify.com/account/overview/).
	Market param.Opt[string] `query:"market,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ArtistTopTracksParams) URLQuery

func (r ArtistTopTracksParams) URLQuery() (v url.Values, err error)

URLQuery serializes ArtistTopTracksParams's query parameters as `url.Values`.

type ArtistTopTracksResponse

type ArtistTopTracksResponse struct {
	Tracks []shared.TrackObject `json:"tracks,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Tracks      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ArtistTopTracksResponse) RawJSON

func (r ArtistTopTracksResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ArtistTopTracksResponse) UnmarshalJSON

func (r *ArtistTopTracksResponse) UnmarshalJSON(data []byte) error

type AudioAnalysisGetResponse

type AudioAnalysisGetResponse struct {
	// The time intervals of the bars throughout the track. A bar (or measure) is a
	// segment of time defined as a given number of beats.
	Bars []TimeIntervalObject `json:"bars"`
	// The time intervals of beats throughout the track. A beat is the basic time unit
	// of a piece of music; for example, each tick of a metronome. Beats are typically
	// multiples of tatums.
	Beats []TimeIntervalObject         `json:"beats"`
	Meta  AudioAnalysisGetResponseMeta `json:"meta"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// Sections are defined by large variations in rhythm or timbre, e.g. chorus,
	// verse, bridge, guitar solo, etc. Each section contains its own descriptions of
	// tempo, key, mode, time_signature, and loudness.
	Sections []AudioAnalysisGetResponseSection `json:"sections"`
	// Each segment contains a roughly conisistent sound throughout its duration.
	Segments []AudioAnalysisGetResponseSegment `json:"segments"`
	// A tatum represents the lowest regular pulse train that a listener intuitively
	// infers from the timing of perceived musical events (segments).
	Tatums []TimeIntervalObject          `json:"tatums"`
	Track  AudioAnalysisGetResponseTrack `json:"track"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Bars        respjson.Field
		Beats       respjson.Field
		Meta        respjson.Field
		Published   respjson.Field
		Sections    respjson.Field
		Segments    respjson.Field
		Tatums      respjson.Field
		Track       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AudioAnalysisGetResponse) RawJSON

func (r AudioAnalysisGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*AudioAnalysisGetResponse) UnmarshalJSON

func (r *AudioAnalysisGetResponse) UnmarshalJSON(data []byte) error

type AudioAnalysisGetResponseMeta

type AudioAnalysisGetResponseMeta struct {
	// The amount of time taken to analyze this track.
	AnalysisTime float64 `json:"analysis_time"`
	// The version of the Analyzer used to analyze this track.
	AnalyzerVersion string `json:"analyzer_version"`
	// A detailed status code for this track. If analysis data is missing, this code
	// may explain why.
	DetailedStatus string `json:"detailed_status"`
	// The method used to read the track's audio data.
	InputProcess string `json:"input_process"`
	// The platform used to read the track's audio data.
	Platform string `json:"platform"`
	// The return code of the analyzer process. 0 if successful, 1 if any errors
	// occurred.
	StatusCode int64 `json:"status_code"`
	// The Unix timestamp (in seconds) at which this track was analyzed.
	Timestamp int64 `json:"timestamp"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AnalysisTime    respjson.Field
		AnalyzerVersion respjson.Field
		DetailedStatus  respjson.Field
		InputProcess    respjson.Field
		Platform        respjson.Field
		StatusCode      respjson.Field
		Timestamp       respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AudioAnalysisGetResponseMeta) RawJSON

Returns the unmodified JSON received from the API

func (*AudioAnalysisGetResponseMeta) UnmarshalJSON

func (r *AudioAnalysisGetResponseMeta) UnmarshalJSON(data []byte) error

type AudioAnalysisGetResponseSection

type AudioAnalysisGetResponseSection struct {
	// The confidence, from 0.0 to 1.0, of the reliability of the section's
	// "designation".
	Confidence float64 `json:"confidence"`
	// The duration (in seconds) of the section.
	Duration float64 `json:"duration"`
	// The estimated overall key of the section. The values in this field ranging from
	// 0 to 11 mapping to pitches using standard Pitch Class notation (E.g. 0 = C, 1 =
	// C♯/D♭, 2 = D, and so on). If no key was detected, the value is -1.
	Key int64 `json:"key"`
	// The confidence, from 0.0 to 1.0, of the reliability of the key. Songs with many
	// key changes may correspond to low values in this field.
	KeyConfidence float64 `json:"key_confidence"`
	// The overall loudness of the section in decibels (dB). Loudness values are useful
	// for comparing relative loudness of sections within tracks.
	Loudness float64 `json:"loudness"`
	// Indicates the modality (major or minor) of a section, the type of scale from
	// which its melodic content is derived. This field will contain a 0 for "minor", a
	// 1 for "major", or a -1 for no result. Note that the major key (e.g. C major)
	// could more likely be confused with the minor key at 3 semitones lower (e.g. A
	// minor) as both keys carry the same pitches.
	//
	// Any of -1, 0, 1.
	Mode float64 `json:"mode"`
	// The confidence, from 0.0 to 1.0, of the reliability of the `mode`.
	ModeConfidence float64 `json:"mode_confidence"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// The starting point (in seconds) of the section.
	Start float64 `json:"start"`
	// The overall estimated tempo of the section in beats per minute (BPM). In musical
	// terminology, tempo is the speed or pace of a given piece and derives directly
	// from the average beat duration.
	Tempo float64 `json:"tempo"`
	// The confidence, from 0.0 to 1.0, of the reliability of the tempo. Some tracks
	// contain tempo changes or sounds which don't contain tempo (like pure speech)
	// which would correspond to a low value in this field.
	TempoConfidence float64 `json:"tempo_confidence"`
	// An estimated time signature. The time signature (meter) is a notational
	// convention to specify how many beats are in each bar (or measure). The time
	// signature ranges from 3 to 7 indicating time signatures of "3/4", to "7/4".
	TimeSignature int64 `json:"time_signature"`
	// The confidence, from 0.0 to 1.0, of the reliability of the `time_signature`.
	// Sections with time signature changes may correspond to low values in this field.
	TimeSignatureConfidence float64 `json:"time_signature_confidence"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Confidence              respjson.Field
		Duration                respjson.Field
		Key                     respjson.Field
		KeyConfidence           respjson.Field
		Loudness                respjson.Field
		Mode                    respjson.Field
		ModeConfidence          respjson.Field
		Published               respjson.Field
		Start                   respjson.Field
		Tempo                   respjson.Field
		TempoConfidence         respjson.Field
		TimeSignature           respjson.Field
		TimeSignatureConfidence respjson.Field
		ExtraFields             map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AudioAnalysisGetResponseSection) RawJSON

Returns the unmodified JSON received from the API

func (*AudioAnalysisGetResponseSection) UnmarshalJSON

func (r *AudioAnalysisGetResponseSection) UnmarshalJSON(data []byte) error

type AudioAnalysisGetResponseSegment

type AudioAnalysisGetResponseSegment struct {
	// The confidence, from 0.0 to 1.0, of the reliability of the segmentation.
	// Segments of the song which are difficult to logically segment (e.g: noise) may
	// correspond to low values in this field.
	Confidence float64 `json:"confidence"`
	// The duration (in seconds) of the segment.
	Duration float64 `json:"duration"`
	// The offset loudness of the segment in decibels (dB). This value should be
	// equivalent to the loudness_start of the following segment.
	LoudnessEnd float64 `json:"loudness_end"`
	// The peak loudness of the segment in decibels (dB). Combined with
	// `loudness_start` and `loudness_max_time`, these components can be used to
	// describe the "attack" of the segment.
	LoudnessMax float64 `json:"loudness_max"`
	// The segment-relative offset of the segment peak loudness in seconds. Combined
	// with `loudness_start` and `loudness_max`, these components can be used to
	// desctibe the "attack" of the segment.
	LoudnessMaxTime float64 `json:"loudness_max_time"`
	// The onset loudness of the segment in decibels (dB). Combined with `loudness_max`
	// and `loudness_max_time`, these components can be used to describe the "attack"
	// of the segment.
	LoudnessStart float64 `json:"loudness_start"`
	// Pitch content is given by a “chroma” vector, corresponding to the 12 pitch
	// classes C, C#, D to B, with values ranging from 0 to 1 that describe the
	// relative dominance of every pitch in the chromatic scale. For example a C Major
	// chord would likely be represented by large values of C, E and G (i.e. classes 0,
	// 4, and 7).
	//
	// Vectors are normalized to 1 by their strongest dimension, therefore noisy sounds
	// are likely represented by values that are all close to 1, while pure tones are
	// described by one value at 1 (the pitch) and others near 0. As can be seen below,
	// the 12 vector indices are a combination of low-power spectrum values at their
	// respective pitch frequencies. ![pitch vector](/assets/audio/Pitch_vector.png)
	Pitches []float64 `json:"pitches"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// The starting point (in seconds) of the segment.
	Start float64 `json:"start"`
	// Timbre is the quality of a musical note or sound that distinguishes different
	// types of musical instruments, or voices. It is a complex notion also referred to
	// as sound color, texture, or tone quality, and is derived from the shape of a
	// segment’s spectro-temporal surface, independently of pitch and loudness. The
	// timbre feature is a vector that includes 12 unbounded values roughly centered
	// around 0. Those values are high level abstractions of the spectral surface,
	// ordered by degree of importance.
	//
	// For completeness however, the first dimension represents the average loudness of
	// the segment; second emphasizes brightness; third is more closely correlated to
	// the flatness of a sound; fourth to sounds with a stronger attack; etc. See an
	// image below representing the 12 basis functions (i.e. template segments).
	// ![timbre basis functions](/assets/audio/Timbre_basis_functions.png)
	//
	// The actual timbre of the segment is best described as a linear combination of
	// these 12 basis functions weighted by the coefficient values: timbre = c1 x b1 +
	// c2 x b2 + ... + c12 x b12, where c1 to c12 represent the 12 coefficients and b1
	// to b12 the 12 basis functions as displayed below. Timbre vectors are best used
	// in comparison with each other.
	Timbre []float64 `json:"timbre"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Confidence      respjson.Field
		Duration        respjson.Field
		LoudnessEnd     respjson.Field
		LoudnessMax     respjson.Field
		LoudnessMaxTime respjson.Field
		LoudnessStart   respjson.Field
		Pitches         respjson.Field
		Published       respjson.Field
		Start           respjson.Field
		Timbre          respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AudioAnalysisGetResponseSegment) RawJSON

Returns the unmodified JSON received from the API

func (*AudioAnalysisGetResponseSegment) UnmarshalJSON

func (r *AudioAnalysisGetResponseSegment) UnmarshalJSON(data []byte) error

type AudioAnalysisGetResponseTrack

type AudioAnalysisGetResponseTrack struct {
	// The number of channels used for analysis. If 1, all channels are summed together
	// to mono before analysis.
	AnalysisChannels int64 `json:"analysis_channels"`
	// The sample rate used to decode and analyze this track. May differ from the
	// actual sample rate of this track available on Spotify.
	AnalysisSampleRate int64 `json:"analysis_sample_rate"`
	// A version number for the Echo Nest Musical Fingerprint format used in the
	// codestring field.
	CodeVersion float64 `json:"code_version"`
	// An
	// [Echo Nest Musical Fingerprint (ENMFP)](https://academiccommons.columbia.edu/doi/10.7916/D8Q248M4)
	// codestring for this track.
	Codestring string `json:"codestring"`
	// Length of the track in seconds.
	Duration float64 `json:"duration"`
	// A version number for the EchoPrint format used in the echoprintstring field.
	EchoprintVersion float64 `json:"echoprint_version"`
	// An [EchoPrint](https://github.com/spotify/echoprint-codegen) codestring for this
	// track.
	Echoprintstring string `json:"echoprintstring"`
	// The time, in seconds, at which the track's fade-in period ends. If the track has
	// no fade-in, this will be 0.0.
	EndOfFadeIn float64 `json:"end_of_fade_in"`
	// The key the track is in. Integers map to pitches using standard
	// [Pitch Class notation](https://en.wikipedia.org/wiki/Pitch_class). E.g. 0 = C, 1
	// = C♯/D♭, 2 = D, and so on. If no key was detected, the value is -1.
	Key int64 `json:"key"`
	// The confidence, from 0.0 to 1.0, of the reliability of the `key`.
	KeyConfidence float64 `json:"key_confidence"`
	// The overall loudness of a track in decibels (dB). Loudness values are averaged
	// across the entire track and are useful for comparing relative loudness of
	// tracks. Loudness is the quality of a sound that is the primary psychological
	// correlate of physical strength (amplitude). Values typically range between -60
	// and 0 db.
	Loudness float64 `json:"loudness"`
	// Mode indicates the modality (major or minor) of a track, the type of scale from
	// which its melodic content is derived. Major is represented by 1 and minor is 0.
	Mode int64 `json:"mode"`
	// The confidence, from 0.0 to 1.0, of the reliability of the `mode`.
	ModeConfidence float64 `json:"mode_confidence"`
	// The exact number of audio samples analyzed from this track. See also
	// `analysis_sample_rate`.
	NumSamples int64 `json:"num_samples"`
	// An offset to the start of the region of the track that was analyzed. (As the
	// entire track is analyzed, this should always be 0.)
	OffsetSeconds int64 `json:"offset_seconds"`
	// A version number for the Rhythmstring used in the rhythmstring field.
	RhythmVersion float64 `json:"rhythm_version"`
	// A Rhythmstring for this track. The format of this string is similar to the
	// Synchstring.
	Rhythmstring string `json:"rhythmstring"`
	// This field will always contain the empty string.
	SampleMd5 string `json:"sample_md5"`
	// The time, in seconds, at which the track's fade-out period starts. If the track
	// has no fade-out, this should match the track's length.
	StartOfFadeOut float64 `json:"start_of_fade_out"`
	// A version number for the Synchstring used in the synchstring field.
	SynchVersion float64 `json:"synch_version"`
	// A [Synchstring](https://github.com/echonest/synchdata) for this track.
	Synchstring string `json:"synchstring"`
	// The overall estimated tempo of a track in beats per minute (BPM). In musical
	// terminology, tempo is the speed or pace of a given piece and derives directly
	// from the average beat duration.
	Tempo float64 `json:"tempo"`
	// The confidence, from 0.0 to 1.0, of the reliability of the `tempo`.
	TempoConfidence float64 `json:"tempo_confidence"`
	// An estimated time signature. The time signature (meter) is a notational
	// convention to specify how many beats are in each bar (or measure). The time
	// signature ranges from 3 to 7 indicating time signatures of "3/4", to "7/4".
	TimeSignature int64 `json:"time_signature"`
	// The confidence, from 0.0 to 1.0, of the reliability of the `time_signature`.
	TimeSignatureConfidence float64 `json:"time_signature_confidence"`
	// The length of the region of the track was analyzed, if a subset of the track was
	// analyzed. (As the entire track is analyzed, this should always be 0.)
	WindowSeconds int64 `json:"window_seconds"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AnalysisChannels        respjson.Field
		AnalysisSampleRate      respjson.Field
		CodeVersion             respjson.Field
		Codestring              respjson.Field
		Duration                respjson.Field
		EchoprintVersion        respjson.Field
		Echoprintstring         respjson.Field
		EndOfFadeIn             respjson.Field
		Key                     respjson.Field
		KeyConfidence           respjson.Field
		Loudness                respjson.Field
		Mode                    respjson.Field
		ModeConfidence          respjson.Field
		NumSamples              respjson.Field
		OffsetSeconds           respjson.Field
		RhythmVersion           respjson.Field
		Rhythmstring            respjson.Field
		SampleMd5               respjson.Field
		StartOfFadeOut          respjson.Field
		SynchVersion            respjson.Field
		Synchstring             respjson.Field
		Tempo                   respjson.Field
		TempoConfidence         respjson.Field
		TimeSignature           respjson.Field
		TimeSignatureConfidence respjson.Field
		WindowSeconds           respjson.Field
		ExtraFields             map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AudioAnalysisGetResponseTrack) RawJSON

Returns the unmodified JSON received from the API

func (*AudioAnalysisGetResponseTrack) UnmarshalJSON

func (r *AudioAnalysisGetResponseTrack) UnmarshalJSON(data []byte) error

type AudioAnalysisService

type AudioAnalysisService struct {
	Options []option.RequestOption
}

AudioAnalysisService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAudioAnalysisService method instead.

func NewAudioAnalysisService

func NewAudioAnalysisService(opts ...option.RequestOption) (r AudioAnalysisService)

NewAudioAnalysisService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*AudioAnalysisService) Get deprecated

Get a low-level audio analysis for a track in the Spotify catalog. The audio analysis describes the track’s structure and musical content, including rhythm, pitch, and timbre.

Deprecated: deprecated

type AudioFeatureBulkGetParams

type AudioFeatureBulkGetParams struct {
	// A comma-separated list of the
	// [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids) for the tracks.
	// Maximum: 100 IDs.
	IDs string `query:"ids,required" json:"-"`
	// contains filtered or unexported fields
}

func (AudioFeatureBulkGetParams) URLQuery

func (r AudioFeatureBulkGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes AudioFeatureBulkGetParams's query parameters as `url.Values`.

type AudioFeatureBulkGetResponse

type AudioFeatureBulkGetResponse struct {
	AudioFeatures []AudioFeatureBulkGetResponseAudioFeature `json:"audio_features,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AudioFeatures respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AudioFeatureBulkGetResponse) RawJSON

func (r AudioFeatureBulkGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*AudioFeatureBulkGetResponse) UnmarshalJSON

func (r *AudioFeatureBulkGetResponse) UnmarshalJSON(data []byte) error

type AudioFeatureBulkGetResponseAudioFeature

type AudioFeatureBulkGetResponseAudioFeature struct {
	// The Spotify ID for the track.
	ID string `json:"id"`
	// A confidence measure from 0.0 to 1.0 of whether the track is acoustic. 1.0
	// represents high confidence the track is acoustic.
	Acousticness float64 `json:"acousticness"`
	// A URL to access the full audio analysis of this track. An access token is
	// required to access this data.
	AnalysisURL string `json:"analysis_url"`
	// Danceability describes how suitable a track is for dancing based on a
	// combination of musical elements including tempo, rhythm stability, beat
	// strength, and overall regularity. A value of 0.0 is least danceable and 1.0 is
	// most danceable.
	Danceability float64 `json:"danceability"`
	// The duration of the track in milliseconds.
	DurationMs int64 `json:"duration_ms"`
	// Energy is a measure from 0.0 to 1.0 and represents a perceptual measure of
	// intensity and activity. Typically, energetic tracks feel fast, loud, and noisy.
	// For example, death metal has high energy, while a Bach prelude scores low on the
	// scale. Perceptual features contributing to this attribute include dynamic range,
	// perceived loudness, timbre, onset rate, and general entropy.
	Energy float64 `json:"energy"`
	// Predicts whether a track contains no vocals. "Ooh" and "aah" sounds are treated
	// as instrumental in this context. Rap or spoken word tracks are clearly "vocal".
	// The closer the instrumentalness value is to 1.0, the greater likelihood the
	// track contains no vocal content. Values above 0.5 are intended to represent
	// instrumental tracks, but confidence is higher as the value approaches 1.0.
	Instrumentalness float64 `json:"instrumentalness"`
	// The key the track is in. Integers map to pitches using standard
	// [Pitch Class notation](https://en.wikipedia.org/wiki/Pitch_class). E.g. 0 = C, 1
	// = C♯/D♭, 2 = D, and so on. If no key was detected, the value is -1.
	Key int64 `json:"key"`
	// Detects the presence of an audience in the recording. Higher liveness values
	// represent an increased probability that the track was performed live. A value
	// above 0.8 provides strong likelihood that the track is live.
	Liveness float64 `json:"liveness"`
	// The overall loudness of a track in decibels (dB). Loudness values are averaged
	// across the entire track and are useful for comparing relative loudness of
	// tracks. Loudness is the quality of a sound that is the primary psychological
	// correlate of physical strength (amplitude). Values typically range between -60
	// and 0 db.
	Loudness float64 `json:"loudness"`
	// Mode indicates the modality (major or minor) of a track, the type of scale from
	// which its melodic content is derived. Major is represented by 1 and minor is 0.
	Mode int64 `json:"mode"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// Speechiness detects the presence of spoken words in a track. The more
	// exclusively speech-like the recording (e.g. talk show, audio book, poetry), the
	// closer to 1.0 the attribute value. Values above 0.66 describe tracks that are
	// probably made entirely of spoken words. Values between 0.33 and 0.66 describe
	// tracks that may contain both music and speech, either in sections or layered,
	// including such cases as rap music. Values below 0.33 most likely represent music
	// and other non-speech-like tracks.
	Speechiness float64 `json:"speechiness"`
	// The overall estimated tempo of a track in beats per minute (BPM). In musical
	// terminology, tempo is the speed or pace of a given piece and derives directly
	// from the average beat duration.
	Tempo float64 `json:"tempo"`
	// An estimated time signature. The time signature (meter) is a notational
	// convention to specify how many beats are in each bar (or measure). The time
	// signature ranges from 3 to 7 indicating time signatures of "3/4", to "7/4".
	TimeSignature int64 `json:"time_signature"`
	// A link to the Web API endpoint providing full details of the track.
	TrackHref string `json:"track_href"`
	// The object type.
	//
	// Any of "audio_features".
	Type string `json:"type"`
	// The Spotify URI for the track.
	Uri string `json:"uri"`
	// A measure from 0.0 to 1.0 describing the musical positiveness conveyed by a
	// track. Tracks with high valence sound more positive (e.g. happy, cheerful,
	// euphoric), while tracks with low valence sound more negative (e.g. sad,
	// depressed, angry).
	Valence float64 `json:"valence"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID               respjson.Field
		Acousticness     respjson.Field
		AnalysisURL      respjson.Field
		Danceability     respjson.Field
		DurationMs       respjson.Field
		Energy           respjson.Field
		Instrumentalness respjson.Field
		Key              respjson.Field
		Liveness         respjson.Field
		Loudness         respjson.Field
		Mode             respjson.Field
		Published        respjson.Field
		Speechiness      respjson.Field
		Tempo            respjson.Field
		TimeSignature    respjson.Field
		TrackHref        respjson.Field
		Type             respjson.Field
		Uri              respjson.Field
		Valence          respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AudioFeatureBulkGetResponseAudioFeature) RawJSON

Returns the unmodified JSON received from the API

func (*AudioFeatureBulkGetResponseAudioFeature) UnmarshalJSON

func (r *AudioFeatureBulkGetResponseAudioFeature) UnmarshalJSON(data []byte) error

type AudioFeatureGetResponse

type AudioFeatureGetResponse struct {
	// The Spotify ID for the track.
	ID string `json:"id"`
	// A confidence measure from 0.0 to 1.0 of whether the track is acoustic. 1.0
	// represents high confidence the track is acoustic.
	Acousticness float64 `json:"acousticness"`
	// A URL to access the full audio analysis of this track. An access token is
	// required to access this data.
	AnalysisURL string `json:"analysis_url"`
	// Danceability describes how suitable a track is for dancing based on a
	// combination of musical elements including tempo, rhythm stability, beat
	// strength, and overall regularity. A value of 0.0 is least danceable and 1.0 is
	// most danceable.
	Danceability float64 `json:"danceability"`
	// The duration of the track in milliseconds.
	DurationMs int64 `json:"duration_ms"`
	// Energy is a measure from 0.0 to 1.0 and represents a perceptual measure of
	// intensity and activity. Typically, energetic tracks feel fast, loud, and noisy.
	// For example, death metal has high energy, while a Bach prelude scores low on the
	// scale. Perceptual features contributing to this attribute include dynamic range,
	// perceived loudness, timbre, onset rate, and general entropy.
	Energy float64 `json:"energy"`
	// Predicts whether a track contains no vocals. "Ooh" and "aah" sounds are treated
	// as instrumental in this context. Rap or spoken word tracks are clearly "vocal".
	// The closer the instrumentalness value is to 1.0, the greater likelihood the
	// track contains no vocal content. Values above 0.5 are intended to represent
	// instrumental tracks, but confidence is higher as the value approaches 1.0.
	Instrumentalness float64 `json:"instrumentalness"`
	// The key the track is in. Integers map to pitches using standard
	// [Pitch Class notation](https://en.wikipedia.org/wiki/Pitch_class). E.g. 0 = C, 1
	// = C♯/D♭, 2 = D, and so on. If no key was detected, the value is -1.
	Key int64 `json:"key"`
	// Detects the presence of an audience in the recording. Higher liveness values
	// represent an increased probability that the track was performed live. A value
	// above 0.8 provides strong likelihood that the track is live.
	Liveness float64 `json:"liveness"`
	// The overall loudness of a track in decibels (dB). Loudness values are averaged
	// across the entire track and are useful for comparing relative loudness of
	// tracks. Loudness is the quality of a sound that is the primary psychological
	// correlate of physical strength (amplitude). Values typically range between -60
	// and 0 db.
	Loudness float64 `json:"loudness"`
	// Mode indicates the modality (major or minor) of a track, the type of scale from
	// which its melodic content is derived. Major is represented by 1 and minor is 0.
	Mode int64 `json:"mode"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// Speechiness detects the presence of spoken words in a track. The more
	// exclusively speech-like the recording (e.g. talk show, audio book, poetry), the
	// closer to 1.0 the attribute value. Values above 0.66 describe tracks that are
	// probably made entirely of spoken words. Values between 0.33 and 0.66 describe
	// tracks that may contain both music and speech, either in sections or layered,
	// including such cases as rap music. Values below 0.33 most likely represent music
	// and other non-speech-like tracks.
	Speechiness float64 `json:"speechiness"`
	// The overall estimated tempo of a track in beats per minute (BPM). In musical
	// terminology, tempo is the speed or pace of a given piece and derives directly
	// from the average beat duration.
	Tempo float64 `json:"tempo"`
	// An estimated time signature. The time signature (meter) is a notational
	// convention to specify how many beats are in each bar (or measure). The time
	// signature ranges from 3 to 7 indicating time signatures of "3/4", to "7/4".
	TimeSignature int64 `json:"time_signature"`
	// A link to the Web API endpoint providing full details of the track.
	TrackHref string `json:"track_href"`
	// The object type.
	//
	// Any of "audio_features".
	Type AudioFeatureGetResponseType `json:"type"`
	// The Spotify URI for the track.
	Uri string `json:"uri"`
	// A measure from 0.0 to 1.0 describing the musical positiveness conveyed by a
	// track. Tracks with high valence sound more positive (e.g. happy, cheerful,
	// euphoric), while tracks with low valence sound more negative (e.g. sad,
	// depressed, angry).
	Valence float64 `json:"valence"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID               respjson.Field
		Acousticness     respjson.Field
		AnalysisURL      respjson.Field
		Danceability     respjson.Field
		DurationMs       respjson.Field
		Energy           respjson.Field
		Instrumentalness respjson.Field
		Key              respjson.Field
		Liveness         respjson.Field
		Loudness         respjson.Field
		Mode             respjson.Field
		Published        respjson.Field
		Speechiness      respjson.Field
		Tempo            respjson.Field
		TimeSignature    respjson.Field
		TrackHref        respjson.Field
		Type             respjson.Field
		Uri              respjson.Field
		Valence          respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AudioFeatureGetResponse) RawJSON

func (r AudioFeatureGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*AudioFeatureGetResponse) UnmarshalJSON

func (r *AudioFeatureGetResponse) UnmarshalJSON(data []byte) error

type AudioFeatureGetResponseType

type AudioFeatureGetResponseType string

The object type.

const (
	AudioFeatureGetResponseTypeAudioFeatures AudioFeatureGetResponseType = "audio_features"
)

type AudioFeatureService

type AudioFeatureService struct {
	Options []option.RequestOption
}

AudioFeatureService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAudioFeatureService method instead.

func NewAudioFeatureService

func NewAudioFeatureService(opts ...option.RequestOption) (r AudioFeatureService)

NewAudioFeatureService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*AudioFeatureService) BulkGet deprecated

Get audio features for multiple tracks based on their Spotify IDs.

Deprecated: deprecated

func (*AudioFeatureService) Get deprecated

Get audio feature information for a single track identified by its unique Spotify ID.

Deprecated: deprecated

type AudiobookBase

type AudiobookBase = shared.AudiobookBase

This is an alias to an internal type.

type AudiobookBulkGetParams

type AudiobookBulkGetParams struct {
	// A comma-separated list of the
	// [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
	// `ids=18yVqkdbdRvS24c0Ilj2ci,1HGw3J3NxZO1TP1BTtVhpZ`. Maximum: 50 IDs.
	IDs string `query:"ids,required" json:"-"`
	// An
	// [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// If a country code is specified, only content that is available in that market
	// will be returned.<br/> If a valid user access token is specified in the request
	// header, the country associated with the user account will take priority over
	// this parameter.<br/> _**Note**: If neither market or user country are provided,
	// the content is considered unavailable for the client._<br/> Users can view the
	// country that is associated with their account in the
	// [account settings](https://www.spotify.com/account/overview/).
	Market param.Opt[string] `query:"market,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (AudiobookBulkGetParams) URLQuery

func (r AudiobookBulkGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes AudiobookBulkGetParams's query parameters as `url.Values`.

type AudiobookBulkGetResponse

type AudiobookBulkGetResponse struct {
	Audiobooks []AudiobookBulkGetResponseAudiobook `json:"audiobooks,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Audiobooks  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AudiobookBulkGetResponse) RawJSON

func (r AudiobookBulkGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*AudiobookBulkGetResponse) UnmarshalJSON

func (r *AudiobookBulkGetResponse) UnmarshalJSON(data []byte) error

type AudiobookBulkGetResponseAudiobook

type AudiobookBulkGetResponseAudiobook struct {
	// The chapters of the audiobook.
	Chapters AudiobookBulkGetResponseAudiobookChapters `json:"chapters,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Chapters    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
	shared.AudiobookBase
}

func (AudiobookBulkGetResponseAudiobook) RawJSON

Returns the unmodified JSON received from the API

func (*AudiobookBulkGetResponseAudiobook) UnmarshalJSON

func (r *AudiobookBulkGetResponseAudiobook) UnmarshalJSON(data []byte) error

type AudiobookBulkGetResponseAudiobookChapters

type AudiobookBulkGetResponseAudiobookChapters struct {
	// A link to the Web API endpoint returning the full result of the request
	Href string `json:"href,required"`
	// The maximum number of items in the response (as set in the query or by default).
	Limit int64 `json:"limit,required"`
	// URL to the next page of items. ( `null` if none)
	Next string `json:"next,required"`
	// The offset of the items returned (as set in the query or by default)
	Offset int64 `json:"offset,required"`
	// URL to the previous page of items. ( `null` if none)
	Previous string `json:"previous,required"`
	// The total number of items available to return.
	Total int64                     `json:"total,required"`
	Items []SimplifiedChapterObject `json:"items"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Href        respjson.Field
		Limit       respjson.Field
		Next        respjson.Field
		Offset      respjson.Field
		Previous    respjson.Field
		Total       respjson.Field
		Items       respjson.Field
		Published   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The chapters of the audiobook.

func (AudiobookBulkGetResponseAudiobookChapters) RawJSON

Returns the unmodified JSON received from the API

func (*AudiobookBulkGetResponseAudiobookChapters) UnmarshalJSON

func (r *AudiobookBulkGetResponseAudiobookChapters) UnmarshalJSON(data []byte) error

type AudiobookGetParams

type AudiobookGetParams struct {
	// An
	// [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// If a country code is specified, only content that is available in that market
	// will be returned.<br/> If a valid user access token is specified in the request
	// header, the country associated with the user account will take priority over
	// this parameter.<br/> _**Note**: If neither market or user country are provided,
	// the content is considered unavailable for the client._<br/> Users can view the
	// country that is associated with their account in the
	// [account settings](https://www.spotify.com/account/overview/).
	Market param.Opt[string] `query:"market,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (AudiobookGetParams) URLQuery

func (r AudiobookGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes AudiobookGetParams's query parameters as `url.Values`.

type AudiobookGetResponse

type AudiobookGetResponse struct {
	// The chapters of the audiobook.
	Chapters AudiobookGetResponseChapters `json:"chapters,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Chapters    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
	shared.AudiobookBase
}

func (AudiobookGetResponse) RawJSON

func (r AudiobookGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*AudiobookGetResponse) UnmarshalJSON

func (r *AudiobookGetResponse) UnmarshalJSON(data []byte) error

type AudiobookGetResponseChapters

type AudiobookGetResponseChapters struct {
	// A link to the Web API endpoint returning the full result of the request
	Href string `json:"href,required"`
	// The maximum number of items in the response (as set in the query or by default).
	Limit int64 `json:"limit,required"`
	// URL to the next page of items. ( `null` if none)
	Next string `json:"next,required"`
	// The offset of the items returned (as set in the query or by default)
	Offset int64 `json:"offset,required"`
	// URL to the previous page of items. ( `null` if none)
	Previous string `json:"previous,required"`
	// The total number of items available to return.
	Total int64                     `json:"total,required"`
	Items []SimplifiedChapterObject `json:"items"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Href        respjson.Field
		Limit       respjson.Field
		Next        respjson.Field
		Offset      respjson.Field
		Previous    respjson.Field
		Total       respjson.Field
		Items       respjson.Field
		Published   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The chapters of the audiobook.

func (AudiobookGetResponseChapters) RawJSON

Returns the unmodified JSON received from the API

func (*AudiobookGetResponseChapters) UnmarshalJSON

func (r *AudiobookGetResponseChapters) UnmarshalJSON(data []byte) error

type AudiobookListChaptersParams

type AudiobookListChaptersParams struct {
	// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// An
	// [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// If a country code is specified, only content that is available in that market
	// will be returned.<br/> If a valid user access token is specified in the request
	// header, the country associated with the user account will take priority over
	// this parameter.<br/> _**Note**: If neither market or user country are provided,
	// the content is considered unavailable for the client._<br/> Users can view the
	// country that is associated with their account in the
	// [account settings](https://www.spotify.com/account/overview/).
	Market param.Opt[string] `query:"market,omitzero" json:"-"`
	// The index of the first item to return. Default: 0 (the first item). Use with
	// limit to get the next set of items.
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (AudiobookListChaptersParams) URLQuery

func (r AudiobookListChaptersParams) URLQuery() (v url.Values, err error)

URLQuery serializes AudiobookListChaptersParams's query parameters as `url.Values`.

type AudiobookService

type AudiobookService struct {
	Options []option.RequestOption
}

AudiobookService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAudiobookService method instead.

func NewAudiobookService

func NewAudiobookService(opts ...option.RequestOption) (r AudiobookService)

NewAudiobookService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*AudiobookService) BulkGet

Get Spotify catalog information for several audiobooks identified by their Spotify IDs. Audiobooks are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.

func (*AudiobookService) Get

Get Spotify catalog information for a single audiobook. Audiobooks are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.

func (*AudiobookService) ListChapters

Get Spotify catalog information about an audiobook's chapters. Audiobooks are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.

func (*AudiobookService) ListChaptersAutoPaging

Get Spotify catalog information about an audiobook's chapters. Audiobooks are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.

type AuthorObject

type AuthorObject = shared.AuthorObject

This is an alias to an internal type.

type BrowseCategoryGetParams

type BrowseCategoryGetParams struct {
	// The desired language, consisting of an
	// [ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code and an
	// [ISO 3166-1 alpha-2 country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2),
	// joined by an underscore. For example: `es_MX`, meaning &quot;Spanish
	// (Mexico)&quot;. Provide this parameter if you want the category strings returned
	// in a particular language.<br/> _**Note**: if `locale` is not supplied, or if the
	// specified language is not available, the category strings returned will be in
	// the Spotify default language (American English)._
	Locale param.Opt[string] `query:"locale,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (BrowseCategoryGetParams) URLQuery

func (r BrowseCategoryGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes BrowseCategoryGetParams's query parameters as `url.Values`.

type BrowseCategoryGetPlaylistsParams

type BrowseCategoryGetPlaylistsParams struct {
	// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// The index of the first item to return. Default: 0 (the first item). Use with
	// limit to get the next set of items.
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (BrowseCategoryGetPlaylistsParams) URLQuery

func (r BrowseCategoryGetPlaylistsParams) URLQuery() (v url.Values, err error)

URLQuery serializes BrowseCategoryGetPlaylistsParams's query parameters as `url.Values`.

type BrowseCategoryGetPlaylistsResponse

type BrowseCategoryGetPlaylistsResponse struct {
	// The localized message of a playlist.
	Message   string                      `json:"message"`
	Playlists shared.PagingPlaylistObject `json:"playlists"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Message     respjson.Field
		Playlists   respjson.Field
		Published   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BrowseCategoryGetPlaylistsResponse) RawJSON

Returns the unmodified JSON received from the API

func (*BrowseCategoryGetPlaylistsResponse) UnmarshalJSON

func (r *BrowseCategoryGetPlaylistsResponse) UnmarshalJSON(data []byte) error

type BrowseCategoryGetResponse

type BrowseCategoryGetResponse struct {
	// The [Spotify category ID](/documentation/web-api/concepts/spotify-uris-ids) of
	// the category.
	ID string `json:"id,required"`
	// A link to the Web API endpoint returning full details of the category.
	Href string `json:"href,required"`
	// The category icon, in various sizes.
	Icons []shared.ImageObject `json:"icons,required"`
	// The name of the category.
	Name string `json:"name,required"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Href        respjson.Field
		Icons       respjson.Field
		Name        respjson.Field
		Published   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BrowseCategoryGetResponse) RawJSON

func (r BrowseCategoryGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*BrowseCategoryGetResponse) UnmarshalJSON

func (r *BrowseCategoryGetResponse) UnmarshalJSON(data []byte) error

type BrowseCategoryListParams

type BrowseCategoryListParams struct {
	// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// The desired language, consisting of an
	// [ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code and an
	// [ISO 3166-1 alpha-2 country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2),
	// joined by an underscore. For example: `es_MX`, meaning &quot;Spanish
	// (Mexico)&quot;. Provide this parameter if you want the category strings returned
	// in a particular language.<br/> _**Note**: if `locale` is not supplied, or if the
	// specified language is not available, the category strings returned will be in
	// the Spotify default language (American English)._
	Locale param.Opt[string] `query:"locale,omitzero" json:"-"`
	// The index of the first item to return. Default: 0 (the first item). Use with
	// limit to get the next set of items.
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (BrowseCategoryListParams) URLQuery

func (r BrowseCategoryListParams) URLQuery() (v url.Values, err error)

URLQuery serializes BrowseCategoryListParams's query parameters as `url.Values`.

type BrowseCategoryListResponse

type BrowseCategoryListResponse struct {
	// The [Spotify category ID](/documentation/web-api/concepts/spotify-uris-ids) of
	// the category.
	ID string `json:"id,required"`
	// A link to the Web API endpoint returning full details of the category.
	Href string `json:"href,required"`
	// The category icon, in various sizes.
	Icons []shared.ImageObject `json:"icons,required"`
	// The name of the category.
	Name string `json:"name,required"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Href        respjson.Field
		Icons       respjson.Field
		Name        respjson.Field
		Published   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BrowseCategoryListResponse) RawJSON

func (r BrowseCategoryListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*BrowseCategoryListResponse) UnmarshalJSON

func (r *BrowseCategoryListResponse) UnmarshalJSON(data []byte) error

type BrowseCategoryService

type BrowseCategoryService struct {
	Options []option.RequestOption
}

BrowseCategoryService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBrowseCategoryService method instead.

func NewBrowseCategoryService

func NewBrowseCategoryService(opts ...option.RequestOption) (r BrowseCategoryService)

NewBrowseCategoryService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*BrowseCategoryService) Get

Get a single category used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).

func (*BrowseCategoryService) GetPlaylists deprecated

Get a list of Spotify playlists tagged with a particular category.

Deprecated: deprecated

func (*BrowseCategoryService) List

Get a list of categories used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).

func (*BrowseCategoryService) ListAutoPaging added in v0.13.0

Get a list of categories used to tag items in Spotify (on, for example, the Spotify player’s “Browse” tab).

type BrowseGetFeaturedPlaylistsParams

type BrowseGetFeaturedPlaylistsParams struct {
	// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// The desired language, consisting of an
	// [ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code and an
	// [ISO 3166-1 alpha-2 country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2),
	// joined by an underscore. For example: `es_MX`, meaning &quot;Spanish
	// (Mexico)&quot;. Provide this parameter if you want the category strings returned
	// in a particular language.<br/> _**Note**: if `locale` is not supplied, or if the
	// specified language is not available, the category strings returned will be in
	// the Spotify default language (American English)._
	Locale param.Opt[string] `query:"locale,omitzero" json:"-"`
	// The index of the first item to return. Default: 0 (the first item). Use with
	// limit to get the next set of items.
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (BrowseGetFeaturedPlaylistsParams) URLQuery

func (r BrowseGetFeaturedPlaylistsParams) URLQuery() (v url.Values, err error)

URLQuery serializes BrowseGetFeaturedPlaylistsParams's query parameters as `url.Values`.

type BrowseGetFeaturedPlaylistsResponse

type BrowseGetFeaturedPlaylistsResponse struct {
	// The localized message of a playlist.
	Message   string                      `json:"message"`
	Playlists shared.PagingPlaylistObject `json:"playlists"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Message     respjson.Field
		Playlists   respjson.Field
		Published   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BrowseGetFeaturedPlaylistsResponse) RawJSON

Returns the unmodified JSON received from the API

func (*BrowseGetFeaturedPlaylistsResponse) UnmarshalJSON

func (r *BrowseGetFeaturedPlaylistsResponse) UnmarshalJSON(data []byte) error

type BrowseGetNewReleasesParams

type BrowseGetNewReleasesParams struct {
	// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// The index of the first item to return. Default: 0 (the first item). Use with
	// limit to get the next set of items.
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (BrowseGetNewReleasesParams) URLQuery

func (r BrowseGetNewReleasesParams) URLQuery() (v url.Values, err error)

URLQuery serializes BrowseGetNewReleasesParams's query parameters as `url.Values`.

type BrowseGetNewReleasesResponse

type BrowseGetNewReleasesResponse struct {
	Albums BrowseGetNewReleasesResponseAlbums `json:"albums,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Albums      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BrowseGetNewReleasesResponse) RawJSON

Returns the unmodified JSON received from the API

func (*BrowseGetNewReleasesResponse) UnmarshalJSON

func (r *BrowseGetNewReleasesResponse) UnmarshalJSON(data []byte) error

type BrowseGetNewReleasesResponseAlbums

type BrowseGetNewReleasesResponseAlbums struct {
	// A link to the Web API endpoint returning the full result of the request
	Href string `json:"href,required"`
	// The maximum number of items in the response (as set in the query or by default).
	Limit int64 `json:"limit,required"`
	// URL to the next page of items. ( `null` if none)
	Next string `json:"next,required"`
	// The offset of the items returned (as set in the query or by default)
	Offset int64 `json:"offset,required"`
	// URL to the previous page of items. ( `null` if none)
	Previous string `json:"previous,required"`
	// The total number of items available to return.
	Total int64                                    `json:"total,required"`
	Items []BrowseGetNewReleasesResponseAlbumsItem `json:"items"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Href        respjson.Field
		Limit       respjson.Field
		Next        respjson.Field
		Offset      respjson.Field
		Previous    respjson.Field
		Total       respjson.Field
		Items       respjson.Field
		Published   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BrowseGetNewReleasesResponseAlbums) RawJSON

Returns the unmodified JSON received from the API

func (*BrowseGetNewReleasesResponseAlbums) UnmarshalJSON

func (r *BrowseGetNewReleasesResponseAlbums) UnmarshalJSON(data []byte) error

type BrowseGetNewReleasesResponseAlbumsItem

type BrowseGetNewReleasesResponseAlbumsItem struct {
	// The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the
	// album.
	ID string `json:"id,required"`
	// The type of the album.
	//
	// Any of "album", "single", "compilation".
	AlbumType string `json:"album_type,required"`
	// The artists of the album. Each artist object includes a link in `href` to more
	// detailed information about the artist.
	Artists []shared.SimplifiedArtistObject `json:"artists,required"`
	// The markets in which the album is available:
	// [ISO 3166-1 alpha-2 country codes](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// _**NOTE**: an album is considered available in a market when at least 1 of its
	// tracks is available in that market._
	AvailableMarkets []string `json:"available_markets,required"`
	// Known external URLs for this album.
	ExternalURLs shared.ExternalURLObject `json:"external_urls,required"`
	// A link to the Web API endpoint providing full details of the album.
	Href string `json:"href,required"`
	// The cover art for the album in various sizes, widest first.
	Images []shared.ImageObject `json:"images,required"`
	// The name of the album. In case of an album takedown, the value may be an empty
	// string.
	Name string `json:"name,required"`
	// The date the album was first released.
	ReleaseDate string `json:"release_date,required"`
	// The precision with which `release_date` value is known.
	//
	// Any of "year", "month", "day".
	ReleaseDatePrecision string `json:"release_date_precision,required"`
	// The number of tracks in the album.
	TotalTracks int64 `json:"total_tracks,required"`
	// The object type.
	Type constant.Album `json:"type,required"`
	// The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the
	// album.
	Uri string `json:"uri,required"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// Included in the response when a content restriction is applied.
	Restrictions shared.AlbumRestrictionObject `json:"restrictions"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                   respjson.Field
		AlbumType            respjson.Field
		Artists              respjson.Field
		AvailableMarkets     respjson.Field
		ExternalURLs         respjson.Field
		Href                 respjson.Field
		Images               respjson.Field
		Name                 respjson.Field
		ReleaseDate          respjson.Field
		ReleaseDatePrecision respjson.Field
		TotalTracks          respjson.Field
		Type                 respjson.Field
		Uri                  respjson.Field
		Published            respjson.Field
		Restrictions         respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BrowseGetNewReleasesResponseAlbumsItem) RawJSON

Returns the unmodified JSON received from the API

func (*BrowseGetNewReleasesResponseAlbumsItem) UnmarshalJSON

func (r *BrowseGetNewReleasesResponseAlbumsItem) UnmarshalJSON(data []byte) error

type BrowseService

type BrowseService struct {
	Options    []option.RequestOption
	Categories BrowseCategoryService
}

BrowseService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBrowseService method instead.

func NewBrowseService

func NewBrowseService(opts ...option.RequestOption) (r BrowseService)

NewBrowseService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*BrowseService) GetFeaturedPlaylists deprecated

Get a list of Spotify featured playlists (shown, for example, on a Spotify player's 'Browse' tab).

Deprecated: deprecated

func (*BrowseService) GetNewReleases

Get a list of new album releases featured in Spotify (shown, for example, on a Spotify player’s “Browse” tab).

type ChapterBulkGetParams

type ChapterBulkGetParams struct {
	// A comma-separated list of the
	// [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
	// `ids=0IsXVP0JmcB2adSE338GkK,3ZXb8FKZGU0EHALYX6uCzU`. Maximum: 50 IDs.
	IDs string `query:"ids,required" json:"-"`
	// An
	// [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// If a country code is specified, only content that is available in that market
	// will be returned.<br/> If a valid user access token is specified in the request
	// header, the country associated with the user account will take priority over
	// this parameter.<br/> _**Note**: If neither market or user country are provided,
	// the content is considered unavailable for the client._<br/> Users can view the
	// country that is associated with their account in the
	// [account settings](https://www.spotify.com/account/overview/).
	Market param.Opt[string] `query:"market,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ChapterBulkGetParams) URLQuery

func (r ChapterBulkGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes ChapterBulkGetParams's query parameters as `url.Values`.

type ChapterBulkGetResponse

type ChapterBulkGetResponse struct {
	Chapters []ChapterBulkGetResponseChapter `json:"chapters,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Chapters    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ChapterBulkGetResponse) RawJSON

func (r ChapterBulkGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ChapterBulkGetResponse) UnmarshalJSON

func (r *ChapterBulkGetResponse) UnmarshalJSON(data []byte) error

type ChapterBulkGetResponseChapter

type ChapterBulkGetResponseChapter struct {
	// The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the
	// chapter.
	ID string `json:"id,required"`
	// A URL to a 30 second preview (MP3 format) of the chapter. `null` if not
	// available.
	//
	// Deprecated: deprecated
	AudioPreviewURL string `json:"audio_preview_url,required"`
	// The audiobook for which the chapter belongs.
	Audiobook shared.AudiobookBase `json:"audiobook,required"`
	// The number of the chapter
	ChapterNumber int64 `json:"chapter_number,required"`
	// A description of the chapter. HTML tags are stripped away from this field, use
	// `html_description` field in case HTML tags are needed.
	Description string `json:"description,required"`
	// The chapter length in milliseconds.
	DurationMs int64 `json:"duration_ms,required"`
	// Whether or not the chapter has explicit content (true = yes it does; false = no
	// it does not OR unknown).
	Explicit bool `json:"explicit,required"`
	// External URLs for this chapter.
	ExternalURLs shared.ExternalURLObject `json:"external_urls,required"`
	// A link to the Web API endpoint providing full details of the chapter.
	Href string `json:"href,required"`
	// A description of the chapter. This field may contain HTML tags.
	HTMLDescription string `json:"html_description,required"`
	// The cover art for the chapter in various sizes, widest first.
	Images []shared.ImageObject `json:"images,required"`
	// True if the chapter is playable in the given market. Otherwise false.
	IsPlayable bool `json:"is_playable,required"`
	// A list of the languages used in the chapter, identified by their
	// [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639) code.
	Languages []string `json:"languages,required"`
	// The name of the chapter.
	Name string `json:"name,required"`
	// The date the chapter was first released, for example `"1981-12-15"`. Depending
	// on the precision, it might be shown as `"1981"` or `"1981-12"`.
	ReleaseDate string `json:"release_date,required"`
	// The precision with which `release_date` value is known.
	//
	// Any of "year", "month", "day".
	ReleaseDatePrecision string `json:"release_date_precision,required"`
	// The object type.
	Type constant.Episode `json:"type,required"`
	// The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the
	// chapter.
	Uri string `json:"uri,required"`
	// A list of the countries in which the chapter can be played, identified by their
	// [ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code.
	AvailableMarkets []string `json:"available_markets"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// Included in the response when a content restriction is applied.
	Restrictions shared.ChapterRestrictionObject `json:"restrictions"`
	// The user's most recent position in the chapter. Set if the supplied access token
	// is a user token and has the scope 'user-read-playback-position'.
	ResumePoint shared.ResumePointObject `json:"resume_point"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                   respjson.Field
		AudioPreviewURL      respjson.Field
		Audiobook            respjson.Field
		ChapterNumber        respjson.Field
		Description          respjson.Field
		DurationMs           respjson.Field
		Explicit             respjson.Field
		ExternalURLs         respjson.Field
		Href                 respjson.Field
		HTMLDescription      respjson.Field
		Images               respjson.Field
		IsPlayable           respjson.Field
		Languages            respjson.Field
		Name                 respjson.Field
		ReleaseDate          respjson.Field
		ReleaseDatePrecision respjson.Field
		Type                 respjson.Field
		Uri                  respjson.Field
		AvailableMarkets     respjson.Field
		Published            respjson.Field
		Restrictions         respjson.Field
		ResumePoint          respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ChapterBulkGetResponseChapter) RawJSON

Returns the unmodified JSON received from the API

func (*ChapterBulkGetResponseChapter) UnmarshalJSON

func (r *ChapterBulkGetResponseChapter) UnmarshalJSON(data []byte) error

type ChapterGetParams

type ChapterGetParams struct {
	// An
	// [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// If a country code is specified, only content that is available in that market
	// will be returned.<br/> If a valid user access token is specified in the request
	// header, the country associated with the user account will take priority over
	// this parameter.<br/> _**Note**: If neither market or user country are provided,
	// the content is considered unavailable for the client._<br/> Users can view the
	// country that is associated with their account in the
	// [account settings](https://www.spotify.com/account/overview/).
	Market param.Opt[string] `query:"market,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ChapterGetParams) URLQuery

func (r ChapterGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes ChapterGetParams's query parameters as `url.Values`.

type ChapterGetResponse

type ChapterGetResponse struct {
	// The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the
	// chapter.
	ID string `json:"id,required"`
	// A URL to a 30 second preview (MP3 format) of the chapter. `null` if not
	// available.
	//
	// Deprecated: deprecated
	AudioPreviewURL string `json:"audio_preview_url,required"`
	// The audiobook for which the chapter belongs.
	Audiobook shared.AudiobookBase `json:"audiobook,required"`
	// The number of the chapter
	ChapterNumber int64 `json:"chapter_number,required"`
	// A description of the chapter. HTML tags are stripped away from this field, use
	// `html_description` field in case HTML tags are needed.
	Description string `json:"description,required"`
	// The chapter length in milliseconds.
	DurationMs int64 `json:"duration_ms,required"`
	// Whether or not the chapter has explicit content (true = yes it does; false = no
	// it does not OR unknown).
	Explicit bool `json:"explicit,required"`
	// External URLs for this chapter.
	ExternalURLs shared.ExternalURLObject `json:"external_urls,required"`
	// A link to the Web API endpoint providing full details of the chapter.
	Href string `json:"href,required"`
	// A description of the chapter. This field may contain HTML tags.
	HTMLDescription string `json:"html_description,required"`
	// The cover art for the chapter in various sizes, widest first.
	Images []shared.ImageObject `json:"images,required"`
	// True if the chapter is playable in the given market. Otherwise false.
	IsPlayable bool `json:"is_playable,required"`
	// A list of the languages used in the chapter, identified by their
	// [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639) code.
	Languages []string `json:"languages,required"`
	// The name of the chapter.
	Name string `json:"name,required"`
	// The date the chapter was first released, for example `"1981-12-15"`. Depending
	// on the precision, it might be shown as `"1981"` or `"1981-12"`.
	ReleaseDate string `json:"release_date,required"`
	// The precision with which `release_date` value is known.
	//
	// Any of "year", "month", "day".
	ReleaseDatePrecision ChapterGetResponseReleaseDatePrecision `json:"release_date_precision,required"`
	// The object type.
	Type constant.Episode `json:"type,required"`
	// The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the
	// chapter.
	Uri string `json:"uri,required"`
	// A list of the countries in which the chapter can be played, identified by their
	// [ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code.
	AvailableMarkets []string `json:"available_markets"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// Included in the response when a content restriction is applied.
	Restrictions shared.ChapterRestrictionObject `json:"restrictions"`
	// The user's most recent position in the chapter. Set if the supplied access token
	// is a user token and has the scope 'user-read-playback-position'.
	ResumePoint shared.ResumePointObject `json:"resume_point"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                   respjson.Field
		AudioPreviewURL      respjson.Field
		Audiobook            respjson.Field
		ChapterNumber        respjson.Field
		Description          respjson.Field
		DurationMs           respjson.Field
		Explicit             respjson.Field
		ExternalURLs         respjson.Field
		Href                 respjson.Field
		HTMLDescription      respjson.Field
		Images               respjson.Field
		IsPlayable           respjson.Field
		Languages            respjson.Field
		Name                 respjson.Field
		ReleaseDate          respjson.Field
		ReleaseDatePrecision respjson.Field
		Type                 respjson.Field
		Uri                  respjson.Field
		AvailableMarkets     respjson.Field
		Published            respjson.Field
		Restrictions         respjson.Field
		ResumePoint          respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ChapterGetResponse) RawJSON

func (r ChapterGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ChapterGetResponse) UnmarshalJSON

func (r *ChapterGetResponse) UnmarshalJSON(data []byte) error

type ChapterGetResponseReleaseDatePrecision

type ChapterGetResponseReleaseDatePrecision string

The precision with which `release_date` value is known.

const (
	ChapterGetResponseReleaseDatePrecisionYear  ChapterGetResponseReleaseDatePrecision = "year"
	ChapterGetResponseReleaseDatePrecisionMonth ChapterGetResponseReleaseDatePrecision = "month"
	ChapterGetResponseReleaseDatePrecisionDay   ChapterGetResponseReleaseDatePrecision = "day"
)

type ChapterRestrictionObject

type ChapterRestrictionObject = shared.ChapterRestrictionObject

This is an alias to an internal type.

type ChapterService

type ChapterService struct {
	Options []option.RequestOption
}

ChapterService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewChapterService method instead.

func NewChapterService

func NewChapterService(opts ...option.RequestOption) (r ChapterService)

NewChapterService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ChapterService) BulkGet

Get Spotify catalog information for several audiobook chapters identified by their Spotify IDs. Chapters are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.

func (*ChapterService) Get

Get Spotify catalog information for a single audiobook chapter. Chapters are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.

type Client

type Client struct {
	Options         []option.RequestOption
	Albums          AlbumService
	Artists         ArtistService
	Shows           ShowService
	Episodes        EpisodeService
	Audiobooks      AudiobookService
	Me              MeService
	Chapters        ChapterService
	Tracks          TrackService
	Search          SearchService
	Playlists       PlaylistService
	Users           UserService
	Browse          BrowseService
	AudioFeatures   AudioFeatureService
	AudioAnalysis   AudioAnalysisService
	Recommendations RecommendationService
	Markets         MarketService
}

Client creates a struct with services and top level methods that help with interacting with the spotted API. You should not instantiate this client directly, and instead use the NewClient method instead.

func NewClient

func NewClient(opts ...option.RequestOption) (r Client)

NewClient generates a new client with the default option read from the environment (SPOTIFY_ACCESS_TOKEN, SPOTTED_BASE_URL). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.

func (*Client) Delete

func (r *Client) Delete(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Execute

func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, opts ...option.RequestOption) error

Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.

If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.

The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.

If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.

Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.

The response body will be deserialized into the res variable, depending on its type:

  • A pointer to a *http.Response is populated by the raw response.
  • A pointer to a byte array will be populated with the contents of the request body.
  • A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
  • A nil value will not read the response body.

For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.

func (*Client) Get

func (r *Client) Get(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Patch

func (r *Client) Patch(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Post

func (r *Client) Post(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Post makes a POST request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

func (*Client) Put

func (r *Client) Put(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error

Put makes a PUT request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.

type ContextObject

type ContextObject struct {
	// External URLs for this context.
	ExternalURLs shared.ExternalURLObject `json:"external_urls"`
	// A link to the Web API endpoint providing full details of the track.
	Href string `json:"href"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// The object type, e.g. "artist", "playlist", "album", "show".
	Type string `json:"type"`
	// The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the
	// context.
	Uri string `json:"uri"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ExternalURLs respjson.Field
		Href         respjson.Field
		Published    respjson.Field
		Type         respjson.Field
		Uri          respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContextObject) RawJSON

func (r ContextObject) RawJSON() string

Returns the unmodified JSON received from the API

func (*ContextObject) UnmarshalJSON

func (r *ContextObject) UnmarshalJSON(data []byte) error

type CopyrightObject

type CopyrightObject = shared.CopyrightObject

This is an alias to an internal type.

type DeviceObject

type DeviceObject struct {
	// The device ID. This ID is unique and persistent to some extent. However, this is
	// not guaranteed and any cached `device_id` should periodically be cleared out and
	// refetched as necessary.
	ID string `json:"id,nullable"`
	// If this device is the currently active device.
	IsActive bool `json:"is_active"`
	// If this device is currently in a private session.
	IsPrivateSession bool `json:"is_private_session"`
	// Whether controlling this device is restricted. At present if this is "true" then
	// no Web API commands will be accepted by this device.
	IsRestricted bool `json:"is_restricted"`
	// A human-readable name for the device. Some devices have a name that the user can
	// configure (e.g. \"Loudest speaker\") and some devices have a generic name
	// associated with the manufacturer or device model.
	Name string `json:"name"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// If this device can be used to set the volume.
	SupportsVolume bool `json:"supports_volume"`
	// Device type, such as "computer", "smartphone" or "speaker".
	Type string `json:"type"`
	// The current volume in percent.
	VolumePercent int64 `json:"volume_percent,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID               respjson.Field
		IsActive         respjson.Field
		IsPrivateSession respjson.Field
		IsRestricted     respjson.Field
		Name             respjson.Field
		Published        respjson.Field
		SupportsVolume   respjson.Field
		Type             respjson.Field
		VolumePercent    respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (DeviceObject) RawJSON

func (r DeviceObject) RawJSON() string

Returns the unmodified JSON received from the API

func (*DeviceObject) UnmarshalJSON

func (r *DeviceObject) UnmarshalJSON(data []byte) error

type EpisodeBulkGetParams

type EpisodeBulkGetParams struct {
	// A comma-separated list of the
	// [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids) for the
	// episodes. Maximum: 50 IDs.
	IDs string `query:"ids,required" json:"-"`
	// An
	// [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// If a country code is specified, only content that is available in that market
	// will be returned.<br/> If a valid user access token is specified in the request
	// header, the country associated with the user account will take priority over
	// this parameter.<br/> _**Note**: If neither market or user country are provided,
	// the content is considered unavailable for the client._<br/> Users can view the
	// country that is associated with their account in the
	// [account settings](https://www.spotify.com/account/overview/).
	Market param.Opt[string] `query:"market,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (EpisodeBulkGetParams) URLQuery

func (r EpisodeBulkGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes EpisodeBulkGetParams's query parameters as `url.Values`.

type EpisodeBulkGetResponse

type EpisodeBulkGetResponse struct {
	Episodes []shared.EpisodeObject `json:"episodes,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Episodes    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (EpisodeBulkGetResponse) RawJSON

func (r EpisodeBulkGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*EpisodeBulkGetResponse) UnmarshalJSON

func (r *EpisodeBulkGetResponse) UnmarshalJSON(data []byte) error

type EpisodeGetParams

type EpisodeGetParams struct {
	// An
	// [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// If a country code is specified, only content that is available in that market
	// will be returned.<br/> If a valid user access token is specified in the request
	// header, the country associated with the user account will take priority over
	// this parameter.<br/> _**Note**: If neither market or user country are provided,
	// the content is considered unavailable for the client._<br/> Users can view the
	// country that is associated with their account in the
	// [account settings](https://www.spotify.com/account/overview/).
	Market param.Opt[string] `query:"market,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (EpisodeGetParams) URLQuery

func (r EpisodeGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes EpisodeGetParams's query parameters as `url.Values`.

type EpisodeObject

type EpisodeObject = shared.EpisodeObject

This is an alias to an internal type.

type EpisodeObjectReleaseDatePrecision

type EpisodeObjectReleaseDatePrecision = shared.EpisodeObjectReleaseDatePrecision

The precision with which `release_date` value is known.

This is an alias to an internal type.

type EpisodeRestrictionObject

type EpisodeRestrictionObject = shared.EpisodeRestrictionObject

This is an alias to an internal type.

type EpisodeService

type EpisodeService struct {
	Options []option.RequestOption
}

EpisodeService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewEpisodeService method instead.

func NewEpisodeService

func NewEpisodeService(opts ...option.RequestOption) (r EpisodeService)

NewEpisodeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*EpisodeService) BulkGet

Get Spotify catalog information for several episodes based on their Spotify IDs.

func (*EpisodeService) Get

func (r *EpisodeService) Get(ctx context.Context, id string, query EpisodeGetParams, opts ...option.RequestOption) (res *shared.EpisodeObject, err error)

Get Spotify catalog information for a single episode identified by its unique Spotify ID.

type Error

type Error = apierror.Error

type ExternalIDObject

type ExternalIDObject = shared.ExternalIDObject

This is an alias to an internal type.

type ExternalURLObject

type ExternalURLObject = shared.ExternalURLObject

This is an alias to an internal type.

type FollowersObject

type FollowersObject = shared.FollowersObject

This is an alias to an internal type.

type ImageObject

type ImageObject = shared.ImageObject

This is an alias to an internal type.

type LinkedTrackObject

type LinkedTrackObject = shared.LinkedTrackObject

This is an alias to an internal type.

type MarketListResponse

type MarketListResponse struct {
	Markets []string `json:"markets"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Markets     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MarketListResponse) RawJSON

func (r MarketListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*MarketListResponse) UnmarshalJSON

func (r *MarketListResponse) UnmarshalJSON(data []byte) error

type MarketService

type MarketService struct {
	Options []option.RequestOption
}

MarketService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMarketService method instead.

func NewMarketService

func NewMarketService(opts ...option.RequestOption) (r MarketService)

NewMarketService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*MarketService) List

func (r *MarketService) List(ctx context.Context, opts ...option.RequestOption) (res *MarketListResponse, err error)

Get the list of markets where Spotify is available.

type MeAlbumCheckParams

type MeAlbumCheckParams struct {
	// A comma-separated list of the
	// [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids) for the albums.
	// Maximum: 20 IDs.
	IDs string `query:"ids,required" json:"-"`
	// contains filtered or unexported fields
}

func (MeAlbumCheckParams) URLQuery

func (r MeAlbumCheckParams) URLQuery() (v url.Values, err error)

URLQuery serializes MeAlbumCheckParams's query parameters as `url.Values`.

type MeAlbumListParams

type MeAlbumListParams struct {
	// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// An
	// [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// If a country code is specified, only content that is available in that market
	// will be returned.<br/> If a valid user access token is specified in the request
	// header, the country associated with the user account will take priority over
	// this parameter.<br/> _**Note**: If neither market or user country are provided,
	// the content is considered unavailable for the client._<br/> Users can view the
	// country that is associated with their account in the
	// [account settings](https://www.spotify.com/account/overview/).
	Market param.Opt[string] `query:"market,omitzero" json:"-"`
	// The index of the first item to return. Default: 0 (the first item). Use with
	// limit to get the next set of items.
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MeAlbumListParams) URLQuery

func (r MeAlbumListParams) URLQuery() (v url.Values, err error)

URLQuery serializes MeAlbumListParams's query parameters as `url.Values`.

type MeAlbumListResponse

type MeAlbumListResponse struct {
	// The date and time the album was saved Timestamps are returned in ISO 8601 format
	// as Coordinated Universal Time (UTC) with a zero offset: YYYY-MM-DDTHH:MM:SSZ. If
	// the time is imprecise (for example, the date/time of an album release), an
	// additional field indicates the precision; see for example, release_date in an
	// album object.
	AddedAt time.Time `json:"added_at" format:"date-time"`
	// Information about the album.
	Album MeAlbumListResponseAlbum `json:"album"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AddedAt     respjson.Field
		Album       respjson.Field
		Published   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MeAlbumListResponse) RawJSON

func (r MeAlbumListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*MeAlbumListResponse) UnmarshalJSON

func (r *MeAlbumListResponse) UnmarshalJSON(data []byte) error

type MeAlbumListResponseAlbum

type MeAlbumListResponseAlbum struct {
	// The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the
	// album.
	ID string `json:"id,required"`
	// The type of the album.
	//
	// Any of "album", "single", "compilation".
	AlbumType string `json:"album_type,required"`
	// The markets in which the album is available:
	// [ISO 3166-1 alpha-2 country codes](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// _**NOTE**: an album is considered available in a market when at least 1 of its
	// tracks is available in that market._
	AvailableMarkets []string `json:"available_markets,required"`
	// Known external URLs for this album.
	ExternalURLs shared.ExternalURLObject `json:"external_urls,required"`
	// A link to the Web API endpoint providing full details of the album.
	Href string `json:"href,required"`
	// The cover art for the album in various sizes, widest first.
	Images []shared.ImageObject `json:"images,required"`
	// The name of the album. In case of an album takedown, the value may be an empty
	// string.
	Name string `json:"name,required"`
	// The date the album was first released.
	ReleaseDate string `json:"release_date,required"`
	// The precision with which `release_date` value is known.
	//
	// Any of "year", "month", "day".
	ReleaseDatePrecision string `json:"release_date_precision,required"`
	// The number of tracks in the album.
	TotalTracks int64 `json:"total_tracks,required"`
	// The object type.
	Type constant.Album `json:"type,required"`
	// The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the
	// album.
	Uri string `json:"uri,required"`
	// The artists of the album. Each artist object includes a link in `href` to more
	// detailed information about the artist.
	Artists []shared.SimplifiedArtistObject `json:"artists"`
	// The copyright statements of the album.
	Copyrights []shared.CopyrightObject `json:"copyrights"`
	// Known external IDs for the album.
	ExternalIDs shared.ExternalIDObject `json:"external_ids"`
	// **Deprecated** The array is always empty.
	//
	// Deprecated: deprecated
	Genres []string `json:"genres"`
	// The label associated with the album.
	Label string `json:"label"`
	// The popularity of the album. The value will be between 0 and 100, with 100 being
	// the most popular.
	Popularity int64 `json:"popularity"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// Included in the response when a content restriction is applied.
	Restrictions shared.AlbumRestrictionObject `json:"restrictions"`
	// The tracks of the album.
	Tracks MeAlbumListResponseAlbumTracks `json:"tracks"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                   respjson.Field
		AlbumType            respjson.Field
		AvailableMarkets     respjson.Field
		ExternalURLs         respjson.Field
		Href                 respjson.Field
		Images               respjson.Field
		Name                 respjson.Field
		ReleaseDate          respjson.Field
		ReleaseDatePrecision respjson.Field
		TotalTracks          respjson.Field
		Type                 respjson.Field
		Uri                  respjson.Field
		Artists              respjson.Field
		Copyrights           respjson.Field
		ExternalIDs          respjson.Field
		Genres               respjson.Field
		Label                respjson.Field
		Popularity           respjson.Field
		Published            respjson.Field
		Restrictions         respjson.Field
		Tracks               respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Information about the album.

func (MeAlbumListResponseAlbum) RawJSON

func (r MeAlbumListResponseAlbum) RawJSON() string

Returns the unmodified JSON received from the API

func (*MeAlbumListResponseAlbum) UnmarshalJSON

func (r *MeAlbumListResponseAlbum) UnmarshalJSON(data []byte) error

type MeAlbumListResponseAlbumTracks

type MeAlbumListResponseAlbumTracks struct {
	// A link to the Web API endpoint returning the full result of the request
	Href string `json:"href,required"`
	// The maximum number of items in the response (as set in the query or by default).
	Limit int64 `json:"limit,required"`
	// URL to the next page of items. ( `null` if none)
	Next string `json:"next,required"`
	// The offset of the items returned (as set in the query or by default)
	Offset int64 `json:"offset,required"`
	// URL to the previous page of items. ( `null` if none)
	Previous string `json:"previous,required"`
	// The total number of items available to return.
	Total int64                          `json:"total,required"`
	Items []shared.SimplifiedTrackObject `json:"items"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Href        respjson.Field
		Limit       respjson.Field
		Next        respjson.Field
		Offset      respjson.Field
		Previous    respjson.Field
		Total       respjson.Field
		Items       respjson.Field
		Published   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The tracks of the album.

func (MeAlbumListResponseAlbumTracks) RawJSON

Returns the unmodified JSON received from the API

func (*MeAlbumListResponseAlbumTracks) UnmarshalJSON

func (r *MeAlbumListResponseAlbumTracks) UnmarshalJSON(data []byte) error

type MeAlbumRemoveParams

type MeAlbumRemoveParams struct {
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published param.Opt[bool] `json:"published,omitzero"`
	// A JSON array of the
	// [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
	// `["4iV5W9uYEdYUVa79Axb7Rh", "1301WleyT98MSxVHPZCA6M"]`<br/>A maximum of 50 items
	// can be specified in one request. _**Note**: if the `ids` parameter is present in
	// the query string, any IDs listed here in the body will be ignored._
	IDs []string `json:"ids,omitzero"`
	// contains filtered or unexported fields
}

func (MeAlbumRemoveParams) MarshalJSON

func (r MeAlbumRemoveParams) MarshalJSON() (data []byte, err error)

func (*MeAlbumRemoveParams) UnmarshalJSON

func (r *MeAlbumRemoveParams) UnmarshalJSON(data []byte) error

type MeAlbumSaveParams

type MeAlbumSaveParams struct {
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published param.Opt[bool] `json:"published,omitzero"`
	// A JSON array of the
	// [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
	// `["4iV5W9uYEdYUVa79Axb7Rh", "1301WleyT98MSxVHPZCA6M"]`<br/>A maximum of 50 items
	// can be specified in one request. _**Note**: if the `ids` parameter is present in
	// the query string, any IDs listed here in the body will be ignored._
	IDs []string `json:"ids,omitzero"`
	// contains filtered or unexported fields
}

func (MeAlbumSaveParams) MarshalJSON

func (r MeAlbumSaveParams) MarshalJSON() (data []byte, err error)

func (*MeAlbumSaveParams) UnmarshalJSON

func (r *MeAlbumSaveParams) UnmarshalJSON(data []byte) error

type MeAlbumService

type MeAlbumService struct {
	Options []option.RequestOption
}

MeAlbumService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMeAlbumService method instead.

func NewMeAlbumService

func NewMeAlbumService(opts ...option.RequestOption) (r MeAlbumService)

NewMeAlbumService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*MeAlbumService) Check

func (r *MeAlbumService) Check(ctx context.Context, query MeAlbumCheckParams, opts ...option.RequestOption) (res *[]bool, err error)

Check if one or more albums is already saved in the current Spotify user's 'Your Music' library.

func (*MeAlbumService) List

Get a list of the albums saved in the current Spotify user's 'Your Music' library.

func (*MeAlbumService) ListAutoPaging

Get a list of the albums saved in the current Spotify user's 'Your Music' library.

func (*MeAlbumService) Remove

func (r *MeAlbumService) Remove(ctx context.Context, body MeAlbumRemoveParams, opts ...option.RequestOption) (err error)

Remove one or more albums from the current user's 'Your Music' library.

func (*MeAlbumService) Save

func (r *MeAlbumService) Save(ctx context.Context, body MeAlbumSaveParams, opts ...option.RequestOption) (err error)

Save one or more albums to the current user's 'Your Music' library.

type MeAudiobookCheckParams

type MeAudiobookCheckParams struct {
	// A comma-separated list of the
	// [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
	// `ids=18yVqkdbdRvS24c0Ilj2ci,1HGw3J3NxZO1TP1BTtVhpZ`. Maximum: 50 IDs.
	IDs string `query:"ids,required" json:"-"`
	// contains filtered or unexported fields
}

func (MeAudiobookCheckParams) URLQuery

func (r MeAudiobookCheckParams) URLQuery() (v url.Values, err error)

URLQuery serializes MeAudiobookCheckParams's query parameters as `url.Values`.

type MeAudiobookListParams

type MeAudiobookListParams struct {
	// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// The index of the first item to return. Default: 0 (the first item). Use with
	// limit to get the next set of items.
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MeAudiobookListParams) URLQuery

func (r MeAudiobookListParams) URLQuery() (v url.Values, err error)

URLQuery serializes MeAudiobookListParams's query parameters as `url.Values`.

type MeAudiobookListResponse

type MeAudiobookListResponse struct {
	// The date and time the audiobook was saved Timestamps are returned in ISO 8601
	// format as Coordinated Universal Time (UTC) with a zero offset:
	// YYYY-MM-DDTHH:MM:SSZ. If the time is imprecise (for example, the date/time of an
	// album release), an additional field indicates the precision; see for example,
	// release_date in an album object.
	AddedAt time.Time `json:"added_at" format:"date-time"`
	// Information about the audiobook.
	Audiobook MeAudiobookListResponseAudiobook `json:"audiobook"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AddedAt     respjson.Field
		Audiobook   respjson.Field
		Published   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MeAudiobookListResponse) RawJSON

func (r MeAudiobookListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*MeAudiobookListResponse) UnmarshalJSON

func (r *MeAudiobookListResponse) UnmarshalJSON(data []byte) error

type MeAudiobookListResponseAudiobook

type MeAudiobookListResponseAudiobook struct {
	// The chapters of the audiobook.
	Chapters MeAudiobookListResponseAudiobookChapters `json:"chapters,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Chapters    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
	shared.AudiobookBase
}

Information about the audiobook.

func (MeAudiobookListResponseAudiobook) RawJSON

Returns the unmodified JSON received from the API

func (*MeAudiobookListResponseAudiobook) UnmarshalJSON

func (r *MeAudiobookListResponseAudiobook) UnmarshalJSON(data []byte) error

type MeAudiobookListResponseAudiobookChapters

type MeAudiobookListResponseAudiobookChapters struct {
	// A link to the Web API endpoint returning the full result of the request
	Href string `json:"href,required"`
	// The maximum number of items in the response (as set in the query or by default).
	Limit int64 `json:"limit,required"`
	// URL to the next page of items. ( `null` if none)
	Next string `json:"next,required"`
	// The offset of the items returned (as set in the query or by default)
	Offset int64 `json:"offset,required"`
	// URL to the previous page of items. ( `null` if none)
	Previous string `json:"previous,required"`
	// The total number of items available to return.
	Total int64                     `json:"total,required"`
	Items []SimplifiedChapterObject `json:"items"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Href        respjson.Field
		Limit       respjson.Field
		Next        respjson.Field
		Offset      respjson.Field
		Previous    respjson.Field
		Total       respjson.Field
		Items       respjson.Field
		Published   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The chapters of the audiobook.

func (MeAudiobookListResponseAudiobookChapters) RawJSON

Returns the unmodified JSON received from the API

func (*MeAudiobookListResponseAudiobookChapters) UnmarshalJSON

func (r *MeAudiobookListResponseAudiobookChapters) UnmarshalJSON(data []byte) error

type MeAudiobookRemoveParams

type MeAudiobookRemoveParams struct {
	// A comma-separated list of the
	// [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
	// `ids=18yVqkdbdRvS24c0Ilj2ci,1HGw3J3NxZO1TP1BTtVhpZ`. Maximum: 50 IDs.
	IDs string `query:"ids,required" json:"-"`
	// contains filtered or unexported fields
}

func (MeAudiobookRemoveParams) URLQuery

func (r MeAudiobookRemoveParams) URLQuery() (v url.Values, err error)

URLQuery serializes MeAudiobookRemoveParams's query parameters as `url.Values`.

type MeAudiobookSaveParams

type MeAudiobookSaveParams struct {
	// A comma-separated list of the
	// [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
	// `ids=18yVqkdbdRvS24c0Ilj2ci,1HGw3J3NxZO1TP1BTtVhpZ`. Maximum: 50 IDs.
	IDs string `query:"ids,required" json:"-"`
	// contains filtered or unexported fields
}

func (MeAudiobookSaveParams) URLQuery

func (r MeAudiobookSaveParams) URLQuery() (v url.Values, err error)

URLQuery serializes MeAudiobookSaveParams's query parameters as `url.Values`.

type MeAudiobookService

type MeAudiobookService struct {
	Options []option.RequestOption
}

MeAudiobookService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMeAudiobookService method instead.

func NewMeAudiobookService

func NewMeAudiobookService(opts ...option.RequestOption) (r MeAudiobookService)

NewMeAudiobookService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*MeAudiobookService) Check

func (r *MeAudiobookService) Check(ctx context.Context, query MeAudiobookCheckParams, opts ...option.RequestOption) (res *[]bool, err error)

Check if one or more audiobooks are already saved in the current Spotify user's library.

func (*MeAudiobookService) List

Get a list of the audiobooks saved in the current Spotify user's 'Your Music' library.

func (*MeAudiobookService) ListAutoPaging

Get a list of the audiobooks saved in the current Spotify user's 'Your Music' library.

func (*MeAudiobookService) Remove

Remove one or more audiobooks from the Spotify user's library.

func (*MeAudiobookService) Save

Save one or more audiobooks to the current Spotify user's library.

type MeEpisodeCheckParams

type MeEpisodeCheckParams struct {
	// A comma-separated list of the
	// [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids) for the
	// episodes. Maximum: 50 IDs.
	IDs string `query:"ids,required" json:"-"`
	// contains filtered or unexported fields
}

func (MeEpisodeCheckParams) URLQuery

func (r MeEpisodeCheckParams) URLQuery() (v url.Values, err error)

URLQuery serializes MeEpisodeCheckParams's query parameters as `url.Values`.

type MeEpisodeListParams

type MeEpisodeListParams struct {
	// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// An
	// [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// If a country code is specified, only content that is available in that market
	// will be returned.<br/> If a valid user access token is specified in the request
	// header, the country associated with the user account will take priority over
	// this parameter.<br/> _**Note**: If neither market or user country are provided,
	// the content is considered unavailable for the client._<br/> Users can view the
	// country that is associated with their account in the
	// [account settings](https://www.spotify.com/account/overview/).
	Market param.Opt[string] `query:"market,omitzero" json:"-"`
	// The index of the first item to return. Default: 0 (the first item). Use with
	// limit to get the next set of items.
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MeEpisodeListParams) URLQuery

func (r MeEpisodeListParams) URLQuery() (v url.Values, err error)

URLQuery serializes MeEpisodeListParams's query parameters as `url.Values`.

type MeEpisodeListResponse

type MeEpisodeListResponse struct {
	// The date and time the episode was saved. Timestamps are returned in ISO 8601
	// format as Coordinated Universal Time (UTC) with a zero offset:
	// YYYY-MM-DDTHH:MM:SSZ.
	AddedAt time.Time `json:"added_at" format:"date-time"`
	// Information about the episode.
	Episode shared.EpisodeObject `json:"episode"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AddedAt     respjson.Field
		Episode     respjson.Field
		Published   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MeEpisodeListResponse) RawJSON

func (r MeEpisodeListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*MeEpisodeListResponse) UnmarshalJSON

func (r *MeEpisodeListResponse) UnmarshalJSON(data []byte) error

type MeEpisodeRemoveParams

type MeEpisodeRemoveParams struct {
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published param.Opt[bool] `json:"published,omitzero"`
	// A JSON array of the
	// [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). <br/>A maximum
	// of 50 items can be specified in one request. _**Note**: if the `ids` parameter
	// is present in the query string, any IDs listed here in the body will be
	// ignored._
	IDs []string `json:"ids,omitzero"`
	// contains filtered or unexported fields
}

func (MeEpisodeRemoveParams) MarshalJSON

func (r MeEpisodeRemoveParams) MarshalJSON() (data []byte, err error)

func (*MeEpisodeRemoveParams) UnmarshalJSON

func (r *MeEpisodeRemoveParams) UnmarshalJSON(data []byte) error

type MeEpisodeSaveParams

type MeEpisodeSaveParams struct {
	// A JSON array of the
	// [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). <br/>A maximum
	// of 50 items can be specified in one request. _**Note**: if the `ids` parameter
	// is present in the query string, any IDs listed here in the body will be
	// ignored._
	IDs []string `json:"ids,omitzero,required"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published param.Opt[bool] `json:"published,omitzero"`
	// contains filtered or unexported fields
}

func (MeEpisodeSaveParams) MarshalJSON

func (r MeEpisodeSaveParams) MarshalJSON() (data []byte, err error)

func (*MeEpisodeSaveParams) UnmarshalJSON

func (r *MeEpisodeSaveParams) UnmarshalJSON(data []byte) error

type MeEpisodeService

type MeEpisodeService struct {
	Options []option.RequestOption
}

MeEpisodeService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMeEpisodeService method instead.

func NewMeEpisodeService

func NewMeEpisodeService(opts ...option.RequestOption) (r MeEpisodeService)

NewMeEpisodeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*MeEpisodeService) Check

func (r *MeEpisodeService) Check(ctx context.Context, query MeEpisodeCheckParams, opts ...option.RequestOption) (res *[]bool, err error)

Check if one or more episodes is already saved in the current Spotify user's 'Your Episodes' library.<br/> This API endpoint is in **beta** and could change without warning. Please share any feedback that you have, or issues that you discover, in our [developer community forum](https://community.spotify.com/t5/Spotify-for-Developers/bd-p/Spotify_Developer)..

func (*MeEpisodeService) List

Get a list of the episodes saved in the current Spotify user's library.<br/> This API endpoint is in **beta** and could change without warning. Please share any feedback that you have, or issues that you discover, in our [developer community forum](https://community.spotify.com/t5/Spotify-for-Developers/bd-p/Spotify_Developer).

func (*MeEpisodeService) ListAutoPaging

Get a list of the episodes saved in the current Spotify user's library.<br/> This API endpoint is in **beta** and could change without warning. Please share any feedback that you have, or issues that you discover, in our [developer community forum](https://community.spotify.com/t5/Spotify-for-Developers/bd-p/Spotify_Developer).

func (*MeEpisodeService) Remove

func (r *MeEpisodeService) Remove(ctx context.Context, body MeEpisodeRemoveParams, opts ...option.RequestOption) (err error)

Remove one or more episodes from the current user's library.<br/> This API endpoint is in **beta** and could change without warning. Please share any feedback that you have, or issues that you discover, in our [developer community forum](https://community.spotify.com/t5/Spotify-for-Developers/bd-p/Spotify_Developer).

func (*MeEpisodeService) Save

func (r *MeEpisodeService) Save(ctx context.Context, body MeEpisodeSaveParams, opts ...option.RequestOption) (err error)

Save one or more episodes to the current user's library.<br/> This API endpoint is in **beta** and could change without warning. Please share any feedback that you have, or issues that you discover, in our [developer community forum](https://community.spotify.com/t5/Spotify-for-Developers/bd-p/Spotify_Developer).

type MeFollowingBulkGetParams

type MeFollowingBulkGetParams struct {
	// The last artist ID retrieved from the previous request.
	After param.Opt[string] `query:"after,omitzero" json:"-"`
	// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// The ID type: currently only `artist` is supported.
	//
	// This field can be elided, and will marshal its zero value as "artist".
	Type constant.Artist `query:"type,required" json:"-"`
	// contains filtered or unexported fields
}

func (MeFollowingBulkGetParams) URLQuery

func (r MeFollowingBulkGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes MeFollowingBulkGetParams's query parameters as `url.Values`.

type MeFollowingBulkGetResponse

type MeFollowingBulkGetResponse struct {
	Artists MeFollowingBulkGetResponseArtists `json:"artists,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Artists     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MeFollowingBulkGetResponse) RawJSON

func (r MeFollowingBulkGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*MeFollowingBulkGetResponse) UnmarshalJSON

func (r *MeFollowingBulkGetResponse) UnmarshalJSON(data []byte) error

type MeFollowingBulkGetResponseArtists

type MeFollowingBulkGetResponseArtists struct {
	// The cursors used to find the next set of items.
	Cursors MeFollowingBulkGetResponseArtistsCursors `json:"cursors"`
	// A link to the Web API endpoint returning the full result of the request.
	Href  string                `json:"href"`
	Items []shared.ArtistObject `json:"items"`
	// The maximum number of items in the response (as set in the query or by default).
	Limit int64 `json:"limit"`
	// URL to the next page of items. ( `null` if none)
	Next string `json:"next"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// The total number of items available to return.
	Total int64 `json:"total"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Cursors     respjson.Field
		Href        respjson.Field
		Items       respjson.Field
		Limit       respjson.Field
		Next        respjson.Field
		Published   respjson.Field
		Total       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MeFollowingBulkGetResponseArtists) RawJSON

Returns the unmodified JSON received from the API

func (*MeFollowingBulkGetResponseArtists) UnmarshalJSON

func (r *MeFollowingBulkGetResponseArtists) UnmarshalJSON(data []byte) error

type MeFollowingBulkGetResponseArtistsCursors

type MeFollowingBulkGetResponseArtistsCursors struct {
	// The cursor to use as key to find the next page of items.
	After string `json:"after"`
	// The cursor to use as key to find the previous page of items.
	Before string `json:"before"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		After       respjson.Field
		Before      respjson.Field
		Published   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The cursors used to find the next set of items.

func (MeFollowingBulkGetResponseArtistsCursors) RawJSON

Returns the unmodified JSON received from the API

func (*MeFollowingBulkGetResponseArtistsCursors) UnmarshalJSON

func (r *MeFollowingBulkGetResponseArtistsCursors) UnmarshalJSON(data []byte) error

type MeFollowingCheckParams

type MeFollowingCheckParams struct {
	// A comma-separated list of the artist or the user
	// [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids) to check. For
	// example: `ids=74ASZWbe4lXaubB36ztrGX,08td7MxkoHQkXnWAYD8d6Q`. A maximum of 50
	// IDs can be sent in one request.
	IDs string `query:"ids,required" json:"-"`
	// The ID type: either `artist` or `user`.
	//
	// Any of "artist", "user".
	Type MeFollowingCheckParamsType `query:"type,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

func (MeFollowingCheckParams) URLQuery

func (r MeFollowingCheckParams) URLQuery() (v url.Values, err error)

URLQuery serializes MeFollowingCheckParams's query parameters as `url.Values`.

type MeFollowingCheckParamsType

type MeFollowingCheckParamsType string

The ID type: either `artist` or `user`.

const (
	MeFollowingCheckParamsTypeArtist MeFollowingCheckParamsType = "artist"
	MeFollowingCheckParamsTypeUser   MeFollowingCheckParamsType = "user"
)

type MeFollowingFollowParams

type MeFollowingFollowParams struct {
	// A JSON array of the artist or user
	// [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
	// `{ids:["74ASZWbe4lXaubB36ztrGX", "08td7MxkoHQkXnWAYD8d6Q"]}`. A maximum of 50
	// IDs can be sent in one request. _**Note**: if the `ids` parameter is present in
	// the query string, any IDs listed here in the body will be ignored._
	IDs []string `json:"ids,omitzero,required"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published param.Opt[bool] `json:"published,omitzero"`
	// contains filtered or unexported fields
}

func (MeFollowingFollowParams) MarshalJSON

func (r MeFollowingFollowParams) MarshalJSON() (data []byte, err error)

func (*MeFollowingFollowParams) UnmarshalJSON

func (r *MeFollowingFollowParams) UnmarshalJSON(data []byte) error

type MeFollowingService

type MeFollowingService struct {
	Options []option.RequestOption
}

MeFollowingService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMeFollowingService method instead.

func NewMeFollowingService

func NewMeFollowingService(opts ...option.RequestOption) (r MeFollowingService)

NewMeFollowingService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*MeFollowingService) BulkGet

Get the current user's followed artists.

func (*MeFollowingService) Check

func (r *MeFollowingService) Check(ctx context.Context, query MeFollowingCheckParams, opts ...option.RequestOption) (res *[]bool, err error)

Check to see if the current user is following one or more artists or other Spotify users.

func (*MeFollowingService) Follow

Add the current user as a follower of one or more artists or other Spotify users.

func (*MeFollowingService) Unfollow

Remove the current user as a follower of one or more artists or other Spotify users.

type MeFollowingUnfollowParams

type MeFollowingUnfollowParams struct {
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published param.Opt[bool] `json:"published,omitzero"`
	// A JSON array of the artist or user
	// [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
	// `{ids:["74ASZWbe4lXaubB36ztrGX", "08td7MxkoHQkXnWAYD8d6Q"]}`. A maximum of 50
	// IDs can be sent in one request. _**Note**: if the `ids` parameter is present in
	// the query string, any IDs listed here in the body will be ignored._
	IDs []string `json:"ids,omitzero"`
	// contains filtered or unexported fields
}

func (MeFollowingUnfollowParams) MarshalJSON

func (r MeFollowingUnfollowParams) MarshalJSON() (data []byte, err error)

func (*MeFollowingUnfollowParams) UnmarshalJSON

func (r *MeFollowingUnfollowParams) UnmarshalJSON(data []byte) error

type MeGetResponse

type MeGetResponse struct {
	// The [Spotify user ID](/documentation/web-api/concepts/spotify-uris-ids) for the
	// user.
	ID string `json:"id"`
	// The country of the user, as set in the user's account profile. An
	// [ISO 3166-1 alpha-2 country code](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// _This field is only available when the current user has granted access to the
	// [user-read-private](/documentation/web-api/concepts/scopes/#list-of-scopes)
	// scope._
	Country string `json:"country"`
	// The name displayed on the user's profile. `null` if not available.
	DisplayName string `json:"display_name"`
	// The user's email address, as entered by the user when creating their account.
	// _**Important!** This email address is unverified; there is no proof that it
	// actually belongs to the user._ _This field is only available when the current
	// user has granted access to the
	// [user-read-email](/documentation/web-api/concepts/scopes/#list-of-scopes)
	// scope._
	Email string `json:"email"`
	// The user's explicit content settings. _This field is only available when the
	// current user has granted access to the
	// [user-read-private](/documentation/web-api/concepts/scopes/#list-of-scopes)
	// scope._
	ExplicitContent MeGetResponseExplicitContent `json:"explicit_content"`
	// Known external URLs for this user.
	ExternalURLs shared.ExternalURLObject `json:"external_urls"`
	// Information about the followers of the user.
	Followers shared.FollowersObject `json:"followers"`
	// A link to the Web API endpoint for this user.
	Href string `json:"href"`
	// The user's profile image.
	Images []shared.ImageObject `json:"images"`
	// The user's Spotify subscription level: "premium", "free", etc. (The subscription
	// level "open" can be considered the same as "free".) _This field is only
	// available when the current user has granted access to the
	// [user-read-private](/documentation/web-api/concepts/scopes/#list-of-scopes)
	// scope._
	Product string `json:"product"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// The object type: "user"
	Type string `json:"type"`
	// The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the
	// user.
	Uri string `json:"uri"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		Country         respjson.Field
		DisplayName     respjson.Field
		Email           respjson.Field
		ExplicitContent respjson.Field
		ExternalURLs    respjson.Field
		Followers       respjson.Field
		Href            respjson.Field
		Images          respjson.Field
		Product         respjson.Field
		Published       respjson.Field
		Type            respjson.Field
		Uri             respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MeGetResponse) RawJSON

func (r MeGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*MeGetResponse) UnmarshalJSON

func (r *MeGetResponse) UnmarshalJSON(data []byte) error

type MeGetResponseExplicitContent

type MeGetResponseExplicitContent struct {
	// When `true`, indicates that explicit content should not be played.
	FilterEnabled bool `json:"filter_enabled"`
	// When `true`, indicates that the explicit content setting is locked and can't be
	// changed by the user.
	FilterLocked bool `json:"filter_locked"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FilterEnabled respjson.Field
		FilterLocked  respjson.Field
		Published     respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The user's explicit content settings. _This field is only available when the current user has granted access to the [user-read-private](/documentation/web-api/concepts/scopes/#list-of-scopes) scope._

func (MeGetResponseExplicitContent) RawJSON

Returns the unmodified JSON received from the API

func (*MeGetResponseExplicitContent) UnmarshalJSON

func (r *MeGetResponseExplicitContent) UnmarshalJSON(data []byte) error

type MePlayerGetCurrentlyPlayingParams

type MePlayerGetCurrentlyPlayingParams struct {
	// A comma-separated list of item types that your client supports besides the
	// default `track` type. Valid types are: `track` and `episode`.<br/> _**Note**:
	// This parameter was introduced to allow existing clients to maintain their
	// current behaviour and might be deprecated in the future._<br/> In addition to
	// providing this parameter, make sure that your client properly handles cases of
	// new types in the future by checking against the `type` field of each object.
	AdditionalTypes param.Opt[string] `query:"additional_types,omitzero" json:"-"`
	// An
	// [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// If a country code is specified, only content that is available in that market
	// will be returned.<br/> If a valid user access token is specified in the request
	// header, the country associated with the user account will take priority over
	// this parameter.<br/> _**Note**: If neither market or user country are provided,
	// the content is considered unavailable for the client._<br/> Users can view the
	// country that is associated with their account in the
	// [account settings](https://www.spotify.com/account/overview/).
	Market param.Opt[string] `query:"market,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MePlayerGetCurrentlyPlayingParams) URLQuery

func (r MePlayerGetCurrentlyPlayingParams) URLQuery() (v url.Values, err error)

URLQuery serializes MePlayerGetCurrentlyPlayingParams's query parameters as `url.Values`.

type MePlayerGetCurrentlyPlayingResponse

type MePlayerGetCurrentlyPlayingResponse struct {
	// Allows to update the user interface based on which playback actions are
	// available within the current context.
	Actions MePlayerGetCurrentlyPlayingResponseActions `json:"actions"`
	// A Context Object. Can be `null`.
	Context ContextObject `json:"context"`
	// The object type of the currently playing item. Can be one of `track`, `episode`,
	// `ad` or `unknown`.
	CurrentlyPlayingType string `json:"currently_playing_type"`
	// If something is currently playing, return `true`.
	IsPlaying bool `json:"is_playing"`
	// The currently playing track or episode. Can be `null`.
	Item MePlayerGetCurrentlyPlayingResponseItemUnion `json:"item"`
	// Progress into the currently playing track or episode. Can be `null`.
	ProgressMs int64 `json:"progress_ms"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// Unix Millisecond Timestamp when data was fetched
	Timestamp int64 `json:"timestamp"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Actions              respjson.Field
		Context              respjson.Field
		CurrentlyPlayingType respjson.Field
		IsPlaying            respjson.Field
		Item                 respjson.Field
		ProgressMs           respjson.Field
		Published            respjson.Field
		Timestamp            respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MePlayerGetCurrentlyPlayingResponse) RawJSON

Returns the unmodified JSON received from the API

func (*MePlayerGetCurrentlyPlayingResponse) UnmarshalJSON

func (r *MePlayerGetCurrentlyPlayingResponse) UnmarshalJSON(data []byte) error

type MePlayerGetCurrentlyPlayingResponseActions

type MePlayerGetCurrentlyPlayingResponseActions struct {
	// Interrupting playback. Optional field.
	InterruptingPlayback bool `json:"interrupting_playback"`
	// Pausing. Optional field.
	Pausing bool `json:"pausing"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// Resuming. Optional field.
	Resuming bool `json:"resuming"`
	// Seeking playback location. Optional field.
	Seeking bool `json:"seeking"`
	// Skipping to the next context. Optional field.
	SkippingNext bool `json:"skipping_next"`
	// Skipping to the previous context. Optional field.
	SkippingPrev bool `json:"skipping_prev"`
	// Toggling repeat context flag. Optional field.
	TogglingRepeatContext bool `json:"toggling_repeat_context"`
	// Toggling repeat track flag. Optional field.
	TogglingRepeatTrack bool `json:"toggling_repeat_track"`
	// Toggling shuffle flag. Optional field.
	TogglingShuffle bool `json:"toggling_shuffle"`
	// Transfering playback between devices. Optional field.
	TransferringPlayback bool `json:"transferring_playback"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		InterruptingPlayback  respjson.Field
		Pausing               respjson.Field
		Published             respjson.Field
		Resuming              respjson.Field
		Seeking               respjson.Field
		SkippingNext          respjson.Field
		SkippingPrev          respjson.Field
		TogglingRepeatContext respjson.Field
		TogglingRepeatTrack   respjson.Field
		TogglingShuffle       respjson.Field
		TransferringPlayback  respjson.Field
		ExtraFields           map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Allows to update the user interface based on which playback actions are available within the current context.

func (MePlayerGetCurrentlyPlayingResponseActions) RawJSON

Returns the unmodified JSON received from the API

func (*MePlayerGetCurrentlyPlayingResponseActions) UnmarshalJSON

func (r *MePlayerGetCurrentlyPlayingResponseActions) UnmarshalJSON(data []byte) error

type MePlayerGetCurrentlyPlayingResponseItemUnion

type MePlayerGetCurrentlyPlayingResponseItemUnion struct {
	ID string `json:"id"`
	// This field is from variant [shared.TrackObject].
	Album shared.TrackObjectAlbum `json:"album"`
	// This field is from variant [shared.TrackObject].
	Artists []shared.SimplifiedArtistObject `json:"artists"`
	// This field is from variant [shared.TrackObject].
	AvailableMarkets []string `json:"available_markets"`
	// This field is from variant [shared.TrackObject].
	DiscNumber int64 `json:"disc_number"`
	DurationMs int64 `json:"duration_ms"`
	Explicit   bool  `json:"explicit"`
	// This field is from variant [shared.TrackObject].
	ExternalIDs shared.ExternalIDObject `json:"external_ids"`
	// This field is from variant [shared.TrackObject].
	ExternalURLs shared.ExternalURLObject `json:"external_urls"`
	Href         string                   `json:"href"`
	// This field is from variant [shared.TrackObject].
	IsLocal    bool `json:"is_local"`
	IsPlayable bool `json:"is_playable"`
	// This field is from variant [shared.TrackObject].
	LinkedFrom shared.LinkedTrackObject `json:"linked_from"`
	Name       string                   `json:"name"`
	// This field is from variant [shared.TrackObject].
	Popularity int64 `json:"popularity"`
	// This field is from variant [shared.TrackObject].
	PreviewURL string `json:"preview_url"`
	Published  bool   `json:"published"`
	// This field is a union of [shared.TrackRestrictionObject],
	// [shared.EpisodeRestrictionObject]
	Restrictions MePlayerGetCurrentlyPlayingResponseItemUnionRestrictions `json:"restrictions"`
	// This field is from variant [shared.TrackObject].
	TrackNumber int64 `json:"track_number"`
	// Any of "track", "episode".
	Type string `json:"type"`
	Uri  string `json:"uri"`
	// This field is from variant [shared.EpisodeObject].
	AudioPreviewURL string `json:"audio_preview_url"`
	// This field is from variant [shared.EpisodeObject].
	Description string `json:"description"`
	// This field is from variant [shared.EpisodeObject].
	HTMLDescription string `json:"html_description"`
	// This field is from variant [shared.EpisodeObject].
	Images []shared.ImageObject `json:"images"`
	// This field is from variant [shared.EpisodeObject].
	IsExternallyHosted bool `json:"is_externally_hosted"`
	// This field is from variant [shared.EpisodeObject].
	Languages []string `json:"languages"`
	// This field is from variant [shared.EpisodeObject].
	ReleaseDate string `json:"release_date"`
	// This field is from variant [shared.EpisodeObject].
	ReleaseDatePrecision shared.EpisodeObjectReleaseDatePrecision `json:"release_date_precision"`
	// This field is from variant [shared.EpisodeObject].
	Show shared.ShowBase `json:"show"`
	// This field is from variant [shared.EpisodeObject].
	Language string `json:"language"`
	// This field is from variant [shared.EpisodeObject].
	ResumePoint shared.ResumePointObject `json:"resume_point"`
	JSON        struct {
		ID                   respjson.Field
		Album                respjson.Field
		Artists              respjson.Field
		AvailableMarkets     respjson.Field
		DiscNumber           respjson.Field
		DurationMs           respjson.Field
		Explicit             respjson.Field
		ExternalIDs          respjson.Field
		ExternalURLs         respjson.Field
		Href                 respjson.Field
		IsLocal              respjson.Field
		IsPlayable           respjson.Field
		LinkedFrom           respjson.Field
		Name                 respjson.Field
		Popularity           respjson.Field
		PreviewURL           respjson.Field
		Published            respjson.Field
		Restrictions         respjson.Field
		TrackNumber          respjson.Field
		Type                 respjson.Field
		Uri                  respjson.Field
		AudioPreviewURL      respjson.Field
		Description          respjson.Field
		HTMLDescription      respjson.Field
		Images               respjson.Field
		IsExternallyHosted   respjson.Field
		Languages            respjson.Field
		ReleaseDate          respjson.Field
		ReleaseDatePrecision respjson.Field
		Show                 respjson.Field
		Language             respjson.Field
		ResumePoint          respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

MePlayerGetCurrentlyPlayingResponseItemUnion contains all possible properties and values from shared.TrackObject, shared.EpisodeObject.

Use the MePlayerGetCurrentlyPlayingResponseItemUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (MePlayerGetCurrentlyPlayingResponseItemUnion) AsAny

func (u MePlayerGetCurrentlyPlayingResponseItemUnion) AsAny() anyMePlayerGetCurrentlyPlayingResponseItem

Use the following switch statement to find the correct variant

switch variant := MePlayerGetCurrentlyPlayingResponseItemUnion.AsAny().(type) {
case shared.TrackObject:
case shared.EpisodeObject:
default:
  fmt.Errorf("no variant present")
}

func (MePlayerGetCurrentlyPlayingResponseItemUnion) AsEpisode

func (MePlayerGetCurrentlyPlayingResponseItemUnion) AsTrack

func (MePlayerGetCurrentlyPlayingResponseItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*MePlayerGetCurrentlyPlayingResponseItemUnion) UnmarshalJSON

func (r *MePlayerGetCurrentlyPlayingResponseItemUnion) UnmarshalJSON(data []byte) error

type MePlayerGetCurrentlyPlayingResponseItemUnionRestrictions

type MePlayerGetCurrentlyPlayingResponseItemUnionRestrictions struct {
	Published bool   `json:"published"`
	Reason    string `json:"reason"`
	JSON      struct {
		Published respjson.Field
		Reason    respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

MePlayerGetCurrentlyPlayingResponseItemUnionRestrictions is an implicit subunion of MePlayerGetCurrentlyPlayingResponseItemUnion. MePlayerGetCurrentlyPlayingResponseItemUnionRestrictions provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the MePlayerGetCurrentlyPlayingResponseItemUnion.

func (*MePlayerGetCurrentlyPlayingResponseItemUnionRestrictions) UnmarshalJSON

type MePlayerGetDevicesResponse

type MePlayerGetDevicesResponse struct {
	Devices []DeviceObject `json:"devices,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Devices     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MePlayerGetDevicesResponse) RawJSON

func (r MePlayerGetDevicesResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*MePlayerGetDevicesResponse) UnmarshalJSON

func (r *MePlayerGetDevicesResponse) UnmarshalJSON(data []byte) error

type MePlayerGetStateParams

type MePlayerGetStateParams struct {
	// A comma-separated list of item types that your client supports besides the
	// default `track` type. Valid types are: `track` and `episode`.<br/> _**Note**:
	// This parameter was introduced to allow existing clients to maintain their
	// current behaviour and might be deprecated in the future._<br/> In addition to
	// providing this parameter, make sure that your client properly handles cases of
	// new types in the future by checking against the `type` field of each object.
	AdditionalTypes param.Opt[string] `query:"additional_types,omitzero" json:"-"`
	// An
	// [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// If a country code is specified, only content that is available in that market
	// will be returned.<br/> If a valid user access token is specified in the request
	// header, the country associated with the user account will take priority over
	// this parameter.<br/> _**Note**: If neither market or user country are provided,
	// the content is considered unavailable for the client._<br/> Users can view the
	// country that is associated with their account in the
	// [account settings](https://www.spotify.com/account/overview/).
	Market param.Opt[string] `query:"market,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MePlayerGetStateParams) URLQuery

func (r MePlayerGetStateParams) URLQuery() (v url.Values, err error)

URLQuery serializes MePlayerGetStateParams's query parameters as `url.Values`.

type MePlayerGetStateResponse

type MePlayerGetStateResponse struct {
	// Allows to update the user interface based on which playback actions are
	// available within the current context.
	Actions MePlayerGetStateResponseActions `json:"actions"`
	// A Context Object. Can be `null`.
	Context ContextObject `json:"context"`
	// The object type of the currently playing item. Can be one of `track`, `episode`,
	// `ad` or `unknown`.
	CurrentlyPlayingType string `json:"currently_playing_type"`
	// The device that is currently active.
	Device DeviceObject `json:"device"`
	// If something is currently playing, return `true`.
	IsPlaying bool `json:"is_playing"`
	// The currently playing track or episode. Can be `null`.
	Item MePlayerGetStateResponseItemUnion `json:"item"`
	// Progress into the currently playing track or episode. Can be `null`.
	ProgressMs int64 `json:"progress_ms"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// off, track, context
	RepeatState string `json:"repeat_state"`
	// If shuffle is on or off.
	ShuffleState bool `json:"shuffle_state"`
	// Unix Millisecond Timestamp when playback state was last changed (play, pause,
	// skip, scrub, new song, etc.).
	Timestamp int64 `json:"timestamp"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Actions              respjson.Field
		Context              respjson.Field
		CurrentlyPlayingType respjson.Field
		Device               respjson.Field
		IsPlaying            respjson.Field
		Item                 respjson.Field
		ProgressMs           respjson.Field
		Published            respjson.Field
		RepeatState          respjson.Field
		ShuffleState         respjson.Field
		Timestamp            respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MePlayerGetStateResponse) RawJSON

func (r MePlayerGetStateResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*MePlayerGetStateResponse) UnmarshalJSON

func (r *MePlayerGetStateResponse) UnmarshalJSON(data []byte) error

type MePlayerGetStateResponseActions

type MePlayerGetStateResponseActions struct {
	// Interrupting playback. Optional field.
	InterruptingPlayback bool `json:"interrupting_playback"`
	// Pausing. Optional field.
	Pausing bool `json:"pausing"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// Resuming. Optional field.
	Resuming bool `json:"resuming"`
	// Seeking playback location. Optional field.
	Seeking bool `json:"seeking"`
	// Skipping to the next context. Optional field.
	SkippingNext bool `json:"skipping_next"`
	// Skipping to the previous context. Optional field.
	SkippingPrev bool `json:"skipping_prev"`
	// Toggling repeat context flag. Optional field.
	TogglingRepeatContext bool `json:"toggling_repeat_context"`
	// Toggling repeat track flag. Optional field.
	TogglingRepeatTrack bool `json:"toggling_repeat_track"`
	// Toggling shuffle flag. Optional field.
	TogglingShuffle bool `json:"toggling_shuffle"`
	// Transfering playback between devices. Optional field.
	TransferringPlayback bool `json:"transferring_playback"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		InterruptingPlayback  respjson.Field
		Pausing               respjson.Field
		Published             respjson.Field
		Resuming              respjson.Field
		Seeking               respjson.Field
		SkippingNext          respjson.Field
		SkippingPrev          respjson.Field
		TogglingRepeatContext respjson.Field
		TogglingRepeatTrack   respjson.Field
		TogglingShuffle       respjson.Field
		TransferringPlayback  respjson.Field
		ExtraFields           map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Allows to update the user interface based on which playback actions are available within the current context.

func (MePlayerGetStateResponseActions) RawJSON

Returns the unmodified JSON received from the API

func (*MePlayerGetStateResponseActions) UnmarshalJSON

func (r *MePlayerGetStateResponseActions) UnmarshalJSON(data []byte) error

type MePlayerGetStateResponseItemUnion

type MePlayerGetStateResponseItemUnion struct {
	ID string `json:"id"`
	// This field is from variant [shared.TrackObject].
	Album shared.TrackObjectAlbum `json:"album"`
	// This field is from variant [shared.TrackObject].
	Artists []shared.SimplifiedArtistObject `json:"artists"`
	// This field is from variant [shared.TrackObject].
	AvailableMarkets []string `json:"available_markets"`
	// This field is from variant [shared.TrackObject].
	DiscNumber int64 `json:"disc_number"`
	DurationMs int64 `json:"duration_ms"`
	Explicit   bool  `json:"explicit"`
	// This field is from variant [shared.TrackObject].
	ExternalIDs shared.ExternalIDObject `json:"external_ids"`
	// This field is from variant [shared.TrackObject].
	ExternalURLs shared.ExternalURLObject `json:"external_urls"`
	Href         string                   `json:"href"`
	// This field is from variant [shared.TrackObject].
	IsLocal    bool `json:"is_local"`
	IsPlayable bool `json:"is_playable"`
	// This field is from variant [shared.TrackObject].
	LinkedFrom shared.LinkedTrackObject `json:"linked_from"`
	Name       string                   `json:"name"`
	// This field is from variant [shared.TrackObject].
	Popularity int64 `json:"popularity"`
	// This field is from variant [shared.TrackObject].
	PreviewURL string `json:"preview_url"`
	Published  bool   `json:"published"`
	// This field is a union of [shared.TrackRestrictionObject],
	// [shared.EpisodeRestrictionObject]
	Restrictions MePlayerGetStateResponseItemUnionRestrictions `json:"restrictions"`
	// This field is from variant [shared.TrackObject].
	TrackNumber int64 `json:"track_number"`
	// Any of "track", "episode".
	Type string `json:"type"`
	Uri  string `json:"uri"`
	// This field is from variant [shared.EpisodeObject].
	AudioPreviewURL string `json:"audio_preview_url"`
	// This field is from variant [shared.EpisodeObject].
	Description string `json:"description"`
	// This field is from variant [shared.EpisodeObject].
	HTMLDescription string `json:"html_description"`
	// This field is from variant [shared.EpisodeObject].
	Images []shared.ImageObject `json:"images"`
	// This field is from variant [shared.EpisodeObject].
	IsExternallyHosted bool `json:"is_externally_hosted"`
	// This field is from variant [shared.EpisodeObject].
	Languages []string `json:"languages"`
	// This field is from variant [shared.EpisodeObject].
	ReleaseDate string `json:"release_date"`
	// This field is from variant [shared.EpisodeObject].
	ReleaseDatePrecision shared.EpisodeObjectReleaseDatePrecision `json:"release_date_precision"`
	// This field is from variant [shared.EpisodeObject].
	Show shared.ShowBase `json:"show"`
	// This field is from variant [shared.EpisodeObject].
	Language string `json:"language"`
	// This field is from variant [shared.EpisodeObject].
	ResumePoint shared.ResumePointObject `json:"resume_point"`
	JSON        struct {
		ID                   respjson.Field
		Album                respjson.Field
		Artists              respjson.Field
		AvailableMarkets     respjson.Field
		DiscNumber           respjson.Field
		DurationMs           respjson.Field
		Explicit             respjson.Field
		ExternalIDs          respjson.Field
		ExternalURLs         respjson.Field
		Href                 respjson.Field
		IsLocal              respjson.Field
		IsPlayable           respjson.Field
		LinkedFrom           respjson.Field
		Name                 respjson.Field
		Popularity           respjson.Field
		PreviewURL           respjson.Field
		Published            respjson.Field
		Restrictions         respjson.Field
		TrackNumber          respjson.Field
		Type                 respjson.Field
		Uri                  respjson.Field
		AudioPreviewURL      respjson.Field
		Description          respjson.Field
		HTMLDescription      respjson.Field
		Images               respjson.Field
		IsExternallyHosted   respjson.Field
		Languages            respjson.Field
		ReleaseDate          respjson.Field
		ReleaseDatePrecision respjson.Field
		Show                 respjson.Field
		Language             respjson.Field
		ResumePoint          respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

MePlayerGetStateResponseItemUnion contains all possible properties and values from shared.TrackObject, shared.EpisodeObject.

Use the MePlayerGetStateResponseItemUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (MePlayerGetStateResponseItemUnion) AsAny

func (u MePlayerGetStateResponseItemUnion) AsAny() anyMePlayerGetStateResponseItem

Use the following switch statement to find the correct variant

switch variant := MePlayerGetStateResponseItemUnion.AsAny().(type) {
case shared.TrackObject:
case shared.EpisodeObject:
default:
  fmt.Errorf("no variant present")
}

func (MePlayerGetStateResponseItemUnion) AsEpisode

func (MePlayerGetStateResponseItemUnion) AsTrack

func (MePlayerGetStateResponseItemUnion) RawJSON

Returns the unmodified JSON received from the API

func (*MePlayerGetStateResponseItemUnion) UnmarshalJSON

func (r *MePlayerGetStateResponseItemUnion) UnmarshalJSON(data []byte) error

type MePlayerGetStateResponseItemUnionRestrictions

type MePlayerGetStateResponseItemUnionRestrictions struct {
	Published bool   `json:"published"`
	Reason    string `json:"reason"`
	JSON      struct {
		Published respjson.Field
		Reason    respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

MePlayerGetStateResponseItemUnionRestrictions is an implicit subunion of MePlayerGetStateResponseItemUnion. MePlayerGetStateResponseItemUnionRestrictions provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the MePlayerGetStateResponseItemUnion.

func (*MePlayerGetStateResponseItemUnionRestrictions) UnmarshalJSON

func (r *MePlayerGetStateResponseItemUnionRestrictions) UnmarshalJSON(data []byte) error

type MePlayerListRecentlyPlayedParams

type MePlayerListRecentlyPlayedParams struct {
	// A Unix timestamp in milliseconds. Returns all items after (but not including)
	// this cursor position. If `after` is specified, `before` must not be specified.
	After param.Opt[int64] `query:"after,omitzero" json:"-"`
	// A Unix timestamp in milliseconds. Returns all items before (but not including)
	// this cursor position. If `before` is specified, `after` must not be specified.
	Before param.Opt[int64] `query:"before,omitzero" json:"-"`
	// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MePlayerListRecentlyPlayedParams) URLQuery

func (r MePlayerListRecentlyPlayedParams) URLQuery() (v url.Values, err error)

URLQuery serializes MePlayerListRecentlyPlayedParams's query parameters as `url.Values`.

type MePlayerListRecentlyPlayedResponse

type MePlayerListRecentlyPlayedResponse struct {
	// The context the track was played from.
	Context ContextObject `json:"context"`
	// The date and time the track was played.
	PlayedAt time.Time `json:"played_at" format:"date-time"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// The track the user listened to.
	Track shared.TrackObject `json:"track"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Context     respjson.Field
		PlayedAt    respjson.Field
		Published   respjson.Field
		Track       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MePlayerListRecentlyPlayedResponse) RawJSON

Returns the unmodified JSON received from the API

func (*MePlayerListRecentlyPlayedResponse) UnmarshalJSON

func (r *MePlayerListRecentlyPlayedResponse) UnmarshalJSON(data []byte) error

type MePlayerPausePlaybackParams

type MePlayerPausePlaybackParams struct {
	// The id of the device this command is targeting. If not supplied, the user's
	// currently active device is the target.
	DeviceID param.Opt[string] `query:"device_id,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MePlayerPausePlaybackParams) URLQuery

func (r MePlayerPausePlaybackParams) URLQuery() (v url.Values, err error)

URLQuery serializes MePlayerPausePlaybackParams's query parameters as `url.Values`.

type MePlayerQueueAddParams

type MePlayerQueueAddParams struct {
	// The uri of the item to add to the queue. Must be a track or an episode uri.
	Uri string `query:"uri,required" json:"-"`
	// The id of the device this command is targeting. If not supplied, the user's
	// currently active device is the target.
	DeviceID param.Opt[string] `query:"device_id,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MePlayerQueueAddParams) URLQuery

func (r MePlayerQueueAddParams) URLQuery() (v url.Values, err error)

URLQuery serializes MePlayerQueueAddParams's query parameters as `url.Values`.

type MePlayerQueueGetResponse

type MePlayerQueueGetResponse struct {
	// The currently playing track or episode. Can be `null`.
	CurrentlyPlaying MePlayerQueueGetResponseCurrentlyPlayingUnion `json:"currently_playing"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// The tracks or episodes in the queue. Can be empty.
	Queue []MePlayerQueueGetResponseQueueUnion `json:"queue"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CurrentlyPlaying respjson.Field
		Published        respjson.Field
		Queue            respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MePlayerQueueGetResponse) RawJSON

func (r MePlayerQueueGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*MePlayerQueueGetResponse) UnmarshalJSON

func (r *MePlayerQueueGetResponse) UnmarshalJSON(data []byte) error

type MePlayerQueueGetResponseCurrentlyPlayingUnion

type MePlayerQueueGetResponseCurrentlyPlayingUnion struct {
	ID string `json:"id"`
	// This field is from variant [shared.TrackObject].
	Album shared.TrackObjectAlbum `json:"album"`
	// This field is from variant [shared.TrackObject].
	Artists []shared.SimplifiedArtistObject `json:"artists"`
	// This field is from variant [shared.TrackObject].
	AvailableMarkets []string `json:"available_markets"`
	// This field is from variant [shared.TrackObject].
	DiscNumber int64 `json:"disc_number"`
	DurationMs int64 `json:"duration_ms"`
	Explicit   bool  `json:"explicit"`
	// This field is from variant [shared.TrackObject].
	ExternalIDs shared.ExternalIDObject `json:"external_ids"`
	// This field is from variant [shared.TrackObject].
	ExternalURLs shared.ExternalURLObject `json:"external_urls"`
	Href         string                   `json:"href"`
	// This field is from variant [shared.TrackObject].
	IsLocal    bool `json:"is_local"`
	IsPlayable bool `json:"is_playable"`
	// This field is from variant [shared.TrackObject].
	LinkedFrom shared.LinkedTrackObject `json:"linked_from"`
	Name       string                   `json:"name"`
	// This field is from variant [shared.TrackObject].
	Popularity int64 `json:"popularity"`
	// This field is from variant [shared.TrackObject].
	PreviewURL string `json:"preview_url"`
	Published  bool   `json:"published"`
	// This field is a union of [shared.TrackRestrictionObject],
	// [shared.EpisodeRestrictionObject]
	Restrictions MePlayerQueueGetResponseCurrentlyPlayingUnionRestrictions `json:"restrictions"`
	// This field is from variant [shared.TrackObject].
	TrackNumber int64 `json:"track_number"`
	// Any of "track", "episode".
	Type string `json:"type"`
	Uri  string `json:"uri"`
	// This field is from variant [shared.EpisodeObject].
	AudioPreviewURL string `json:"audio_preview_url"`
	// This field is from variant [shared.EpisodeObject].
	Description string `json:"description"`
	// This field is from variant [shared.EpisodeObject].
	HTMLDescription string `json:"html_description"`
	// This field is from variant [shared.EpisodeObject].
	Images []shared.ImageObject `json:"images"`
	// This field is from variant [shared.EpisodeObject].
	IsExternallyHosted bool `json:"is_externally_hosted"`
	// This field is from variant [shared.EpisodeObject].
	Languages []string `json:"languages"`
	// This field is from variant [shared.EpisodeObject].
	ReleaseDate string `json:"release_date"`
	// This field is from variant [shared.EpisodeObject].
	ReleaseDatePrecision shared.EpisodeObjectReleaseDatePrecision `json:"release_date_precision"`
	// This field is from variant [shared.EpisodeObject].
	Show shared.ShowBase `json:"show"`
	// This field is from variant [shared.EpisodeObject].
	Language string `json:"language"`
	// This field is from variant [shared.EpisodeObject].
	ResumePoint shared.ResumePointObject `json:"resume_point"`
	JSON        struct {
		ID                   respjson.Field
		Album                respjson.Field
		Artists              respjson.Field
		AvailableMarkets     respjson.Field
		DiscNumber           respjson.Field
		DurationMs           respjson.Field
		Explicit             respjson.Field
		ExternalIDs          respjson.Field
		ExternalURLs         respjson.Field
		Href                 respjson.Field
		IsLocal              respjson.Field
		IsPlayable           respjson.Field
		LinkedFrom           respjson.Field
		Name                 respjson.Field
		Popularity           respjson.Field
		PreviewURL           respjson.Field
		Published            respjson.Field
		Restrictions         respjson.Field
		TrackNumber          respjson.Field
		Type                 respjson.Field
		Uri                  respjson.Field
		AudioPreviewURL      respjson.Field
		Description          respjson.Field
		HTMLDescription      respjson.Field
		Images               respjson.Field
		IsExternallyHosted   respjson.Field
		Languages            respjson.Field
		ReleaseDate          respjson.Field
		ReleaseDatePrecision respjson.Field
		Show                 respjson.Field
		Language             respjson.Field
		ResumePoint          respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

MePlayerQueueGetResponseCurrentlyPlayingUnion contains all possible properties and values from shared.TrackObject, shared.EpisodeObject.

Use the MePlayerQueueGetResponseCurrentlyPlayingUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (MePlayerQueueGetResponseCurrentlyPlayingUnion) AsAny

func (u MePlayerQueueGetResponseCurrentlyPlayingUnion) AsAny() anyMePlayerQueueGetResponseCurrentlyPlaying

Use the following switch statement to find the correct variant

switch variant := MePlayerQueueGetResponseCurrentlyPlayingUnion.AsAny().(type) {
case shared.TrackObject:
case shared.EpisodeObject:
default:
  fmt.Errorf("no variant present")
}

func (MePlayerQueueGetResponseCurrentlyPlayingUnion) AsEpisode

func (MePlayerQueueGetResponseCurrentlyPlayingUnion) AsTrack

func (MePlayerQueueGetResponseCurrentlyPlayingUnion) RawJSON

Returns the unmodified JSON received from the API

func (*MePlayerQueueGetResponseCurrentlyPlayingUnion) UnmarshalJSON

func (r *MePlayerQueueGetResponseCurrentlyPlayingUnion) UnmarshalJSON(data []byte) error

type MePlayerQueueGetResponseCurrentlyPlayingUnionRestrictions

type MePlayerQueueGetResponseCurrentlyPlayingUnionRestrictions struct {
	Published bool   `json:"published"`
	Reason    string `json:"reason"`
	JSON      struct {
		Published respjson.Field
		Reason    respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

MePlayerQueueGetResponseCurrentlyPlayingUnionRestrictions is an implicit subunion of MePlayerQueueGetResponseCurrentlyPlayingUnion. MePlayerQueueGetResponseCurrentlyPlayingUnionRestrictions provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the MePlayerQueueGetResponseCurrentlyPlayingUnion.

func (*MePlayerQueueGetResponseCurrentlyPlayingUnionRestrictions) UnmarshalJSON

type MePlayerQueueGetResponseQueueUnion

type MePlayerQueueGetResponseQueueUnion struct {
	ID string `json:"id"`
	// This field is from variant [shared.TrackObject].
	Album shared.TrackObjectAlbum `json:"album"`
	// This field is from variant [shared.TrackObject].
	Artists []shared.SimplifiedArtistObject `json:"artists"`
	// This field is from variant [shared.TrackObject].
	AvailableMarkets []string `json:"available_markets"`
	// This field is from variant [shared.TrackObject].
	DiscNumber int64 `json:"disc_number"`
	DurationMs int64 `json:"duration_ms"`
	Explicit   bool  `json:"explicit"`
	// This field is from variant [shared.TrackObject].
	ExternalIDs shared.ExternalIDObject `json:"external_ids"`
	// This field is from variant [shared.TrackObject].
	ExternalURLs shared.ExternalURLObject `json:"external_urls"`
	Href         string                   `json:"href"`
	// This field is from variant [shared.TrackObject].
	IsLocal    bool `json:"is_local"`
	IsPlayable bool `json:"is_playable"`
	// This field is from variant [shared.TrackObject].
	LinkedFrom shared.LinkedTrackObject `json:"linked_from"`
	Name       string                   `json:"name"`
	// This field is from variant [shared.TrackObject].
	Popularity int64 `json:"popularity"`
	// This field is from variant [shared.TrackObject].
	PreviewURL string `json:"preview_url"`
	Published  bool   `json:"published"`
	// This field is a union of [shared.TrackRestrictionObject],
	// [shared.EpisodeRestrictionObject]
	Restrictions MePlayerQueueGetResponseQueueUnionRestrictions `json:"restrictions"`
	// This field is from variant [shared.TrackObject].
	TrackNumber int64 `json:"track_number"`
	// Any of "track", "episode".
	Type string `json:"type"`
	Uri  string `json:"uri"`
	// This field is from variant [shared.EpisodeObject].
	AudioPreviewURL string `json:"audio_preview_url"`
	// This field is from variant [shared.EpisodeObject].
	Description string `json:"description"`
	// This field is from variant [shared.EpisodeObject].
	HTMLDescription string `json:"html_description"`
	// This field is from variant [shared.EpisodeObject].
	Images []shared.ImageObject `json:"images"`
	// This field is from variant [shared.EpisodeObject].
	IsExternallyHosted bool `json:"is_externally_hosted"`
	// This field is from variant [shared.EpisodeObject].
	Languages []string `json:"languages"`
	// This field is from variant [shared.EpisodeObject].
	ReleaseDate string `json:"release_date"`
	// This field is from variant [shared.EpisodeObject].
	ReleaseDatePrecision shared.EpisodeObjectReleaseDatePrecision `json:"release_date_precision"`
	// This field is from variant [shared.EpisodeObject].
	Show shared.ShowBase `json:"show"`
	// This field is from variant [shared.EpisodeObject].
	Language string `json:"language"`
	// This field is from variant [shared.EpisodeObject].
	ResumePoint shared.ResumePointObject `json:"resume_point"`
	JSON        struct {
		ID                   respjson.Field
		Album                respjson.Field
		Artists              respjson.Field
		AvailableMarkets     respjson.Field
		DiscNumber           respjson.Field
		DurationMs           respjson.Field
		Explicit             respjson.Field
		ExternalIDs          respjson.Field
		ExternalURLs         respjson.Field
		Href                 respjson.Field
		IsLocal              respjson.Field
		IsPlayable           respjson.Field
		LinkedFrom           respjson.Field
		Name                 respjson.Field
		Popularity           respjson.Field
		PreviewURL           respjson.Field
		Published            respjson.Field
		Restrictions         respjson.Field
		TrackNumber          respjson.Field
		Type                 respjson.Field
		Uri                  respjson.Field
		AudioPreviewURL      respjson.Field
		Description          respjson.Field
		HTMLDescription      respjson.Field
		Images               respjson.Field
		IsExternallyHosted   respjson.Field
		Languages            respjson.Field
		ReleaseDate          respjson.Field
		ReleaseDatePrecision respjson.Field
		Show                 respjson.Field
		Language             respjson.Field
		ResumePoint          respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

MePlayerQueueGetResponseQueueUnion contains all possible properties and values from shared.TrackObject, shared.EpisodeObject.

Use the MePlayerQueueGetResponseQueueUnion.AsAny method to switch on the variant.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (MePlayerQueueGetResponseQueueUnion) AsAny

func (u MePlayerQueueGetResponseQueueUnion) AsAny() anyMePlayerQueueGetResponseQueue

Use the following switch statement to find the correct variant

switch variant := MePlayerQueueGetResponseQueueUnion.AsAny().(type) {
case shared.TrackObject:
case shared.EpisodeObject:
default:
  fmt.Errorf("no variant present")
}

func (MePlayerQueueGetResponseQueueUnion) AsEpisode

func (MePlayerQueueGetResponseQueueUnion) AsTrack

func (MePlayerQueueGetResponseQueueUnion) RawJSON

Returns the unmodified JSON received from the API

func (*MePlayerQueueGetResponseQueueUnion) UnmarshalJSON

func (r *MePlayerQueueGetResponseQueueUnion) UnmarshalJSON(data []byte) error

type MePlayerQueueGetResponseQueueUnionRestrictions

type MePlayerQueueGetResponseQueueUnionRestrictions struct {
	Published bool   `json:"published"`
	Reason    string `json:"reason"`
	JSON      struct {
		Published respjson.Field
		Reason    respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

MePlayerQueueGetResponseQueueUnionRestrictions is an implicit subunion of MePlayerQueueGetResponseQueueUnion. MePlayerQueueGetResponseQueueUnionRestrictions provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the MePlayerQueueGetResponseQueueUnion.

func (*MePlayerQueueGetResponseQueueUnionRestrictions) UnmarshalJSON

type MePlayerQueueService

type MePlayerQueueService struct {
	Options []option.RequestOption
}

MePlayerQueueService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMePlayerQueueService method instead.

func NewMePlayerQueueService

func NewMePlayerQueueService(opts ...option.RequestOption) (r MePlayerQueueService)

NewMePlayerQueueService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*MePlayerQueueService) Add

Add an item to be played next in the user's current playback queue. This API only works for users who have Spotify Premium. The order of execution is not guaranteed when you use this API with other Player API endpoints.

func (*MePlayerQueueService) Get

Get the list of objects that make up the user's queue.

type MePlayerSeekToPositionParams

type MePlayerSeekToPositionParams struct {
	// The position in milliseconds to seek to. Must be a positive number. Passing in a
	// position that is greater than the length of the track will cause the player to
	// start playing the next song.
	PositionMs int64 `query:"position_ms,required" json:"-"`
	// The id of the device this command is targeting. If not supplied, the user's
	// currently active device is the target.
	DeviceID param.Opt[string] `query:"device_id,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MePlayerSeekToPositionParams) URLQuery

func (r MePlayerSeekToPositionParams) URLQuery() (v url.Values, err error)

URLQuery serializes MePlayerSeekToPositionParams's query parameters as `url.Values`.

type MePlayerService

type MePlayerService struct {
	Options []option.RequestOption
	Queue   MePlayerQueueService
}

MePlayerService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMePlayerService method instead.

func NewMePlayerService

func NewMePlayerService(opts ...option.RequestOption) (r MePlayerService)

NewMePlayerService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*MePlayerService) GetCurrentlyPlaying

Get the object currently being played on the user's Spotify account.

func (*MePlayerService) GetDevices

func (r *MePlayerService) GetDevices(ctx context.Context, opts ...option.RequestOption) (res *MePlayerGetDevicesResponse, err error)

Get information about a user’s available Spotify Connect devices. Some device models are not supported and will not be listed in the API response.

func (*MePlayerService) GetState

Get information about the user’s current playback state, including track or episode, progress, and active device.

func (*MePlayerService) ListRecentlyPlayed

Get tracks from the current user's recently played tracks. _**Note**: Currently doesn't support podcast episodes._

func (*MePlayerService) ListRecentlyPlayedAutoPaging

Get tracks from the current user's recently played tracks. _**Note**: Currently doesn't support podcast episodes._

func (*MePlayerService) PausePlayback

func (r *MePlayerService) PausePlayback(ctx context.Context, body MePlayerPausePlaybackParams, opts ...option.RequestOption) (err error)

Pause playback on the user's account. This API only works for users who have Spotify Premium. The order of execution is not guaranteed when you use this API with other Player API endpoints.

func (*MePlayerService) SeekToPosition

func (r *MePlayerService) SeekToPosition(ctx context.Context, body MePlayerSeekToPositionParams, opts ...option.RequestOption) (err error)

Seeks to the given position in the user’s currently playing track. This API only works for users who have Spotify Premium. The order of execution is not guaranteed when you use this API with other Player API endpoints.

func (*MePlayerService) SetRepeatMode

func (r *MePlayerService) SetRepeatMode(ctx context.Context, body MePlayerSetRepeatModeParams, opts ...option.RequestOption) (err error)

Set the repeat mode for the user's playback. This API only works for users who have Spotify Premium. The order of execution is not guaranteed when you use this API with other Player API endpoints.

func (*MePlayerService) SetVolume

func (r *MePlayerService) SetVolume(ctx context.Context, body MePlayerSetVolumeParams, opts ...option.RequestOption) (err error)

Set the volume for the user’s current playback device. This API only works for users who have Spotify Premium. The order of execution is not guaranteed when you use this API with other Player API endpoints.

func (*MePlayerService) SkipNext

func (r *MePlayerService) SkipNext(ctx context.Context, body MePlayerSkipNextParams, opts ...option.RequestOption) (err error)

Skips to next track in the user’s queue. This API only works for users who have Spotify Premium. The order of execution is not guaranteed when you use this API with other Player API endpoints.

func (*MePlayerService) SkipPrevious

func (r *MePlayerService) SkipPrevious(ctx context.Context, body MePlayerSkipPreviousParams, opts ...option.RequestOption) (err error)

Skips to previous track in the user’s queue. This API only works for users who have Spotify Premium. The order of execution is not guaranteed when you use this API with other Player API endpoints.

func (*MePlayerService) StartPlayback

func (r *MePlayerService) StartPlayback(ctx context.Context, params MePlayerStartPlaybackParams, opts ...option.RequestOption) (err error)

Start a new context or resume current playback on the user's active device. This API only works for users who have Spotify Premium. The order of execution is not guaranteed when you use this API with other Player API endpoints.

func (*MePlayerService) ToggleShuffle

func (r *MePlayerService) ToggleShuffle(ctx context.Context, body MePlayerToggleShuffleParams, opts ...option.RequestOption) (err error)

Toggle shuffle on or off for user’s playback. This API only works for users who have Spotify Premium. The order of execution is not guaranteed when you use this API with other Player API endpoints.

func (*MePlayerService) Transfer

func (r *MePlayerService) Transfer(ctx context.Context, body MePlayerTransferParams, opts ...option.RequestOption) (err error)

Transfer playback to a new device and optionally begin playback. This API only works for users who have Spotify Premium. The order of execution is not guaranteed when you use this API with other Player API endpoints.

type MePlayerSetRepeatModeParams

type MePlayerSetRepeatModeParams struct {
	// **track**, **context** or **off**.<br/> **track** will repeat the current
	// track.<br/> **context** will repeat the current context.<br/> **off** will turn
	// repeat off.
	State string `query:"state,required" json:"-"`
	// The id of the device this command is targeting. If not supplied, the user's
	// currently active device is the target.
	DeviceID param.Opt[string] `query:"device_id,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MePlayerSetRepeatModeParams) URLQuery

func (r MePlayerSetRepeatModeParams) URLQuery() (v url.Values, err error)

URLQuery serializes MePlayerSetRepeatModeParams's query parameters as `url.Values`.

type MePlayerSetVolumeParams

type MePlayerSetVolumeParams struct {
	// The volume to set. Must be a value from 0 to 100 inclusive.
	VolumePercent int64 `query:"volume_percent,required" json:"-"`
	// The id of the device this command is targeting. If not supplied, the user's
	// currently active device is the target.
	DeviceID param.Opt[string] `query:"device_id,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MePlayerSetVolumeParams) URLQuery

func (r MePlayerSetVolumeParams) URLQuery() (v url.Values, err error)

URLQuery serializes MePlayerSetVolumeParams's query parameters as `url.Values`.

type MePlayerSkipNextParams

type MePlayerSkipNextParams struct {
	// The id of the device this command is targeting. If not supplied, the user's
	// currently active device is the target.
	DeviceID param.Opt[string] `query:"device_id,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MePlayerSkipNextParams) URLQuery

func (r MePlayerSkipNextParams) URLQuery() (v url.Values, err error)

URLQuery serializes MePlayerSkipNextParams's query parameters as `url.Values`.

type MePlayerSkipPreviousParams

type MePlayerSkipPreviousParams struct {
	// The id of the device this command is targeting. If not supplied, the user's
	// currently active device is the target.
	DeviceID param.Opt[string] `query:"device_id,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MePlayerSkipPreviousParams) URLQuery

func (r MePlayerSkipPreviousParams) URLQuery() (v url.Values, err error)

URLQuery serializes MePlayerSkipPreviousParams's query parameters as `url.Values`.

type MePlayerStartPlaybackParams

type MePlayerStartPlaybackParams struct {
	// The id of the device this command is targeting. If not supplied, the user's
	// currently active device is the target.
	DeviceID param.Opt[string] `query:"device_id,omitzero" json:"-"`
	// Optional. Spotify URI of the context to play. Valid contexts are albums, artists
	// & playlists. `{context_uri:"spotify:album:1Je1IMUlBXcx1Fz0WE7oPT"}`
	ContextUri param.Opt[string] `json:"context_uri,omitzero"`
	// Indicates from what position to start playback. Must be a positive number.
	// Passing in a position that is greater than the length of the track will cause
	// the player to start playing the next song.
	PositionMs param.Opt[int64] `json:"position_ms,omitzero"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published param.Opt[bool] `json:"published,omitzero"`
	// Optional. Indicates from where in the context playback should start. Only
	// available when context_uri corresponds to an album or playlist object "position"
	// is zero based and can’t be negative. Example: `"offset": {"position": 5}` "uri"
	// is a string representing the uri of the item to start at. Example:
	// `"offset": {"uri": "spotify:track:1301WleyT98MSxVHPZCA6M"}`
	Offset map[string]any `json:"offset,omitzero"`
	// Optional. A JSON array of the Spotify track URIs to play. For example:
	// `{"uris": ["spotify:track:4iV5W9uYEdYUVa79Axb7Rh", "spotify:track:1301WleyT98MSxVHPZCA6M"]}`
	Uris []string `json:"uris,omitzero"`
	// contains filtered or unexported fields
}

func (MePlayerStartPlaybackParams) MarshalJSON

func (r MePlayerStartPlaybackParams) MarshalJSON() (data []byte, err error)

func (MePlayerStartPlaybackParams) URLQuery

func (r MePlayerStartPlaybackParams) URLQuery() (v url.Values, err error)

URLQuery serializes MePlayerStartPlaybackParams's query parameters as `url.Values`.

func (*MePlayerStartPlaybackParams) UnmarshalJSON

func (r *MePlayerStartPlaybackParams) UnmarshalJSON(data []byte) error

type MePlayerToggleShuffleParams

type MePlayerToggleShuffleParams struct {
	// **true** : Shuffle user's playback.<br/> **false** : Do not shuffle user's
	// playback.
	State bool `query:"state,required" json:"-"`
	// The id of the device this command is targeting. If not supplied, the user's
	// currently active device is the target.
	DeviceID param.Opt[string] `query:"device_id,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MePlayerToggleShuffleParams) URLQuery

func (r MePlayerToggleShuffleParams) URLQuery() (v url.Values, err error)

URLQuery serializes MePlayerToggleShuffleParams's query parameters as `url.Values`.

type MePlayerTransferParams

type MePlayerTransferParams struct {
	// A JSON array containing the ID of the device on which playback should be
	// started/transferred.<br/>For
	// example:`{device_ids:["74ASZWbe4lXaubB36ztrGX"]}`<br/>_**Note**: Although an
	// array is accepted, only a single device_id is currently supported. Supplying
	// more than one will return `400 Bad Request`_
	DeviceIDs []string `json:"device_ids,omitzero,required"`
	// **true**: ensure playback happens on new device.<br/>**false** or not provided:
	// keep the current playback state.
	Play param.Opt[bool] `json:"play,omitzero"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published param.Opt[bool] `json:"published,omitzero"`
	// contains filtered or unexported fields
}

func (MePlayerTransferParams) MarshalJSON

func (r MePlayerTransferParams) MarshalJSON() (data []byte, err error)

func (*MePlayerTransferParams) UnmarshalJSON

func (r *MePlayerTransferParams) UnmarshalJSON(data []byte) error

type MePlaylistListParams

type MePlaylistListParams struct {
	// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// 'The index of the first playlist to return. Default: 0 (the first object).
	// Maximum offset: 100.000\. Use with `limit` to get the next set of playlists.'
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MePlaylistListParams) URLQuery

func (r MePlaylistListParams) URLQuery() (v url.Values, err error)

URLQuery serializes MePlaylistListParams's query parameters as `url.Values`.

type MePlaylistService

type MePlaylistService struct {
	Options []option.RequestOption
}

MePlaylistService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMePlaylistService method instead.

func NewMePlaylistService

func NewMePlaylistService(opts ...option.RequestOption) (r MePlaylistService)

NewMePlaylistService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*MePlaylistService) List

Get a list of the playlists owned or followed by the current Spotify user.

func (*MePlaylistService) ListAutoPaging

Get a list of the playlists owned or followed by the current Spotify user.

type MeService

type MeService struct {
	Options    []option.RequestOption
	Audiobooks MeAudiobookService
	Playlists  MePlaylistService
	Top        MeTopService
	Albums     MeAlbumService
	Tracks     MeTrackService
	Episodes   MeEpisodeService
	Shows      MeShowService
	Following  MeFollowingService
	Player     MePlayerService
}

MeService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMeService method instead.

func NewMeService

func NewMeService(opts ...option.RequestOption) (r MeService)

NewMeService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*MeService) Get

func (r *MeService) Get(ctx context.Context, opts ...option.RequestOption) (res *MeGetResponse, err error)

Get detailed profile information about the current user (including the current user's username).

type MeShowCheckParams

type MeShowCheckParams struct {
	// A comma-separated list of the
	// [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids) for the shows.
	// Maximum: 50 IDs.
	IDs string `query:"ids,required" json:"-"`
	// contains filtered or unexported fields
}

func (MeShowCheckParams) URLQuery

func (r MeShowCheckParams) URLQuery() (v url.Values, err error)

URLQuery serializes MeShowCheckParams's query parameters as `url.Values`.

type MeShowListParams

type MeShowListParams struct {
	// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// The index of the first item to return. Default: 0 (the first item). Use with
	// limit to get the next set of items.
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MeShowListParams) URLQuery

func (r MeShowListParams) URLQuery() (v url.Values, err error)

URLQuery serializes MeShowListParams's query parameters as `url.Values`.

type MeShowListResponse

type MeShowListResponse struct {
	// The date and time the show was saved. Timestamps are returned in ISO 8601 format
	// as Coordinated Universal Time (UTC) with a zero offset: YYYY-MM-DDTHH:MM:SSZ. If
	// the time is imprecise (for example, the date/time of an album release), an
	// additional field indicates the precision; see for example, release_date in an
	// album object.
	AddedAt time.Time `json:"added_at" format:"date-time"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// Information about the show.
	Show shared.ShowBase `json:"show"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AddedAt     respjson.Field
		Published   respjson.Field
		Show        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MeShowListResponse) RawJSON

func (r MeShowListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*MeShowListResponse) UnmarshalJSON

func (r *MeShowListResponse) UnmarshalJSON(data []byte) error

type MeShowRemoveParams

type MeShowRemoveParams struct {
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published param.Opt[bool] `json:"published,omitzero"`
	// A JSON array of the
	// [Spotify IDs](https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids).
	// A maximum of 50 items can be specified in one request. _Note: if the `ids`
	// parameter is present in the query string, any IDs listed here in the body will
	// be ignored._
	IDs []string `json:"ids,omitzero"`
	// contains filtered or unexported fields
}

func (MeShowRemoveParams) MarshalJSON

func (r MeShowRemoveParams) MarshalJSON() (data []byte, err error)

func (*MeShowRemoveParams) UnmarshalJSON

func (r *MeShowRemoveParams) UnmarshalJSON(data []byte) error

type MeShowSaveParams

type MeShowSaveParams struct {
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published param.Opt[bool] `json:"published,omitzero"`
	// A JSON array of the
	// [Spotify IDs](https://developer.spotify.com/documentation/web-api/#spotify-uris-and-ids).
	// A maximum of 50 items can be specified in one request. _Note: if the `ids`
	// parameter is present in the query string, any IDs listed here in the body will
	// be ignored._
	IDs []string `json:"ids,omitzero"`
	// contains filtered or unexported fields
}

func (MeShowSaveParams) MarshalJSON

func (r MeShowSaveParams) MarshalJSON() (data []byte, err error)

func (*MeShowSaveParams) UnmarshalJSON

func (r *MeShowSaveParams) UnmarshalJSON(data []byte) error

type MeShowService

type MeShowService struct {
	Options []option.RequestOption
}

MeShowService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMeShowService method instead.

func NewMeShowService

func NewMeShowService(opts ...option.RequestOption) (r MeShowService)

NewMeShowService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*MeShowService) Check

func (r *MeShowService) Check(ctx context.Context, query MeShowCheckParams, opts ...option.RequestOption) (res *[]bool, err error)

Check if one or more shows is already saved in the current Spotify user's library.

func (*MeShowService) List

Get a list of shows saved in the current Spotify user's library. Optional parameters can be used to limit the number of shows returned.

func (*MeShowService) ListAutoPaging

Get a list of shows saved in the current Spotify user's library. Optional parameters can be used to limit the number of shows returned.

func (*MeShowService) Remove

func (r *MeShowService) Remove(ctx context.Context, body MeShowRemoveParams, opts ...option.RequestOption) (err error)

Delete one or more shows from current Spotify user's library.

func (*MeShowService) Save

func (r *MeShowService) Save(ctx context.Context, body MeShowSaveParams, opts ...option.RequestOption) (err error)

Save one or more shows to current Spotify user's library.

type MeTopListTopArtistsParams

type MeTopListTopArtistsParams struct {
	// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// The index of the first item to return. Default: 0 (the first item). Use with
	// limit to get the next set of items.
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// Over what time frame the affinities are computed. Valid values: `long_term`
	// (calculated from ~1 year of data and including all new data as it becomes
	// available), `medium_term` (approximately last 6 months), `short_term`
	// (approximately last 4 weeks). Default: `medium_term`
	TimeRange param.Opt[string] `query:"time_range,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MeTopListTopArtistsParams) URLQuery

func (r MeTopListTopArtistsParams) URLQuery() (v url.Values, err error)

URLQuery serializes MeTopListTopArtistsParams's query parameters as `url.Values`.

type MeTopListTopTracksParams

type MeTopListTopTracksParams struct {
	// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// The index of the first item to return. Default: 0 (the first item). Use with
	// limit to get the next set of items.
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// Over what time frame the affinities are computed. Valid values: `long_term`
	// (calculated from ~1 year of data and including all new data as it becomes
	// available), `medium_term` (approximately last 6 months), `short_term`
	// (approximately last 4 weeks). Default: `medium_term`
	TimeRange param.Opt[string] `query:"time_range,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MeTopListTopTracksParams) URLQuery

func (r MeTopListTopTracksParams) URLQuery() (v url.Values, err error)

URLQuery serializes MeTopListTopTracksParams's query parameters as `url.Values`.

type MeTopService

type MeTopService struct {
	Options []option.RequestOption
}

MeTopService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMeTopService method instead.

func NewMeTopService

func NewMeTopService(opts ...option.RequestOption) (r MeTopService)

NewMeTopService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*MeTopService) ListTopArtists

Get the current user's top artists based on calculated affinity.

func (*MeTopService) ListTopArtistsAutoPaging

Get the current user's top artists based on calculated affinity.

func (*MeTopService) ListTopTracks

Get the current user's top tracks based on calculated affinity.

func (*MeTopService) ListTopTracksAutoPaging

Get the current user's top tracks based on calculated affinity.

type MeTrackCheckParams

type MeTrackCheckParams struct {
	// A comma-separated list of the
	// [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
	// `ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M`. Maximum: 50 IDs.
	IDs string `query:"ids,required" json:"-"`
	// contains filtered or unexported fields
}

func (MeTrackCheckParams) URLQuery

func (r MeTrackCheckParams) URLQuery() (v url.Values, err error)

URLQuery serializes MeTrackCheckParams's query parameters as `url.Values`.

type MeTrackListParams

type MeTrackListParams struct {
	// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// An
	// [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// If a country code is specified, only content that is available in that market
	// will be returned.<br/> If a valid user access token is specified in the request
	// header, the country associated with the user account will take priority over
	// this parameter.<br/> _**Note**: If neither market or user country are provided,
	// the content is considered unavailable for the client._<br/> Users can view the
	// country that is associated with their account in the
	// [account settings](https://www.spotify.com/account/overview/).
	Market param.Opt[string] `query:"market,omitzero" json:"-"`
	// The index of the first item to return. Default: 0 (the first item). Use with
	// limit to get the next set of items.
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (MeTrackListParams) URLQuery

func (r MeTrackListParams) URLQuery() (v url.Values, err error)

URLQuery serializes MeTrackListParams's query parameters as `url.Values`.

type MeTrackListResponse

type MeTrackListResponse struct {
	// The date and time the track was saved. Timestamps are returned in ISO 8601
	// format as Coordinated Universal Time (UTC) with a zero offset:
	// YYYY-MM-DDTHH:MM:SSZ. If the time is imprecise (for example, the date/time of an
	// album release), an additional field indicates the precision; see for example,
	// release_date in an album object.
	AddedAt time.Time `json:"added_at" format:"date-time"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// Information about the track.
	Track shared.TrackObject `json:"track"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AddedAt     respjson.Field
		Published   respjson.Field
		Track       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MeTrackListResponse) RawJSON

func (r MeTrackListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*MeTrackListResponse) UnmarshalJSON

func (r *MeTrackListResponse) UnmarshalJSON(data []byte) error

type MeTrackRemoveParams

type MeTrackRemoveParams struct {
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published param.Opt[bool] `json:"published,omitzero"`
	// A JSON array of the
	// [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
	// `["4iV5W9uYEdYUVa79Axb7Rh", "1301WleyT98MSxVHPZCA6M"]`<br/>A maximum of 50 items
	// can be specified in one request. _**Note**: if the `ids` parameter is present in
	// the query string, any IDs listed here in the body will be ignored._
	IDs []string `json:"ids,omitzero"`
	// contains filtered or unexported fields
}

func (MeTrackRemoveParams) MarshalJSON

func (r MeTrackRemoveParams) MarshalJSON() (data []byte, err error)

func (*MeTrackRemoveParams) UnmarshalJSON

func (r *MeTrackRemoveParams) UnmarshalJSON(data []byte) error

type MeTrackSaveParams

type MeTrackSaveParams struct {
	// A JSON array of the
	// [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
	// `["4iV5W9uYEdYUVa79Axb7Rh", "1301WleyT98MSxVHPZCA6M"]`<br/>A maximum of 50 items
	// can be specified in one request. _**Note**: if the `timestamped_ids` is present
	// in the body, any IDs listed in the query parameters (deprecated) or the `ids`
	// field in the body will be ignored._
	IDs []string `json:"ids,omitzero,required"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published param.Opt[bool] `json:"published,omitzero"`
	// A JSON array of objects containing track IDs with their corresponding
	// timestamps. Each object must include a track ID and an `added_at` timestamp.
	// This allows you to specify when tracks were added to maintain a specific
	// chronological order in the user's library.<br/>A maximum of 50 items can be
	// specified in one request. _**Note**: if the `timestamped_ids` is present in the
	// body, any IDs listed in the query parameters (deprecated) or the `ids` field in
	// the body will be ignored._
	TimestampedIDs []MeTrackSaveParamsTimestampedID `json:"timestamped_ids,omitzero"`
	// contains filtered or unexported fields
}

func (MeTrackSaveParams) MarshalJSON

func (r MeTrackSaveParams) MarshalJSON() (data []byte, err error)

func (*MeTrackSaveParams) UnmarshalJSON

func (r *MeTrackSaveParams) UnmarshalJSON(data []byte) error

type MeTrackSaveParamsTimestampedID

type MeTrackSaveParamsTimestampedID struct {
	// The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the
	// track.
	ID string `json:"id,required"`
	// The timestamp when the track was added to the library. Use ISO 8601 format with
	// UTC timezone (e.g., `2023-01-15T14:30:00Z`). You can specify past timestamps to
	// insert tracks at specific positions in the library's chronological order. The
	// API uses minute-level granularity for ordering, though the timestamp supports
	// millisecond precision.
	AddedAt time.Time `json:"added_at,required" format:"date-time"`
	// contains filtered or unexported fields
}

The properties ID, AddedAt are required.

func (MeTrackSaveParamsTimestampedID) MarshalJSON

func (r MeTrackSaveParamsTimestampedID) MarshalJSON() (data []byte, err error)

func (*MeTrackSaveParamsTimestampedID) UnmarshalJSON

func (r *MeTrackSaveParamsTimestampedID) UnmarshalJSON(data []byte) error

type MeTrackService

type MeTrackService struct {
	Options []option.RequestOption
}

MeTrackService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMeTrackService method instead.

func NewMeTrackService

func NewMeTrackService(opts ...option.RequestOption) (r MeTrackService)

NewMeTrackService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*MeTrackService) Check

func (r *MeTrackService) Check(ctx context.Context, query MeTrackCheckParams, opts ...option.RequestOption) (res *[]bool, err error)

Check if one or more tracks is already saved in the current Spotify user's 'Your Music' library.

func (*MeTrackService) List

Get a list of the songs saved in the current Spotify user's 'Your Music' library.

func (*MeTrackService) ListAutoPaging

Get a list of the songs saved in the current Spotify user's 'Your Music' library.

func (*MeTrackService) Remove

func (r *MeTrackService) Remove(ctx context.Context, body MeTrackRemoveParams, opts ...option.RequestOption) (err error)

Remove one or more tracks from the current user's 'Your Music' library.

func (*MeTrackService) Save

func (r *MeTrackService) Save(ctx context.Context, body MeTrackSaveParams, opts ...option.RequestOption) (err error)

Save one or more tracks to the current user's 'Your Music' library.

type NarratorObject

type NarratorObject = shared.NarratorObject

This is an alias to an internal type.

type PagingPlaylistObject

type PagingPlaylistObject = shared.PagingPlaylistObject

This is an alias to an internal type.

type PlaylistFollowerCheckParams

type PlaylistFollowerCheckParams struct {
	// **Deprecated** A single item list containing current user's
	// [Spotify Username](/documentation/web-api/concepts/spotify-uris-ids). Maximum: 1
	// id.
	IDs param.Opt[string] `query:"ids,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (PlaylistFollowerCheckParams) URLQuery

func (r PlaylistFollowerCheckParams) URLQuery() (v url.Values, err error)

URLQuery serializes PlaylistFollowerCheckParams's query parameters as `url.Values`.

type PlaylistFollowerFollowParams

type PlaylistFollowerFollowParams struct {
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published param.Opt[bool] `json:"published,omitzero"`
	// contains filtered or unexported fields
}

func (PlaylistFollowerFollowParams) MarshalJSON

func (r PlaylistFollowerFollowParams) MarshalJSON() (data []byte, err error)

func (*PlaylistFollowerFollowParams) UnmarshalJSON

func (r *PlaylistFollowerFollowParams) UnmarshalJSON(data []byte) error

type PlaylistFollowerService

type PlaylistFollowerService struct {
	Options []option.RequestOption
}

PlaylistFollowerService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPlaylistFollowerService method instead.

func NewPlaylistFollowerService

func NewPlaylistFollowerService(opts ...option.RequestOption) (r PlaylistFollowerService)

NewPlaylistFollowerService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*PlaylistFollowerService) Check

func (r *PlaylistFollowerService) Check(ctx context.Context, playlistID string, query PlaylistFollowerCheckParams, opts ...option.RequestOption) (res *[]bool, err error)

Check to see if the current user is following a specified playlist.

func (*PlaylistFollowerService) Follow

func (r *PlaylistFollowerService) Follow(ctx context.Context, playlistID string, body PlaylistFollowerFollowParams, opts ...option.RequestOption) (err error)

Add the current user as a follower of a playlist.

func (*PlaylistFollowerService) Unfollow

func (r *PlaylistFollowerService) Unfollow(ctx context.Context, playlistID string, opts ...option.RequestOption) (err error)

Remove the current user as a follower of a playlist.

type PlaylistGetParams

type PlaylistGetParams struct {
	// A comma-separated list of item types that your client supports besides the
	// default `track` type. Valid types are: `track` and `episode`.<br/> _**Note**:
	// This parameter was introduced to allow existing clients to maintain their
	// current behaviour and might be deprecated in the future._<br/> In addition to
	// providing this parameter, make sure that your client properly handles cases of
	// new types in the future by checking against the `type` field of each object.
	AdditionalTypes param.Opt[string] `query:"additional_types,omitzero" json:"-"`
	// Filters for the query: a comma-separated list of the fields to return. If
	// omitted, all fields are returned. For example, to get just the playlist”s
	// description and URI: `fields=description,uri`. A dot separator can be used to
	// specify non-reoccurring fields, while parentheses can be used to specify
	// reoccurring fields within objects. For example, to get just the added date and
	// user ID of the adder: `fields=tracks.items(added_at,added_by.id)`. Use multiple
	// parentheses to drill down into nested objects, for example:
	// `fields=tracks.items(track(name,href,album(name,href)))`. Fields can be excluded
	// by prefixing them with an exclamation mark, for example:
	// `fields=tracks.items(track(name,href,album(!name,href)))`
	Fields param.Opt[string] `query:"fields,omitzero" json:"-"`
	// An
	// [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// If a country code is specified, only content that is available in that market
	// will be returned.<br/> If a valid user access token is specified in the request
	// header, the country associated with the user account will take priority over
	// this parameter.<br/> _**Note**: If neither market or user country are provided,
	// the content is considered unavailable for the client._<br/> Users can view the
	// country that is associated with their account in the
	// [account settings](https://www.spotify.com/account/overview/).
	Market param.Opt[string] `query:"market,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (PlaylistGetParams) URLQuery

func (r PlaylistGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes PlaylistGetParams's query parameters as `url.Values`.

type PlaylistGetResponse

type PlaylistGetResponse struct {
	// The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the
	// playlist.
	ID string `json:"id"`
	// `true` if the owner allows other users to modify the playlist.
	Collaborative bool `json:"collaborative"`
	// The playlist description. _Only returned for modified, verified playlists,
	// otherwise_ `null`.
	Description string `json:"description,nullable"`
	// Known external URLs for this playlist.
	ExternalURLs shared.ExternalURLObject `json:"external_urls"`
	// Information about the followers of the playlist.
	Followers shared.FollowersObject `json:"followers"`
	// A link to the Web API endpoint providing full details of the playlist.
	Href string `json:"href"`
	// Images for the playlist. The array may be empty or contain up to three images.
	// The images are returned by size in descending order. See
	// [Working with Playlists](/documentation/web-api/concepts/playlists). _**Note**:
	// If returned, the source URL for the image (`url`) is temporary and will expire
	// in less than a day._
	Images []shared.ImageObject `json:"images"`
	// The name of the playlist.
	Name string `json:"name"`
	// The user who owns the playlist
	Owner PlaylistGetResponseOwner `json:"owner"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// The version identifier for the current playlist. Can be supplied in other
	// requests to target a specific playlist version
	SnapshotID string `json:"snapshot_id"`
	// The tracks of the playlist.
	Tracks PlaylistGetResponseTracks `json:"tracks"`
	// The object type: "playlist"
	Type string `json:"type"`
	// The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the
	// playlist.
	Uri string `json:"uri"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		Collaborative respjson.Field
		Description   respjson.Field
		ExternalURLs  respjson.Field
		Followers     respjson.Field
		Href          respjson.Field
		Images        respjson.Field
		Name          respjson.Field
		Owner         respjson.Field
		Published     respjson.Field
		SnapshotID    respjson.Field
		Tracks        respjson.Field
		Type          respjson.Field
		Uri           respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlaylistGetResponse) RawJSON

func (r PlaylistGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*PlaylistGetResponse) UnmarshalJSON

func (r *PlaylistGetResponse) UnmarshalJSON(data []byte) error

type PlaylistGetResponseOwner

type PlaylistGetResponseOwner struct {
	// The name displayed on the user's profile. `null` if not available.
	DisplayName string `json:"display_name,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		DisplayName respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
	shared.PlaylistUserObject
}

The user who owns the playlist

func (PlaylistGetResponseOwner) RawJSON

func (r PlaylistGetResponseOwner) RawJSON() string

Returns the unmodified JSON received from the API

func (*PlaylistGetResponseOwner) UnmarshalJSON

func (r *PlaylistGetResponseOwner) UnmarshalJSON(data []byte) error

type PlaylistGetResponseTracks

type PlaylistGetResponseTracks struct {
	// A link to the Web API endpoint returning the full result of the request
	Href string `json:"href,required"`
	// The maximum number of items in the response (as set in the query or by default).
	Limit int64 `json:"limit,required"`
	// URL to the next page of items. ( `null` if none)
	Next string `json:"next,required"`
	// The offset of the items returned (as set in the query or by default)
	Offset int64 `json:"offset,required"`
	// URL to the previous page of items. ( `null` if none)
	Previous string `json:"previous,required"`
	// The total number of items available to return.
	Total int64                        `json:"total,required"`
	Items []shared.PlaylistTrackObject `json:"items"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Href        respjson.Field
		Limit       respjson.Field
		Next        respjson.Field
		Offset      respjson.Field
		Previous    respjson.Field
		Total       respjson.Field
		Items       respjson.Field
		Published   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The tracks of the playlist.

func (PlaylistGetResponseTracks) RawJSON

func (r PlaylistGetResponseTracks) RawJSON() string

Returns the unmodified JSON received from the API

func (*PlaylistGetResponseTracks) UnmarshalJSON

func (r *PlaylistGetResponseTracks) UnmarshalJSON(data []byte) error

type PlaylistImageService

type PlaylistImageService struct {
	Options []option.RequestOption
}

PlaylistImageService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPlaylistImageService method instead.

func NewPlaylistImageService

func NewPlaylistImageService(opts ...option.RequestOption) (r PlaylistImageService)

NewPlaylistImageService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*PlaylistImageService) List

func (r *PlaylistImageService) List(ctx context.Context, playlistID string, opts ...option.RequestOption) (res *[]shared.ImageObject, err error)

Get the current image associated with a specific playlist.

func (*PlaylistImageService) Update

func (r *PlaylistImageService) Update(ctx context.Context, playlistID string, body io.Reader, opts ...option.RequestOption) (res *http.Response, err error)

Replace the image used to represent a specific playlist.

type PlaylistService

type PlaylistService struct {
	Options   []option.RequestOption
	Tracks    PlaylistTrackService
	Followers PlaylistFollowerService
	Images    PlaylistImageService
}

PlaylistService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPlaylistService method instead.

func NewPlaylistService

func NewPlaylistService(opts ...option.RequestOption) (r PlaylistService)

NewPlaylistService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*PlaylistService) Get

func (r *PlaylistService) Get(ctx context.Context, playlistID string, query PlaylistGetParams, opts ...option.RequestOption) (res *PlaylistGetResponse, err error)

Get a playlist owned by a Spotify user.

func (*PlaylistService) Update

func (r *PlaylistService) Update(ctx context.Context, playlistID string, body PlaylistUpdateParams, opts ...option.RequestOption) (err error)

Change a playlist's name and public/private state. (The user must, of course, own the playlist.)

type PlaylistTrackAddParams

type PlaylistTrackAddParams struct {
	// The position to insert the items, a zero-based index. For example, to insert the
	// items in the first position: `position=0` ; to insert the items in the third
	// position: `position=2`. If omitted, the items will be appended to the playlist.
	// Items are added in the order they appear in the uris array. For example:
	// `{"uris": ["spotify:track:4iV5W9uYEdYUVa79Axb7Rh","spotify:track:1301WleyT98MSxVHPZCA6M"], "position": 3}`
	Position param.Opt[int64] `json:"position,omitzero"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published param.Opt[bool] `json:"published,omitzero"`
	// A JSON array of the
	// [Spotify URIs](/documentation/web-api/concepts/spotify-uris-ids) to add. For
	// example:
	// `{"uris": ["spotify:track:4iV5W9uYEdYUVa79Axb7Rh","spotify:track:1301WleyT98MSxVHPZCA6M", "spotify:episode:512ojhOuo1ktJprKbVcKyQ"]}`<br/>A
	// maximum of 100 items can be added in one request. _**Note**: if the `uris`
	// parameter is present in the query string, any URIs listed here in the body will
	// be ignored._
	Uris []string `json:"uris,omitzero"`
	// contains filtered or unexported fields
}

func (PlaylistTrackAddParams) MarshalJSON

func (r PlaylistTrackAddParams) MarshalJSON() (data []byte, err error)

func (*PlaylistTrackAddParams) UnmarshalJSON

func (r *PlaylistTrackAddParams) UnmarshalJSON(data []byte) error

type PlaylistTrackAddResponse

type PlaylistTrackAddResponse struct {
	SnapshotID string `json:"snapshot_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		SnapshotID  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlaylistTrackAddResponse) RawJSON

func (r PlaylistTrackAddResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*PlaylistTrackAddResponse) UnmarshalJSON

func (r *PlaylistTrackAddResponse) UnmarshalJSON(data []byte) error

type PlaylistTrackListParams

type PlaylistTrackListParams struct {
	// A comma-separated list of item types that your client supports besides the
	// default `track` type. Valid types are: `track` and `episode`.<br/> _**Note**:
	// This parameter was introduced to allow existing clients to maintain their
	// current behaviour and might be deprecated in the future._<br/> In addition to
	// providing this parameter, make sure that your client properly handles cases of
	// new types in the future by checking against the `type` field of each object.
	AdditionalTypes param.Opt[string] `query:"additional_types,omitzero" json:"-"`
	// Filters for the query: a comma-separated list of the fields to return. If
	// omitted, all fields are returned. For example, to get just the total number of
	// items and the request limit:<br/>`fields=total,limit`<br/>A dot separator can be
	// used to specify non-reoccurring fields, while parentheses can be used to specify
	// reoccurring fields within objects. For example, to get just the added date and
	// user ID of the adder:<br/>`fields=items(added_at,added_by.id)`<br/>Use multiple
	// parentheses to drill down into nested objects, for
	// example:<br/>`fields=items(track(name,href,album(name,href)))`<br/>Fields can be
	// excluded by prefixing them with an exclamation mark, for
	// example:<br/>`fields=items.track.album(!external_urls,images)`
	Fields param.Opt[string] `query:"fields,omitzero" json:"-"`
	// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 100.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// An
	// [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// If a country code is specified, only content that is available in that market
	// will be returned.<br/> If a valid user access token is specified in the request
	// header, the country associated with the user account will take priority over
	// this parameter.<br/> _**Note**: If neither market or user country are provided,
	// the content is considered unavailable for the client._<br/> Users can view the
	// country that is associated with their account in the
	// [account settings](https://www.spotify.com/account/overview/).
	Market param.Opt[string] `query:"market,omitzero" json:"-"`
	// The index of the first item to return. Default: 0 (the first item). Use with
	// limit to get the next set of items.
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (PlaylistTrackListParams) URLQuery

func (r PlaylistTrackListParams) URLQuery() (v url.Values, err error)

URLQuery serializes PlaylistTrackListParams's query parameters as `url.Values`.

type PlaylistTrackObject

type PlaylistTrackObject = shared.PlaylistTrackObject

This is an alias to an internal type.

type PlaylistTrackObjectTrackUnion

type PlaylistTrackObjectTrackUnion = shared.PlaylistTrackObjectTrackUnion

Information about the track or episode.

This is an alias to an internal type.

type PlaylistTrackRemoveParams

type PlaylistTrackRemoveParams struct {
	// An array of objects containing
	// [Spotify URIs](/documentation/web-api/concepts/spotify-uris-ids) of the tracks
	// or episodes to remove. For example:
	// `{ "tracks": [{ "uri": "spotify:track:4iV5W9uYEdYUVa79Axb7Rh" },{ "uri": "spotify:track:1301WleyT98MSxVHPZCA6M" }] }`.
	// A maximum of 100 objects can be sent at once.
	Tracks []PlaylistTrackRemoveParamsTrack `json:"tracks,omitzero,required"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published param.Opt[bool] `json:"published,omitzero"`
	// The playlist's snapshot ID against which you want to make the changes. The API
	// will validate that the specified items exist and in the specified positions and
	// make the changes, even if more recent changes have been made to the playlist.
	SnapshotID param.Opt[string] `json:"snapshot_id,omitzero"`
	// contains filtered or unexported fields
}

func (PlaylistTrackRemoveParams) MarshalJSON

func (r PlaylistTrackRemoveParams) MarshalJSON() (data []byte, err error)

func (*PlaylistTrackRemoveParams) UnmarshalJSON

func (r *PlaylistTrackRemoveParams) UnmarshalJSON(data []byte) error

type PlaylistTrackRemoveParamsTrack

type PlaylistTrackRemoveParamsTrack struct {
	// Spotify URI
	Uri param.Opt[string] `json:"uri,omitzero"`
	// contains filtered or unexported fields
}

func (PlaylistTrackRemoveParamsTrack) MarshalJSON

func (r PlaylistTrackRemoveParamsTrack) MarshalJSON() (data []byte, err error)

func (*PlaylistTrackRemoveParamsTrack) UnmarshalJSON

func (r *PlaylistTrackRemoveParamsTrack) UnmarshalJSON(data []byte) error

type PlaylistTrackRemoveResponse

type PlaylistTrackRemoveResponse struct {
	SnapshotID string `json:"snapshot_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		SnapshotID  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlaylistTrackRemoveResponse) RawJSON

func (r PlaylistTrackRemoveResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*PlaylistTrackRemoveResponse) UnmarshalJSON

func (r *PlaylistTrackRemoveResponse) UnmarshalJSON(data []byte) error

type PlaylistTrackService

type PlaylistTrackService struct {
	Options []option.RequestOption
}

PlaylistTrackService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewPlaylistTrackService method instead.

func NewPlaylistTrackService

func NewPlaylistTrackService(opts ...option.RequestOption) (r PlaylistTrackService)

NewPlaylistTrackService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*PlaylistTrackService) Add

Add one or more items to a user's playlist.

func (*PlaylistTrackService) List

Get full details of the items of a playlist owned by a Spotify user.

func (*PlaylistTrackService) ListAutoPaging

Get full details of the items of a playlist owned by a Spotify user.

func (*PlaylistTrackService) Remove

Remove one or more items from a user's playlist.

func (*PlaylistTrackService) Update

Either reorder or replace items in a playlist depending on the request's parameters. To reorder items, include `range_start`, `insert_before`, `range_length` and `snapshot_id` in the request's body. To replace items, include `uris` as either a query parameter or in the request's body. Replacing items in a playlist will overwrite its existing items. This operation can be used for replacing or clearing items in a playlist. <br/> **Note**: Replace and reorder are mutually exclusive operations which share the same endpoint, but have different parameters. These operations can't be applied together in a single request.

type PlaylistTrackUpdateParams

type PlaylistTrackUpdateParams struct {
	// The position where the items should be inserted.<br/>To reorder the items to the
	// end of the playlist, simply set _insert_before_ to the position after the last
	// item.<br/>Examples:<br/>To reorder the first item to the last position in a
	// playlist with 10 items, set _range_start_ to 0, and _insert_before_
	// to 10.<br/>To reorder the last item in a playlist with 10 items to the start of
	// the playlist, set _range_start_ to 9, and _insert_before_ to 0.
	InsertBefore param.Opt[int64] `json:"insert_before,omitzero"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published param.Opt[bool] `json:"published,omitzero"`
	// The amount of items to be reordered. Defaults to 1 if not set.<br/>The range of
	// items to be reordered begins from the _range_start_ position, and includes the
	// _range_length_ subsequent items.<br/>Example:<br/>To move the items at index
	// 9-10 to the start of the playlist, _range_start_ is set to 9, and _range_length_
	// is set to 2.
	RangeLength param.Opt[int64] `json:"range_length,omitzero"`
	// The position of the first item to be reordered.
	RangeStart param.Opt[int64] `json:"range_start,omitzero"`
	// The playlist's snapshot ID against which you want to make the changes.
	SnapshotID param.Opt[string] `json:"snapshot_id,omitzero"`
	Uris       []string          `json:"uris,omitzero"`
	// contains filtered or unexported fields
}

func (PlaylistTrackUpdateParams) MarshalJSON

func (r PlaylistTrackUpdateParams) MarshalJSON() (data []byte, err error)

func (*PlaylistTrackUpdateParams) UnmarshalJSON

func (r *PlaylistTrackUpdateParams) UnmarshalJSON(data []byte) error

type PlaylistTrackUpdateResponse

type PlaylistTrackUpdateResponse struct {
	SnapshotID string `json:"snapshot_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		SnapshotID  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlaylistTrackUpdateResponse) RawJSON

func (r PlaylistTrackUpdateResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*PlaylistTrackUpdateResponse) UnmarshalJSON

func (r *PlaylistTrackUpdateResponse) UnmarshalJSON(data []byte) error

type PlaylistTracksRefObject

type PlaylistTracksRefObject = shared.PlaylistTracksRefObject

This is an alias to an internal type.

type PlaylistUpdateParams

type PlaylistUpdateParams struct {
	// If `true`, the playlist will become collaborative and other users will be able
	// to modify the playlist in their Spotify client. <br/> _**Note**: You can only
	// set `collaborative` to `true` on non-public playlists._
	Collaborative param.Opt[bool] `json:"collaborative,omitzero"`
	// Value for playlist description as displayed in Spotify Clients and in the Web
	// API.
	Description param.Opt[string] `json:"description,omitzero"`
	// The new name for the playlist, for example `"My New Playlist Title"`
	Name param.Opt[string] `json:"name,omitzero"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published param.Opt[bool] `json:"published,omitzero"`
	// contains filtered or unexported fields
}

func (PlaylistUpdateParams) MarshalJSON

func (r PlaylistUpdateParams) MarshalJSON() (data []byte, err error)

func (*PlaylistUpdateParams) UnmarshalJSON

func (r *PlaylistUpdateParams) UnmarshalJSON(data []byte) error

type PlaylistUserObject

type PlaylistUserObject = shared.PlaylistUserObject

This is an alias to an internal type.

type PlaylistUserObjectType

type PlaylistUserObjectType = shared.PlaylistUserObjectType

The object type.

This is an alias to an internal type.

type RecommendationGetParams

type RecommendationGetParams struct {
	// The target size of the list of recommended tracks. For seeds with unusually
	// small pools or when highly restrictive filtering is applied, it may be
	// impossible to generate the requested number of recommended tracks. Debugging
	// information for such cases is available in the response. Default: 20\. Minimum:
	// 1\. Maximum: 100.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// An
	// [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// If a country code is specified, only content that is available in that market
	// will be returned.<br/> If a valid user access token is specified in the request
	// header, the country associated with the user account will take priority over
	// this parameter.<br/> _**Note**: If neither market or user country are provided,
	// the content is considered unavailable for the client._<br/> Users can view the
	// country that is associated with their account in the
	// [account settings](https://www.spotify.com/account/overview/).
	Market param.Opt[string] `query:"market,omitzero" json:"-"`
	// For each tunable track attribute, a hard ceiling on the selected track
	// attribute’s value can be provided. See tunable track attributes below for the
	// list of available options. For example, `max_instrumentalness=0.35` would filter
	// out most tracks that are likely to be instrumental.
	MaxAcousticness param.Opt[float64] `query:"max_acousticness,omitzero" json:"-"`
	// For each tunable track attribute, a hard ceiling on the selected track
	// attribute’s value can be provided. See tunable track attributes below for the
	// list of available options. For example, `max_instrumentalness=0.35` would filter
	// out most tracks that are likely to be instrumental.
	MaxDanceability param.Opt[float64] `query:"max_danceability,omitzero" json:"-"`
	// For each tunable track attribute, a hard ceiling on the selected track
	// attribute’s value can be provided. See tunable track attributes below for the
	// list of available options. For example, `max_instrumentalness=0.35` would filter
	// out most tracks that are likely to be instrumental.
	MaxDurationMs param.Opt[int64] `query:"max_duration_ms,omitzero" json:"-"`
	// For each tunable track attribute, a hard ceiling on the selected track
	// attribute’s value can be provided. See tunable track attributes below for the
	// list of available options. For example, `max_instrumentalness=0.35` would filter
	// out most tracks that are likely to be instrumental.
	MaxEnergy param.Opt[float64] `query:"max_energy,omitzero" json:"-"`
	// For each tunable track attribute, a hard ceiling on the selected track
	// attribute’s value can be provided. See tunable track attributes below for the
	// list of available options. For example, `max_instrumentalness=0.35` would filter
	// out most tracks that are likely to be instrumental.
	MaxInstrumentalness param.Opt[float64] `query:"max_instrumentalness,omitzero" json:"-"`
	// For each tunable track attribute, a hard ceiling on the selected track
	// attribute’s value can be provided. See tunable track attributes below for the
	// list of available options. For example, `max_instrumentalness=0.35` would filter
	// out most tracks that are likely to be instrumental.
	MaxKey param.Opt[int64] `query:"max_key,omitzero" json:"-"`
	// For each tunable track attribute, a hard ceiling on the selected track
	// attribute’s value can be provided. See tunable track attributes below for the
	// list of available options. For example, `max_instrumentalness=0.35` would filter
	// out most tracks that are likely to be instrumental.
	MaxLiveness param.Opt[float64] `query:"max_liveness,omitzero" json:"-"`
	// For each tunable track attribute, a hard ceiling on the selected track
	// attribute’s value can be provided. See tunable track attributes below for the
	// list of available options. For example, `max_instrumentalness=0.35` would filter
	// out most tracks that are likely to be instrumental.
	MaxLoudness param.Opt[float64] `query:"max_loudness,omitzero" json:"-"`
	// For each tunable track attribute, a hard ceiling on the selected track
	// attribute’s value can be provided. See tunable track attributes below for the
	// list of available options. For example, `max_instrumentalness=0.35` would filter
	// out most tracks that are likely to be instrumental.
	MaxMode param.Opt[int64] `query:"max_mode,omitzero" json:"-"`
	// For each tunable track attribute, a hard ceiling on the selected track
	// attribute’s value can be provided. See tunable track attributes below for the
	// list of available options. For example, `max_instrumentalness=0.35` would filter
	// out most tracks that are likely to be instrumental.
	MaxPopularity param.Opt[int64] `query:"max_popularity,omitzero" json:"-"`
	// For each tunable track attribute, a hard ceiling on the selected track
	// attribute’s value can be provided. See tunable track attributes below for the
	// list of available options. For example, `max_instrumentalness=0.35` would filter
	// out most tracks that are likely to be instrumental.
	MaxSpeechiness param.Opt[float64] `query:"max_speechiness,omitzero" json:"-"`
	// For each tunable track attribute, a hard ceiling on the selected track
	// attribute’s value can be provided. See tunable track attributes below for the
	// list of available options. For example, `max_instrumentalness=0.35` would filter
	// out most tracks that are likely to be instrumental.
	MaxTempo param.Opt[float64] `query:"max_tempo,omitzero" json:"-"`
	// For each tunable track attribute, a hard ceiling on the selected track
	// attribute’s value can be provided. See tunable track attributes below for the
	// list of available options. For example, `max_instrumentalness=0.35` would filter
	// out most tracks that are likely to be instrumental.
	MaxTimeSignature param.Opt[int64] `query:"max_time_signature,omitzero" json:"-"`
	// For each tunable track attribute, a hard ceiling on the selected track
	// attribute’s value can be provided. See tunable track attributes below for the
	// list of available options. For example, `max_instrumentalness=0.35` would filter
	// out most tracks that are likely to be instrumental.
	MaxValence param.Opt[float64] `query:"max_valence,omitzero" json:"-"`
	// For each tunable track attribute, a hard floor on the selected track attribute’s
	// value can be provided. See tunable track attributes below for the list of
	// available options. For example, `min_tempo=140` would restrict results to only
	// those tracks with a tempo of greater than 140 beats per minute.
	MinAcousticness param.Opt[float64] `query:"min_acousticness,omitzero" json:"-"`
	// For each tunable track attribute, a hard floor on the selected track attribute’s
	// value can be provided. See tunable track attributes below for the list of
	// available options. For example, `min_tempo=140` would restrict results to only
	// those tracks with a tempo of greater than 140 beats per minute.
	MinDanceability param.Opt[float64] `query:"min_danceability,omitzero" json:"-"`
	// For each tunable track attribute, a hard floor on the selected track attribute’s
	// value can be provided. See tunable track attributes below for the list of
	// available options. For example, `min_tempo=140` would restrict results to only
	// those tracks with a tempo of greater than 140 beats per minute.
	MinDurationMs param.Opt[int64] `query:"min_duration_ms,omitzero" json:"-"`
	// For each tunable track attribute, a hard floor on the selected track attribute’s
	// value can be provided. See tunable track attributes below for the list of
	// available options. For example, `min_tempo=140` would restrict results to only
	// those tracks with a tempo of greater than 140 beats per minute.
	MinEnergy param.Opt[float64] `query:"min_energy,omitzero" json:"-"`
	// For each tunable track attribute, a hard floor on the selected track attribute’s
	// value can be provided. See tunable track attributes below for the list of
	// available options. For example, `min_tempo=140` would restrict results to only
	// those tracks with a tempo of greater than 140 beats per minute.
	MinInstrumentalness param.Opt[float64] `query:"min_instrumentalness,omitzero" json:"-"`
	// For each tunable track attribute, a hard floor on the selected track attribute’s
	// value can be provided. See tunable track attributes below for the list of
	// available options. For example, `min_tempo=140` would restrict results to only
	// those tracks with a tempo of greater than 140 beats per minute.
	MinKey param.Opt[int64] `query:"min_key,omitzero" json:"-"`
	// For each tunable track attribute, a hard floor on the selected track attribute’s
	// value can be provided. See tunable track attributes below for the list of
	// available options. For example, `min_tempo=140` would restrict results to only
	// those tracks with a tempo of greater than 140 beats per minute.
	MinLiveness param.Opt[float64] `query:"min_liveness,omitzero" json:"-"`
	// For each tunable track attribute, a hard floor on the selected track attribute’s
	// value can be provided. See tunable track attributes below for the list of
	// available options. For example, `min_tempo=140` would restrict results to only
	// those tracks with a tempo of greater than 140 beats per minute.
	MinLoudness param.Opt[float64] `query:"min_loudness,omitzero" json:"-"`
	// For each tunable track attribute, a hard floor on the selected track attribute’s
	// value can be provided. See tunable track attributes below for the list of
	// available options. For example, `min_tempo=140` would restrict results to only
	// those tracks with a tempo of greater than 140 beats per minute.
	MinMode param.Opt[int64] `query:"min_mode,omitzero" json:"-"`
	// For each tunable track attribute, a hard floor on the selected track attribute’s
	// value can be provided. See tunable track attributes below for the list of
	// available options. For example, `min_tempo=140` would restrict results to only
	// those tracks with a tempo of greater than 140 beats per minute.
	MinPopularity param.Opt[int64] `query:"min_popularity,omitzero" json:"-"`
	// For each tunable track attribute, a hard floor on the selected track attribute’s
	// value can be provided. See tunable track attributes below for the list of
	// available options. For example, `min_tempo=140` would restrict results to only
	// those tracks with a tempo of greater than 140 beats per minute.
	MinSpeechiness param.Opt[float64] `query:"min_speechiness,omitzero" json:"-"`
	// For each tunable track attribute, a hard floor on the selected track attribute’s
	// value can be provided. See tunable track attributes below for the list of
	// available options. For example, `min_tempo=140` would restrict results to only
	// those tracks with a tempo of greater than 140 beats per minute.
	MinTempo param.Opt[float64] `query:"min_tempo,omitzero" json:"-"`
	// For each tunable track attribute, a hard floor on the selected track attribute’s
	// value can be provided. See tunable track attributes below for the list of
	// available options. For example, `min_tempo=140` would restrict results to only
	// those tracks with a tempo of greater than 140 beats per minute.
	MinTimeSignature param.Opt[int64] `query:"min_time_signature,omitzero" json:"-"`
	// For each tunable track attribute, a hard floor on the selected track attribute’s
	// value can be provided. See tunable track attributes below for the list of
	// available options. For example, `min_tempo=140` would restrict results to only
	// those tracks with a tempo of greater than 140 beats per minute.
	MinValence param.Opt[float64] `query:"min_valence,omitzero" json:"-"`
	// A comma separated list of
	// [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids) for seed
	// artists. Up to 5 seed values may be provided in any combination of
	// `seed_artists`, `seed_tracks` and `seed_genres`.<br/> _**Note**: only required
	// if `seed_genres` and `seed_tracks` are not set_.
	SeedArtists param.Opt[string] `query:"seed_artists,omitzero" json:"-"`
	// A comma separated list of any genres in the set of
	// [available genre seeds](/documentation/web-api/reference/get-recommendation-genres).
	// Up to 5 seed values may be provided in any combination of `seed_artists`,
	// `seed_tracks` and `seed_genres`.<br/> _**Note**: only required if `seed_artists`
	// and `seed_tracks` are not set_.
	SeedGenres param.Opt[string] `query:"seed_genres,omitzero" json:"-"`
	// A comma separated list of
	// [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids) for a seed
	// track. Up to 5 seed values may be provided in any combination of `seed_artists`,
	// `seed_tracks` and `seed_genres`.<br/> _**Note**: only required if `seed_artists`
	// and `seed_genres` are not set_.
	SeedTracks param.Opt[string] `query:"seed_tracks,omitzero" json:"-"`
	// For each of the tunable track attributes (below) a target value may be provided.
	// Tracks with the attribute values nearest to the target values will be preferred.
	// For example, you might request `target_energy=0.6` and
	// `target_danceability=0.8`. All target values will be weighed equally in ranking
	// results.
	TargetAcousticness param.Opt[float64] `query:"target_acousticness,omitzero" json:"-"`
	// For each of the tunable track attributes (below) a target value may be provided.
	// Tracks with the attribute values nearest to the target values will be preferred.
	// For example, you might request `target_energy=0.6` and
	// `target_danceability=0.8`. All target values will be weighed equally in ranking
	// results.
	TargetDanceability param.Opt[float64] `query:"target_danceability,omitzero" json:"-"`
	// Target duration of the track (ms)
	TargetDurationMs param.Opt[int64] `query:"target_duration_ms,omitzero" json:"-"`
	// For each of the tunable track attributes (below) a target value may be provided.
	// Tracks with the attribute values nearest to the target values will be preferred.
	// For example, you might request `target_energy=0.6` and
	// `target_danceability=0.8`. All target values will be weighed equally in ranking
	// results.
	TargetEnergy param.Opt[float64] `query:"target_energy,omitzero" json:"-"`
	// For each of the tunable track attributes (below) a target value may be provided.
	// Tracks with the attribute values nearest to the target values will be preferred.
	// For example, you might request `target_energy=0.6` and
	// `target_danceability=0.8`. All target values will be weighed equally in ranking
	// results.
	TargetInstrumentalness param.Opt[float64] `query:"target_instrumentalness,omitzero" json:"-"`
	// For each of the tunable track attributes (below) a target value may be provided.
	// Tracks with the attribute values nearest to the target values will be preferred.
	// For example, you might request `target_energy=0.6` and
	// `target_danceability=0.8`. All target values will be weighed equally in ranking
	// results.
	TargetKey param.Opt[int64] `query:"target_key,omitzero" json:"-"`
	// For each of the tunable track attributes (below) a target value may be provided.
	// Tracks with the attribute values nearest to the target values will be preferred.
	// For example, you might request `target_energy=0.6` and
	// `target_danceability=0.8`. All target values will be weighed equally in ranking
	// results.
	TargetLiveness param.Opt[float64] `query:"target_liveness,omitzero" json:"-"`
	// For each of the tunable track attributes (below) a target value may be provided.
	// Tracks with the attribute values nearest to the target values will be preferred.
	// For example, you might request `target_energy=0.6` and
	// `target_danceability=0.8`. All target values will be weighed equally in ranking
	// results.
	TargetLoudness param.Opt[float64] `query:"target_loudness,omitzero" json:"-"`
	// For each of the tunable track attributes (below) a target value may be provided.
	// Tracks with the attribute values nearest to the target values will be preferred.
	// For example, you might request `target_energy=0.6` and
	// `target_danceability=0.8`. All target values will be weighed equally in ranking
	// results.
	TargetMode param.Opt[int64] `query:"target_mode,omitzero" json:"-"`
	// For each of the tunable track attributes (below) a target value may be provided.
	// Tracks with the attribute values nearest to the target values will be preferred.
	// For example, you might request `target_energy=0.6` and
	// `target_danceability=0.8`. All target values will be weighed equally in ranking
	// results.
	TargetPopularity param.Opt[int64] `query:"target_popularity,omitzero" json:"-"`
	// For each of the tunable track attributes (below) a target value may be provided.
	// Tracks with the attribute values nearest to the target values will be preferred.
	// For example, you might request `target_energy=0.6` and
	// `target_danceability=0.8`. All target values will be weighed equally in ranking
	// results.
	TargetSpeechiness param.Opt[float64] `query:"target_speechiness,omitzero" json:"-"`
	// Target tempo (BPM)
	TargetTempo param.Opt[float64] `query:"target_tempo,omitzero" json:"-"`
	// For each of the tunable track attributes (below) a target value may be provided.
	// Tracks with the attribute values nearest to the target values will be preferred.
	// For example, you might request `target_energy=0.6` and
	// `target_danceability=0.8`. All target values will be weighed equally in ranking
	// results.
	TargetTimeSignature param.Opt[int64] `query:"target_time_signature,omitzero" json:"-"`
	// For each of the tunable track attributes (below) a target value may be provided.
	// Tracks with the attribute values nearest to the target values will be preferred.
	// For example, you might request `target_energy=0.6` and
	// `target_danceability=0.8`. All target values will be weighed equally in ranking
	// results.
	TargetValence param.Opt[float64] `query:"target_valence,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (RecommendationGetParams) URLQuery

func (r RecommendationGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes RecommendationGetParams's query parameters as `url.Values`.

type RecommendationGetResponse

type RecommendationGetResponse struct {
	// An array of recommendation seed objects.
	Seeds []RecommendationGetResponseSeed `json:"seeds,required"`
	// An array of track objects ordered according to the parameters supplied.
	Tracks []shared.TrackObject `json:"tracks,required"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Seeds       respjson.Field
		Tracks      respjson.Field
		Published   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RecommendationGetResponse) RawJSON

func (r RecommendationGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*RecommendationGetResponse) UnmarshalJSON

func (r *RecommendationGetResponse) UnmarshalJSON(data []byte) error

type RecommendationGetResponseSeed

type RecommendationGetResponseSeed struct {
	// The id used to select this seed. This will be the same as the string used in the
	// `seed_artists`, `seed_tracks` or `seed_genres` parameter.
	ID string `json:"id"`
	// The number of tracks available after min\_\* and max\_\* filters have been
	// applied.
	AfterFilteringSize int64 `json:"afterFilteringSize"`
	// The number of tracks available after relinking for regional availability.
	AfterRelinkingSize int64 `json:"afterRelinkingSize"`
	// A link to the full track or artist data for this seed. For tracks this will be a
	// link to a Track Object. For artists a link to an Artist Object. For genre seeds,
	// this value will be `null`.
	Href string `json:"href"`
	// The number of recommended tracks available for this seed.
	InitialPoolSize int64 `json:"initialPoolSize"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// The entity type of this seed. One of `artist`, `track` or `genre`.
	Type string `json:"type"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                 respjson.Field
		AfterFilteringSize respjson.Field
		AfterRelinkingSize respjson.Field
		Href               respjson.Field
		InitialPoolSize    respjson.Field
		Published          respjson.Field
		Type               respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RecommendationGetResponseSeed) RawJSON

Returns the unmodified JSON received from the API

func (*RecommendationGetResponseSeed) UnmarshalJSON

func (r *RecommendationGetResponseSeed) UnmarshalJSON(data []byte) error

type RecommendationListAvailableGenreSeedsResponse

type RecommendationListAvailableGenreSeedsResponse struct {
	Genres []string `json:"genres,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Genres      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RecommendationListAvailableGenreSeedsResponse) RawJSON

Returns the unmodified JSON received from the API

func (*RecommendationListAvailableGenreSeedsResponse) UnmarshalJSON

func (r *RecommendationListAvailableGenreSeedsResponse) UnmarshalJSON(data []byte) error

type RecommendationService

type RecommendationService struct {
	Options []option.RequestOption
}

RecommendationService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRecommendationService method instead.

func NewRecommendationService

func NewRecommendationService(opts ...option.RequestOption) (r RecommendationService)

NewRecommendationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*RecommendationService) Get deprecated

Recommendations are generated based on the available information for a given seed entity and matched against similar artists and tracks. If there is sufficient information about the provided seeds, a list of tracks will be returned together with pool size details.

For artists and tracks that are very new or obscure there might not be enough data to generate a list of tracks.

Deprecated: deprecated

func (*RecommendationService) ListAvailableGenreSeeds deprecated

Retrieve a list of available genres seed parameter values for [recommendations](/documentation/web-api/reference/get-recommendations).

Deprecated: deprecated

type ResumePointObject

type ResumePointObject = shared.ResumePointObject

This is an alias to an internal type.

type SearchQueryParams

type SearchQueryParams struct {
	// Your search query.
	//
	// You can narrow down your search using field filters. The available filters are
	// `album`, `artist`, `track`, `year`, `upc`, `tag:hipster`, `tag:new`, `isrc`, and
	// `genre`. Each field filter only applies to certain result types.
	//
	// The `artist` and `year` filters can be used while searching albums, artists and
	// tracks. You can filter on a single `year` or a range (e.g. 1955-1960).<br /> The
	// `album` filter can be used while searching albums and tracks.<br /> The `genre`
	// filter can be used while searching artists and tracks.<br /> The `isrc` and
	// `track` filters can be used while searching tracks.<br /> The `upc`, `tag:new`
	// and `tag:hipster` filters can only be used while searching albums. The `tag:new`
	// filter will return albums released in the past two weeks and `tag:hipster` can
	// be used to return only albums with the lowest 10% popularity.<br />
	Q string `query:"q,required" json:"-"`
	// A comma-separated list of item types to search across. Search results include
	// hits from all the specified item types. For example: `q=abacab&type=album,track`
	// returns both albums and tracks matching "abacab".
	//
	// Any of "album", "artist", "playlist", "track", "show", "episode", "audiobook".
	Type []string `query:"type,omitzero,required" json:"-"`
	// The maximum number of results to return in each item type.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// An
	// [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// If a country code is specified, only content that is available in that market
	// will be returned.<br/> If a valid user access token is specified in the request
	// header, the country associated with the user account will take priority over
	// this parameter.<br/> _**Note**: If neither market or user country are provided,
	// the content is considered unavailable for the client._<br/> Users can view the
	// country that is associated with their account in the
	// [account settings](https://www.spotify.com/account/overview/).
	Market param.Opt[string] `query:"market,omitzero" json:"-"`
	// The index of the first result to return. Use with limit to get the next page of
	// search results.
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// If `include_external=audio` is specified it signals that the client can play
	// externally hosted audio content, and marks the content as playable in the
	// response. By default externally hosted audio content is marked as unplayable in
	// the response.
	//
	// Any of "audio".
	IncludeExternal SearchQueryParamsIncludeExternal `query:"include_external,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SearchQueryParams) URLQuery

func (r SearchQueryParams) URLQuery() (v url.Values, err error)

URLQuery serializes SearchQueryParams's query parameters as `url.Values`.

type SearchQueryParamsIncludeExternal

type SearchQueryParamsIncludeExternal string

If `include_external=audio` is specified it signals that the client can play externally hosted audio content, and marks the content as playable in the response. By default externally hosted audio content is marked as unplayable in the response.

const (
	SearchQueryParamsIncludeExternalAudio SearchQueryParamsIncludeExternal = "audio"
)

type SearchQueryResponse

type SearchQueryResponse struct {
	Albums     SearchQueryResponseAlbums     `json:"albums"`
	Artists    SearchQueryResponseArtists    `json:"artists"`
	Audiobooks SearchQueryResponseAudiobooks `json:"audiobooks"`
	Episodes   SearchQueryResponseEpisodes   `json:"episodes"`
	Playlists  shared.PagingPlaylistObject   `json:"playlists"`
	Shows      SearchQueryResponseShows      `json:"shows"`
	Tracks     SearchQueryResponseTracks     `json:"tracks"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Albums      respjson.Field
		Artists     respjson.Field
		Audiobooks  respjson.Field
		Episodes    respjson.Field
		Playlists   respjson.Field
		Shows       respjson.Field
		Tracks      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SearchQueryResponse) RawJSON

func (r SearchQueryResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*SearchQueryResponse) UnmarshalJSON

func (r *SearchQueryResponse) UnmarshalJSON(data []byte) error

type SearchQueryResponseAlbums

type SearchQueryResponseAlbums struct {
	// A link to the Web API endpoint returning the full result of the request
	Href string `json:"href,required"`
	// The maximum number of items in the response (as set in the query or by default).
	Limit int64 `json:"limit,required"`
	// URL to the next page of items. ( `null` if none)
	Next string `json:"next,required"`
	// The offset of the items returned (as set in the query or by default)
	Offset int64 `json:"offset,required"`
	// URL to the previous page of items. ( `null` if none)
	Previous string `json:"previous,required"`
	// The total number of items available to return.
	Total int64                           `json:"total,required"`
	Items []SearchQueryResponseAlbumsItem `json:"items"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Href        respjson.Field
		Limit       respjson.Field
		Next        respjson.Field
		Offset      respjson.Field
		Previous    respjson.Field
		Total       respjson.Field
		Items       respjson.Field
		Published   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SearchQueryResponseAlbums) RawJSON

func (r SearchQueryResponseAlbums) RawJSON() string

Returns the unmodified JSON received from the API

func (*SearchQueryResponseAlbums) UnmarshalJSON

func (r *SearchQueryResponseAlbums) UnmarshalJSON(data []byte) error

type SearchQueryResponseAlbumsItem

type SearchQueryResponseAlbumsItem struct {
	// The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the
	// album.
	ID string `json:"id,required"`
	// The type of the album.
	//
	// Any of "album", "single", "compilation".
	AlbumType string `json:"album_type,required"`
	// The artists of the album. Each artist object includes a link in `href` to more
	// detailed information about the artist.
	Artists []shared.SimplifiedArtistObject `json:"artists,required"`
	// The markets in which the album is available:
	// [ISO 3166-1 alpha-2 country codes](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// _**NOTE**: an album is considered available in a market when at least 1 of its
	// tracks is available in that market._
	AvailableMarkets []string `json:"available_markets,required"`
	// Known external URLs for this album.
	ExternalURLs shared.ExternalURLObject `json:"external_urls,required"`
	// A link to the Web API endpoint providing full details of the album.
	Href string `json:"href,required"`
	// The cover art for the album in various sizes, widest first.
	Images []shared.ImageObject `json:"images,required"`
	// The name of the album. In case of an album takedown, the value may be an empty
	// string.
	Name string `json:"name,required"`
	// The date the album was first released.
	ReleaseDate string `json:"release_date,required"`
	// The precision with which `release_date` value is known.
	//
	// Any of "year", "month", "day".
	ReleaseDatePrecision string `json:"release_date_precision,required"`
	// The number of tracks in the album.
	TotalTracks int64 `json:"total_tracks,required"`
	// The object type.
	Type constant.Album `json:"type,required"`
	// The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the
	// album.
	Uri string `json:"uri,required"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// Included in the response when a content restriction is applied.
	Restrictions shared.AlbumRestrictionObject `json:"restrictions"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                   respjson.Field
		AlbumType            respjson.Field
		Artists              respjson.Field
		AvailableMarkets     respjson.Field
		ExternalURLs         respjson.Field
		Href                 respjson.Field
		Images               respjson.Field
		Name                 respjson.Field
		ReleaseDate          respjson.Field
		ReleaseDatePrecision respjson.Field
		TotalTracks          respjson.Field
		Type                 respjson.Field
		Uri                  respjson.Field
		Published            respjson.Field
		Restrictions         respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SearchQueryResponseAlbumsItem) RawJSON

Returns the unmodified JSON received from the API

func (*SearchQueryResponseAlbumsItem) UnmarshalJSON

func (r *SearchQueryResponseAlbumsItem) UnmarshalJSON(data []byte) error

type SearchQueryResponseArtists

type SearchQueryResponseArtists struct {
	// A link to the Web API endpoint returning the full result of the request
	Href string `json:"href,required"`
	// The maximum number of items in the response (as set in the query or by default).
	Limit int64 `json:"limit,required"`
	// URL to the next page of items. ( `null` if none)
	Next string `json:"next,required"`
	// The offset of the items returned (as set in the query or by default)
	Offset int64 `json:"offset,required"`
	// URL to the previous page of items. ( `null` if none)
	Previous string `json:"previous,required"`
	// The total number of items available to return.
	Total int64                 `json:"total,required"`
	Items []shared.ArtistObject `json:"items"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Href        respjson.Field
		Limit       respjson.Field
		Next        respjson.Field
		Offset      respjson.Field
		Previous    respjson.Field
		Total       respjson.Field
		Items       respjson.Field
		Published   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SearchQueryResponseArtists) RawJSON

func (r SearchQueryResponseArtists) RawJSON() string

Returns the unmodified JSON received from the API

func (*SearchQueryResponseArtists) UnmarshalJSON

func (r *SearchQueryResponseArtists) UnmarshalJSON(data []byte) error

type SearchQueryResponseAudiobooks

type SearchQueryResponseAudiobooks struct {
	// A link to the Web API endpoint returning the full result of the request
	Href string `json:"href,required"`
	// The maximum number of items in the response (as set in the query or by default).
	Limit int64 `json:"limit,required"`
	// URL to the next page of items. ( `null` if none)
	Next string `json:"next,required"`
	// The offset of the items returned (as set in the query or by default)
	Offset int64 `json:"offset,required"`
	// URL to the previous page of items. ( `null` if none)
	Previous string `json:"previous,required"`
	// The total number of items available to return.
	Total int64                  `json:"total,required"`
	Items []shared.AudiobookBase `json:"items"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Href        respjson.Field
		Limit       respjson.Field
		Next        respjson.Field
		Offset      respjson.Field
		Previous    respjson.Field
		Total       respjson.Field
		Items       respjson.Field
		Published   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SearchQueryResponseAudiobooks) RawJSON

Returns the unmodified JSON received from the API

func (*SearchQueryResponseAudiobooks) UnmarshalJSON

func (r *SearchQueryResponseAudiobooks) UnmarshalJSON(data []byte) error

type SearchQueryResponseEpisodes

type SearchQueryResponseEpisodes struct {
	// A link to the Web API endpoint returning the full result of the request
	Href string `json:"href,required"`
	// The maximum number of items in the response (as set in the query or by default).
	Limit int64 `json:"limit,required"`
	// URL to the next page of items. ( `null` if none)
	Next string `json:"next,required"`
	// The offset of the items returned (as set in the query or by default)
	Offset int64 `json:"offset,required"`
	// URL to the previous page of items. ( `null` if none)
	Previous string `json:"previous,required"`
	// The total number of items available to return.
	Total int64                            `json:"total,required"`
	Items []shared.SimplifiedEpisodeObject `json:"items"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Href        respjson.Field
		Limit       respjson.Field
		Next        respjson.Field
		Offset      respjson.Field
		Previous    respjson.Field
		Total       respjson.Field
		Items       respjson.Field
		Published   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SearchQueryResponseEpisodes) RawJSON

func (r SearchQueryResponseEpisodes) RawJSON() string

Returns the unmodified JSON received from the API

func (*SearchQueryResponseEpisodes) UnmarshalJSON

func (r *SearchQueryResponseEpisodes) UnmarshalJSON(data []byte) error

type SearchQueryResponseShows

type SearchQueryResponseShows struct {
	// A link to the Web API endpoint returning the full result of the request
	Href string `json:"href,required"`
	// The maximum number of items in the response (as set in the query or by default).
	Limit int64 `json:"limit,required"`
	// URL to the next page of items. ( `null` if none)
	Next string `json:"next,required"`
	// The offset of the items returned (as set in the query or by default)
	Offset int64 `json:"offset,required"`
	// URL to the previous page of items. ( `null` if none)
	Previous string `json:"previous,required"`
	// The total number of items available to return.
	Total int64             `json:"total,required"`
	Items []shared.ShowBase `json:"items"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Href        respjson.Field
		Limit       respjson.Field
		Next        respjson.Field
		Offset      respjson.Field
		Previous    respjson.Field
		Total       respjson.Field
		Items       respjson.Field
		Published   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SearchQueryResponseShows) RawJSON

func (r SearchQueryResponseShows) RawJSON() string

Returns the unmodified JSON received from the API

func (*SearchQueryResponseShows) UnmarshalJSON

func (r *SearchQueryResponseShows) UnmarshalJSON(data []byte) error

type SearchQueryResponseTracks

type SearchQueryResponseTracks struct {
	// A link to the Web API endpoint returning the full result of the request
	Href string `json:"href,required"`
	// The maximum number of items in the response (as set in the query or by default).
	Limit int64 `json:"limit,required"`
	// URL to the next page of items. ( `null` if none)
	Next string `json:"next,required"`
	// The offset of the items returned (as set in the query or by default)
	Offset int64 `json:"offset,required"`
	// URL to the previous page of items. ( `null` if none)
	Previous string `json:"previous,required"`
	// The total number of items available to return.
	Total int64                `json:"total,required"`
	Items []shared.TrackObject `json:"items"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Href        respjson.Field
		Limit       respjson.Field
		Next        respjson.Field
		Offset      respjson.Field
		Previous    respjson.Field
		Total       respjson.Field
		Items       respjson.Field
		Published   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SearchQueryResponseTracks) RawJSON

func (r SearchQueryResponseTracks) RawJSON() string

Returns the unmodified JSON received from the API

func (*SearchQueryResponseTracks) UnmarshalJSON

func (r *SearchQueryResponseTracks) UnmarshalJSON(data []byte) error

type SearchService

type SearchService struct {
	Options []option.RequestOption
}

SearchService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSearchService method instead.

func NewSearchService

func NewSearchService(opts ...option.RequestOption) (r SearchService)

NewSearchService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SearchService) Query

func (r *SearchService) Query(ctx context.Context, query SearchQueryParams, opts ...option.RequestOption) (res *SearchQueryResponse, err error)

Get Spotify catalog information about albums, artists, playlists, tracks, shows, episodes or audiobooks that match a keyword string. Audiobooks are only available within the US, UK, Canada, Ireland, New Zealand and Australia markets.

type ShowBase

type ShowBase = shared.ShowBase

This is an alias to an internal type.

type ShowBulkGetParams

type ShowBulkGetParams struct {
	// A comma-separated list of the
	// [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids) for the shows.
	// Maximum: 50 IDs.
	IDs string `query:"ids,required" json:"-"`
	// An
	// [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// If a country code is specified, only content that is available in that market
	// will be returned.<br/> If a valid user access token is specified in the request
	// header, the country associated with the user account will take priority over
	// this parameter.<br/> _**Note**: If neither market or user country are provided,
	// the content is considered unavailable for the client._<br/> Users can view the
	// country that is associated with their account in the
	// [account settings](https://www.spotify.com/account/overview/).
	Market param.Opt[string] `query:"market,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ShowBulkGetParams) URLQuery

func (r ShowBulkGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes ShowBulkGetParams's query parameters as `url.Values`.

type ShowBulkGetResponse

type ShowBulkGetResponse struct {
	Shows []shared.ShowBase `json:"shows,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Shows       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ShowBulkGetResponse) RawJSON

func (r ShowBulkGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ShowBulkGetResponse) UnmarshalJSON

func (r *ShowBulkGetResponse) UnmarshalJSON(data []byte) error

type ShowGetParams

type ShowGetParams struct {
	// An
	// [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// If a country code is specified, only content that is available in that market
	// will be returned.<br/> If a valid user access token is specified in the request
	// header, the country associated with the user account will take priority over
	// this parameter.<br/> _**Note**: If neither market or user country are provided,
	// the content is considered unavailable for the client._<br/> Users can view the
	// country that is associated with their account in the
	// [account settings](https://www.spotify.com/account/overview/).
	Market param.Opt[string] `query:"market,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ShowGetParams) URLQuery

func (r ShowGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes ShowGetParams's query parameters as `url.Values`.

type ShowGetResponse

type ShowGetResponse struct {
	// The episodes of the show.
	Episodes ShowGetResponseEpisodes `json:"episodes,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Episodes    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
	shared.ShowBase
}

func (ShowGetResponse) RawJSON

func (r ShowGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*ShowGetResponse) UnmarshalJSON

func (r *ShowGetResponse) UnmarshalJSON(data []byte) error

type ShowGetResponseEpisodes

type ShowGetResponseEpisodes struct {
	// A link to the Web API endpoint returning the full result of the request
	Href string `json:"href,required"`
	// The maximum number of items in the response (as set in the query or by default).
	Limit int64 `json:"limit,required"`
	// URL to the next page of items. ( `null` if none)
	Next string `json:"next,required"`
	// The offset of the items returned (as set in the query or by default)
	Offset int64 `json:"offset,required"`
	// URL to the previous page of items. ( `null` if none)
	Previous string `json:"previous,required"`
	// The total number of items available to return.
	Total int64                            `json:"total,required"`
	Items []shared.SimplifiedEpisodeObject `json:"items"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Href        respjson.Field
		Limit       respjson.Field
		Next        respjson.Field
		Offset      respjson.Field
		Previous    respjson.Field
		Total       respjson.Field
		Items       respjson.Field
		Published   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The episodes of the show.

func (ShowGetResponseEpisodes) RawJSON

func (r ShowGetResponseEpisodes) RawJSON() string

Returns the unmodified JSON received from the API

func (*ShowGetResponseEpisodes) UnmarshalJSON

func (r *ShowGetResponseEpisodes) UnmarshalJSON(data []byte) error

type ShowListEpisodesParams

type ShowListEpisodesParams struct {
	// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// An
	// [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// If a country code is specified, only content that is available in that market
	// will be returned.<br/> If a valid user access token is specified in the request
	// header, the country associated with the user account will take priority over
	// this parameter.<br/> _**Note**: If neither market or user country are provided,
	// the content is considered unavailable for the client._<br/> Users can view the
	// country that is associated with their account in the
	// [account settings](https://www.spotify.com/account/overview/).
	Market param.Opt[string] `query:"market,omitzero" json:"-"`
	// The index of the first item to return. Default: 0 (the first item). Use with
	// limit to get the next set of items.
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ShowListEpisodesParams) URLQuery

func (r ShowListEpisodesParams) URLQuery() (v url.Values, err error)

URLQuery serializes ShowListEpisodesParams's query parameters as `url.Values`.

type ShowService

type ShowService struct {
	Options []option.RequestOption
}

ShowService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewShowService method instead.

func NewShowService

func NewShowService(opts ...option.RequestOption) (r ShowService)

NewShowService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*ShowService) BulkGet

func (r *ShowService) BulkGet(ctx context.Context, query ShowBulkGetParams, opts ...option.RequestOption) (res *ShowBulkGetResponse, err error)

Get Spotify catalog information for several shows based on their Spotify IDs.

func (*ShowService) Get

func (r *ShowService) Get(ctx context.Context, id string, query ShowGetParams, opts ...option.RequestOption) (res *ShowGetResponse, err error)

Get Spotify catalog information for a single show identified by its unique Spotify ID.

func (*ShowService) ListEpisodes

Get Spotify catalog information about an show’s episodes. Optional parameters can be used to limit the number of episodes returned.

func (*ShowService) ListEpisodesAutoPaging

Get Spotify catalog information about an show’s episodes. Optional parameters can be used to limit the number of episodes returned.

type SimplifiedArtistObject

type SimplifiedArtistObject = shared.SimplifiedArtistObject

This is an alias to an internal type.

type SimplifiedArtistObjectType

type SimplifiedArtistObjectType = shared.SimplifiedArtistObjectType

The object type.

This is an alias to an internal type.

type SimplifiedChapterObject

type SimplifiedChapterObject struct {
	// The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the
	// chapter.
	ID string `json:"id,required"`
	// A URL to a 30 second preview (MP3 format) of the chapter. `null` if not
	// available.
	//
	// Deprecated: deprecated
	AudioPreviewURL string `json:"audio_preview_url,required"`
	// The number of the chapter
	ChapterNumber int64 `json:"chapter_number,required"`
	// A description of the chapter. HTML tags are stripped away from this field, use
	// `html_description` field in case HTML tags are needed.
	Description string `json:"description,required"`
	// The chapter length in milliseconds.
	DurationMs int64 `json:"duration_ms,required"`
	// Whether or not the chapter has explicit content (true = yes it does; false = no
	// it does not OR unknown).
	Explicit bool `json:"explicit,required"`
	// External URLs for this chapter.
	ExternalURLs shared.ExternalURLObject `json:"external_urls,required"`
	// A link to the Web API endpoint providing full details of the chapter.
	Href string `json:"href,required"`
	// A description of the chapter. This field may contain HTML tags.
	HTMLDescription string `json:"html_description,required"`
	// The cover art for the chapter in various sizes, widest first.
	Images []shared.ImageObject `json:"images,required"`
	// True if the chapter is playable in the given market. Otherwise false.
	IsPlayable bool `json:"is_playable,required"`
	// A list of the languages used in the chapter, identified by their
	// [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639) code.
	Languages []string `json:"languages,required"`
	// The name of the chapter.
	Name string `json:"name,required"`
	// The date the chapter was first released, for example `"1981-12-15"`. Depending
	// on the precision, it might be shown as `"1981"` or `"1981-12"`.
	ReleaseDate string `json:"release_date,required"`
	// The precision with which `release_date` value is known.
	//
	// Any of "year", "month", "day".
	ReleaseDatePrecision SimplifiedChapterObjectReleaseDatePrecision `json:"release_date_precision,required"`
	// The object type.
	Type constant.Episode `json:"type,required"`
	// The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the
	// chapter.
	Uri string `json:"uri,required"`
	// A list of the countries in which the chapter can be played, identified by their
	// [ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code.
	AvailableMarkets []string `json:"available_markets"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// Included in the response when a content restriction is applied.
	Restrictions shared.ChapterRestrictionObject `json:"restrictions"`
	// The user's most recent position in the chapter. Set if the supplied access token
	// is a user token and has the scope 'user-read-playback-position'.
	ResumePoint shared.ResumePointObject `json:"resume_point"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                   respjson.Field
		AudioPreviewURL      respjson.Field
		ChapterNumber        respjson.Field
		Description          respjson.Field
		DurationMs           respjson.Field
		Explicit             respjson.Field
		ExternalURLs         respjson.Field
		Href                 respjson.Field
		HTMLDescription      respjson.Field
		Images               respjson.Field
		IsPlayable           respjson.Field
		Languages            respjson.Field
		Name                 respjson.Field
		ReleaseDate          respjson.Field
		ReleaseDatePrecision respjson.Field
		Type                 respjson.Field
		Uri                  respjson.Field
		AvailableMarkets     respjson.Field
		Published            respjson.Field
		Restrictions         respjson.Field
		ResumePoint          respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SimplifiedChapterObject) RawJSON

func (r SimplifiedChapterObject) RawJSON() string

Returns the unmodified JSON received from the API

func (*SimplifiedChapterObject) UnmarshalJSON

func (r *SimplifiedChapterObject) UnmarshalJSON(data []byte) error

type SimplifiedChapterObjectReleaseDatePrecision

type SimplifiedChapterObjectReleaseDatePrecision string

The precision with which `release_date` value is known.

const (
	SimplifiedChapterObjectReleaseDatePrecisionYear  SimplifiedChapterObjectReleaseDatePrecision = "year"
	SimplifiedChapterObjectReleaseDatePrecisionMonth SimplifiedChapterObjectReleaseDatePrecision = "month"
	SimplifiedChapterObjectReleaseDatePrecisionDay   SimplifiedChapterObjectReleaseDatePrecision = "day"
)

type SimplifiedEpisodeObject

type SimplifiedEpisodeObject = shared.SimplifiedEpisodeObject

This is an alias to an internal type.

type SimplifiedEpisodeObjectReleaseDatePrecision

type SimplifiedEpisodeObjectReleaseDatePrecision = shared.SimplifiedEpisodeObjectReleaseDatePrecision

The precision with which `release_date` value is known.

This is an alias to an internal type.

type SimplifiedPlaylistObject

type SimplifiedPlaylistObject = shared.SimplifiedPlaylistObject

This is an alias to an internal type.

type SimplifiedPlaylistObjectOwner

type SimplifiedPlaylistObjectOwner = shared.SimplifiedPlaylistObjectOwner

The user who owns the playlist

This is an alias to an internal type.

type SimplifiedTrackObject

type SimplifiedTrackObject = shared.SimplifiedTrackObject

This is an alias to an internal type.

type TimeIntervalObject

type TimeIntervalObject struct {
	// The confidence, from 0.0 to 1.0, of the reliability of the interval.
	Confidence float64 `json:"confidence"`
	// The duration (in seconds) of the time interval.
	Duration float64 `json:"duration"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// The starting point (in seconds) of the time interval.
	Start float64 `json:"start"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Confidence  respjson.Field
		Duration    respjson.Field
		Published   respjson.Field
		Start       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TimeIntervalObject) RawJSON

func (r TimeIntervalObject) RawJSON() string

Returns the unmodified JSON received from the API

func (*TimeIntervalObject) UnmarshalJSON

func (r *TimeIntervalObject) UnmarshalJSON(data []byte) error

type TrackBulkGetParams

type TrackBulkGetParams struct {
	// A comma-separated list of the
	// [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). For example:
	// `ids=4iV5W9uYEdYUVa79Axb7Rh,1301WleyT98MSxVHPZCA6M`. Maximum: 50 IDs.
	IDs string `query:"ids,required" json:"-"`
	// An
	// [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// If a country code is specified, only content that is available in that market
	// will be returned.<br/> If a valid user access token is specified in the request
	// header, the country associated with the user account will take priority over
	// this parameter.<br/> _**Note**: If neither market or user country are provided,
	// the content is considered unavailable for the client._<br/> Users can view the
	// country that is associated with their account in the
	// [account settings](https://www.spotify.com/account/overview/).
	Market param.Opt[string] `query:"market,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (TrackBulkGetParams) URLQuery

func (r TrackBulkGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes TrackBulkGetParams's query parameters as `url.Values`.

type TrackBulkGetResponse

type TrackBulkGetResponse struct {
	Tracks []shared.TrackObject `json:"tracks,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Tracks      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TrackBulkGetResponse) RawJSON

func (r TrackBulkGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*TrackBulkGetResponse) UnmarshalJSON

func (r *TrackBulkGetResponse) UnmarshalJSON(data []byte) error

type TrackGetParams

type TrackGetParams struct {
	// An
	// [ISO 3166-1 alpha-2 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
	// If a country code is specified, only content that is available in that market
	// will be returned.<br/> If a valid user access token is specified in the request
	// header, the country associated with the user account will take priority over
	// this parameter.<br/> _**Note**: If neither market or user country are provided,
	// the content is considered unavailable for the client._<br/> Users can view the
	// country that is associated with their account in the
	// [account settings](https://www.spotify.com/account/overview/).
	Market param.Opt[string] `query:"market,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (TrackGetParams) URLQuery

func (r TrackGetParams) URLQuery() (v url.Values, err error)

URLQuery serializes TrackGetParams's query parameters as `url.Values`.

type TrackObject

type TrackObject = shared.TrackObject

This is an alias to an internal type.

type TrackObjectAlbum

type TrackObjectAlbum = shared.TrackObjectAlbum

The album on which the track appears. The album object includes a link in `href` to full information about the album.

This is an alias to an internal type.

type TrackObjectType

type TrackObjectType = shared.TrackObjectType

The object type: "track".

This is an alias to an internal type.

type TrackRestrictionObject

type TrackRestrictionObject = shared.TrackRestrictionObject

This is an alias to an internal type.

type TrackService

type TrackService struct {
	Options []option.RequestOption
}

TrackService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTrackService method instead.

func NewTrackService

func NewTrackService(opts ...option.RequestOption) (r TrackService)

NewTrackService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*TrackService) BulkGet

func (r *TrackService) BulkGet(ctx context.Context, query TrackBulkGetParams, opts ...option.RequestOption) (res *TrackBulkGetResponse, err error)

Get Spotify catalog information for multiple tracks based on their Spotify IDs.

func (*TrackService) Get

func (r *TrackService) Get(ctx context.Context, id string, query TrackGetParams, opts ...option.RequestOption) (res *shared.TrackObject, err error)

Get Spotify catalog information for a single track identified by its unique Spotify ID.

type UserGetProfileResponse

type UserGetProfileResponse struct {
	// The [Spotify user ID](/documentation/web-api/concepts/spotify-uris-ids) for this
	// user.
	ID string `json:"id"`
	// The name displayed on the user's profile. `null` if not available.
	DisplayName string `json:"display_name,nullable"`
	// Known public external URLs for this user.
	ExternalURLs shared.ExternalURLObject `json:"external_urls"`
	// Information about the followers of this user.
	Followers shared.FollowersObject `json:"followers"`
	// A link to the Web API endpoint for this user.
	Href string `json:"href"`
	// The user's profile image.
	Images []shared.ImageObject `json:"images"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// The object type.
	//
	// Any of "user".
	Type UserGetProfileResponseType `json:"type"`
	// The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for this
	// user.
	Uri string `json:"uri"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID           respjson.Field
		DisplayName  respjson.Field
		ExternalURLs respjson.Field
		Followers    respjson.Field
		Href         respjson.Field
		Images       respjson.Field
		Published    respjson.Field
		Type         respjson.Field
		Uri          respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (UserGetProfileResponse) RawJSON

func (r UserGetProfileResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*UserGetProfileResponse) UnmarshalJSON

func (r *UserGetProfileResponse) UnmarshalJSON(data []byte) error

type UserGetProfileResponseType

type UserGetProfileResponseType string

The object type.

const (
	UserGetProfileResponseTypeUser UserGetProfileResponseType = "user"
)

type UserPlaylistListParams

type UserPlaylistListParams struct {
	// The maximum number of items to return. Default: 20. Minimum: 1. Maximum: 50.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// The index of the first playlist to return. Default: 0 (the first object).
	// Maximum offset: 100.000\. Use with `limit` to get the next set of playlists.
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (UserPlaylistListParams) URLQuery

func (r UserPlaylistListParams) URLQuery() (v url.Values, err error)

URLQuery serializes UserPlaylistListParams's query parameters as `url.Values`.

type UserPlaylistNewParams

type UserPlaylistNewParams struct {
	// The name for the new playlist, for example `"Your Coolest Playlist"`. This name
	// does not need to be unique; a user may have several playlists with the same
	// name.
	Name string `json:"name,required"`
	// Defaults to `false`. If `true` the playlist will be collaborative. _**Note**: to
	// create a collaborative playlist you must also set `public` to `false`. To create
	// collaborative playlists you must have granted `playlist-modify-private` and
	// `playlist-modify-public`
	// [scopes](/documentation/web-api/concepts/scopes/#list-of-scopes)._
	Collaborative param.Opt[bool] `json:"collaborative,omitzero"`
	// value for playlist description as displayed in Spotify Clients and in the Web
	// API.
	Description param.Opt[string] `json:"description,omitzero"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published param.Opt[bool] `json:"published,omitzero"`
	// contains filtered or unexported fields
}

func (UserPlaylistNewParams) MarshalJSON

func (r UserPlaylistNewParams) MarshalJSON() (data []byte, err error)

func (*UserPlaylistNewParams) UnmarshalJSON

func (r *UserPlaylistNewParams) UnmarshalJSON(data []byte) error

type UserPlaylistNewResponse

type UserPlaylistNewResponse struct {
	// The [Spotify ID](/documentation/web-api/concepts/spotify-uris-ids) for the
	// playlist.
	ID string `json:"id"`
	// `true` if the owner allows other users to modify the playlist.
	Collaborative bool `json:"collaborative"`
	// The playlist description. _Only returned for modified, verified playlists,
	// otherwise_ `null`.
	Description string `json:"description,nullable"`
	// Known external URLs for this playlist.
	ExternalURLs shared.ExternalURLObject `json:"external_urls"`
	// Information about the followers of the playlist.
	Followers shared.FollowersObject `json:"followers"`
	// A link to the Web API endpoint providing full details of the playlist.
	Href string `json:"href"`
	// Images for the playlist. The array may be empty or contain up to three images.
	// The images are returned by size in descending order. See
	// [Working with Playlists](/documentation/web-api/concepts/playlists). _**Note**:
	// If returned, the source URL for the image (`url`) is temporary and will expire
	// in less than a day._
	Images []shared.ImageObject `json:"images"`
	// The name of the playlist.
	Name string `json:"name"`
	// The user who owns the playlist
	Owner UserPlaylistNewResponseOwner `json:"owner"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// The version identifier for the current playlist. Can be supplied in other
	// requests to target a specific playlist version
	SnapshotID string `json:"snapshot_id"`
	// The tracks of the playlist.
	Tracks UserPlaylistNewResponseTracks `json:"tracks"`
	// The object type: "playlist"
	Type string `json:"type"`
	// The [Spotify URI](/documentation/web-api/concepts/spotify-uris-ids) for the
	// playlist.
	Uri string `json:"uri"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		Collaborative respjson.Field
		Description   respjson.Field
		ExternalURLs  respjson.Field
		Followers     respjson.Field
		Href          respjson.Field
		Images        respjson.Field
		Name          respjson.Field
		Owner         respjson.Field
		Published     respjson.Field
		SnapshotID    respjson.Field
		Tracks        respjson.Field
		Type          respjson.Field
		Uri           respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (UserPlaylistNewResponse) RawJSON

func (r UserPlaylistNewResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*UserPlaylistNewResponse) UnmarshalJSON

func (r *UserPlaylistNewResponse) UnmarshalJSON(data []byte) error

type UserPlaylistNewResponseOwner

type UserPlaylistNewResponseOwner struct {
	// The name displayed on the user's profile. `null` if not available.
	DisplayName string `json:"display_name,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		DisplayName respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
	shared.PlaylistUserObject
}

The user who owns the playlist

func (UserPlaylistNewResponseOwner) RawJSON

Returns the unmodified JSON received from the API

func (*UserPlaylistNewResponseOwner) UnmarshalJSON

func (r *UserPlaylistNewResponseOwner) UnmarshalJSON(data []byte) error

type UserPlaylistNewResponseTracks

type UserPlaylistNewResponseTracks struct {
	// A link to the Web API endpoint returning the full result of the request
	Href string `json:"href,required"`
	// The maximum number of items in the response (as set in the query or by default).
	Limit int64 `json:"limit,required"`
	// URL to the next page of items. ( `null` if none)
	Next string `json:"next,required"`
	// The offset of the items returned (as set in the query or by default)
	Offset int64 `json:"offset,required"`
	// URL to the previous page of items. ( `null` if none)
	Previous string `json:"previous,required"`
	// The total number of items available to return.
	Total int64                        `json:"total,required"`
	Items []shared.PlaylistTrackObject `json:"items"`
	// The playlist's public/private status (if it should be added to the user's
	// profile or not): `true` the playlist will be public, `false` the playlist will
	// be private, `null` the playlist status is not relevant. For more about
	// public/private status, see
	// [Working with Playlists](/documentation/web-api/concepts/playlists)
	Published bool `json:"published"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Href        respjson.Field
		Limit       respjson.Field
		Next        respjson.Field
		Offset      respjson.Field
		Previous    respjson.Field
		Total       respjson.Field
		Items       respjson.Field
		Published   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

The tracks of the playlist.

func (UserPlaylistNewResponseTracks) RawJSON

Returns the unmodified JSON received from the API

func (*UserPlaylistNewResponseTracks) UnmarshalJSON

func (r *UserPlaylistNewResponseTracks) UnmarshalJSON(data []byte) error

type UserPlaylistService

type UserPlaylistService struct {
	Options []option.RequestOption
}

UserPlaylistService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewUserPlaylistService method instead.

func NewUserPlaylistService

func NewUserPlaylistService(opts ...option.RequestOption) (r UserPlaylistService)

NewUserPlaylistService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*UserPlaylistService) List

Get a list of the playlists owned or followed by a Spotify user.

func (*UserPlaylistService) ListAutoPaging

Get a list of the playlists owned or followed by a Spotify user.

func (*UserPlaylistService) New

Create a playlist for a Spotify user. (The playlist will be empty until you [add tracks](/documentation/web-api/reference/add-tracks-to-playlist).) Each user is generally limited to a maximum of 11000 playlists.

type UserService

type UserService struct {
	Options   []option.RequestOption
	Playlists UserPlaylistService
}

UserService contains methods and other services that help with interacting with the spotted API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewUserService method instead.

func NewUserService

func NewUserService(opts ...option.RequestOption) (r UserService)

NewUserService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*UserService) GetProfile

func (r *UserService) GetProfile(ctx context.Context, userID string, opts ...option.RequestOption) (res *UserGetProfileResponse, err error)

Get public profile information about a Spotify user.

Directories

Path Synopsis
encoding/json
Package json implements encoding and decoding of JSON as defined in RFC 7159.
Package json implements encoding and decoding of JSON as defined in RFC 7159.
encoding/json/shims
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package.
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package.
packages

Jump to

Keyboard shortcuts

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