types

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Album

type Album struct {
	AlbumType            string       `json:"album_type"`
	TotalTracks          int          `json:"total_tracks"`
	AvailableMarkets     []string     `json:"available_markets"`
	ExternalURLs         ExternalURLs `json:"external_urls"`
	Href                 string       `json:"href"`
	ID                   string       `json:"id"`
	Images               []Image      `json:"images"`
	Name                 string       `json:"name"`
	ReleaseDate          string       `json:"release_date"`
	ReleaseDatePrecision string       `json:"release_date_precision"`
	Restrictions         *Restriction `json:"restrictions,omitempty"`
	Type                 string       `json:"type"`
	URI                  string       `json:"uri"`
	Artists              []Artist     `json:"artists"`
	Tracks               AlbumTracks  `json:"tracks"`
	Copyrights           []Copyright  `json:"copyrights"`
	ExternalIDs          ExternalIDs  `json:"external_ids"`
	Genres               []string     `json:"genres"`
	Label                string       `json:"label"`
	Popularity           int          `json:"popularity"`
}

type AlbumTracks

type AlbumTracks struct {
	Href     string  `json:"href"`
	Limit    int     `json:"limit"`
	Next     string  `json:"next"`
	Offset   int     `json:"offset"`
	Previous string  `json:"previous"`
	Total    int     `json:"total"`
	Items    []Track `json:"items"`
}

type AlbumTracksResponse added in v0.4.0

type AlbumTracksResponse struct {
	Href     string  `json:"href"`
	Limit    int     `json:"limit"`
	Next     string  `json:"next"`
	Offset   int     `json:"offset"`
	Previous string  `json:"previous"`
	Total    int     `json:"total"`
	Items    []Track `json:"items"`
}

type Artist

type Artist struct {
	ExternalURLs   ExternalURLs    `json:"external_urls"`
	Href           string          `json:"href"`
	ID             string          `json:"id"`
	Name           string          `json:"name"`
	Type           string          `json:"type"`
	URI            string          `json:"uri"`
	Followers      *Followers      `json:"followers"`
	Genres         []*string       `json:"genres"`
	Images         []*SpotifyImage `json:"images"`
	Popularity     *int            `json:"popularity"`
	IsItFromSearch bool            `json:"-"`
}

func (Artist) FilterValue

func (artist Artist) FilterValue() string

func (Artist) Title

func (artist Artist) Title() string

type Artists

type Artists struct {
	Href    string   `json:"href"`
	Limit   int      `json:"limit"`
	Next    string   `json:"next"`
	Cursors Cursors  `json:"cursors"`
	Total   int      `json:"total"`
	Items   []Artist `json:"items"`
}

type ArtistsResponse

type ArtistsResponse struct {
	Artists []Artist `json:"artists"`
}

type ArtistsTopTrackResponse added in v0.4.0

type ArtistsTopTrackResponse struct {
	Tracks []Track `json:"tracks"`
}

type Audiobook

type Audiobook struct {
	Authors          []Author     `json:"authors"`
	AvailableMarkets []string     `json:"available_markets"`
	Copyrights       []Copyright  `json:"copyrights"`
	Description      string       `json:"description"`
	HTMLDescription  string       `json:"html_description"`
	Edition          string       `json:"edition"`
	Explicit         bool         `json:"explicit"`
	ExternalURLs     ExternalURLs `json:"external_urls"`
	Href             string       `json:"href"`
	ID               string       `json:"id"`
	Images           []Image      `json:"images"`
	Languages        []string     `json:"languages"`
	MediaType        string       `json:"media_type"`
	Name             string       `json:"name"`
	Narrators        []Narrator   `json:"narrators"`
	Publisher        string       `json:"publisher"`
	Type             string       `json:"type"`
	URI              string       `json:"uri"`
	TotalChapters    int          `json:"total_chapters"`
}

type Author

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

type CheckUserSavedTrackResponseMsg added in v0.2.0

type CheckUserSavedTrackResponseMsg struct {
	Saved bool
	Err   error
}
type Copyright struct {
	Text string `json:"text"`
	Type string `json:"type"`
}

type Cursors

type Cursors struct {
	After  *string `json:"after"`
	Before *string `json:"before"`
}

type DBusMessage

type DBusMessage struct {
	MessageType
}

type Episode

type Episode struct {
	AudioPreviewURL      string       `json:"audio_preview_url"`
	Description          string       `json:"description"`
	HTMLDescription      string       `json:"html_description"`
	DurationMS           int          `json:"duration_ms"`
	Explicit             bool         `json:"explicit"`
	ExternalURLs         ExternalURLs `json:"external_urls"`
	Href                 string       `json:"href"`
	ID                   string       `json:"id"`
	Images               []Image      `json:"images"`
	IsExternallyHosted   bool         `json:"is_externally_hosted"`
	IsPlayable           bool         `json:"is_playable"`
	Language             string       `json:"language"`
	Languages            []string     `json:"languages"`
	Name                 string       `json:"name"`
	ReleaseDate          string       `json:"release_date"`
	ReleaseDatePrecision string       `json:"release_date_precision"`
	ResumePoint          ResumePoint  `json:"resume_point"`
	Type                 string       `json:"type"`
	URI                  string       `json:"uri"`
	Restrictions         Restrictions `json:"restrictions"`
}

type ExternalIDs

type ExternalIDs struct {
	ISRC string `json:"isrc"`
	EAN  string `json:"ean"`
	UPC  string `json:"upc"`
}

type ExternalURLs

type ExternalURLs struct {
	Spotify string `json:"spotify"`
}

type FeaturedPlaylistsResponse

type FeaturedPlaylistsResponse struct {
	Message   string       `json:"message"`
	Playlists PlaylistPage `json:"playlists"`
}

type Followers

type Followers struct {
	Href  string `json:"href"`
	Total int    `json:"total"`
}

type Image

type Image struct {
	URL    string `json:"url"`
	Height int    `json:"height"`
	Width  int    `json:"width"`
}

type LikeUnlikeTrackMsg added in v0.4.0

type LikeUnlikeTrackMsg struct {
	TrackID string
	Like    bool
	Err     error
}

type LinkedFrom

type LinkedFrom struct {
	ExternalURLs ExternalURLs `json:"external_urls"`
	Href         string       `json:"href"`
	ID           string       `json:"id"`
	Type         string       `json:"type"`
	URI          string       `json:"uri"`
}

type MessageType

type MessageType string
const (
	NextTrack     MessageType = "nextTrack"
	PreviousTrack MessageType = "previousTrack"
	PlayPause     MessageType = "playPause"
)

type Narrator

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

type NextPageURLType added in v0.6.0

type NextPageURLType string
const (
	NextPageURLTypePlaylistTracks NextPageURLType = "playlistTracks"
	NextPageURLTypeUserSavedItems NextPageURLType = "userSavedItems"
)

type PaginationInfo added in v0.6.0

type PaginationInfo struct {
	Next            string
	NextPageURLType NextPageURLType
	NextItemID      string
}

type Paging

type Paging[T any] struct {
	Href     string `json:"href"`
	Limit    int    `json:"limit"`
	Next     string `json:"next"`
	Offset   int    `json:"offset"`
	Previous string `json:"previous"`
	Total    int    `json:"total"`
	Items    []T    `json:"items"`
}

type Playlist

type Playlist struct {
	Collaborative  bool           `json:"collaborative"`
	Description    string         `json:"description"`
	ExternalURLs   ExternalURLs   `json:"external_urls"`
	Href           string         `json:"href"`
	ID             string         `json:"id"`
	Images         []Image        `json:"images"`
	Name           string         `json:"name"`
	Owner          PlaylistOwner  `json:"owner"`
	Public         bool           `json:"public"`
	SnapshotID     string         `json:"snapshot_id"`
	Tracks         PlaylistTracks `json:"tracks"`
	Type           string         `json:"type"`
	URI            string         `json:"uri"`
	IsItFromSearch bool           `json:"-"`
}

func (Playlist) FilterValue

func (spotifyPlaylist Playlist) FilterValue() string

func (Playlist) Title

func (spotifyPlaylist Playlist) Title() string

type PlaylistItemsResponse

type PlaylistItemsResponse struct {
	Href     string                 `json:"href"`
	Limit    int                    `json:"limit"`
	Next     string                 `json:"next"`
	Offset   int                    `json:"offset"`
	Previous string                 `json:"previous"`
	Total    int                    `json:"total"`
	Items    []*PlaylistTrackObject `json:"items"`
}

type PlaylistOwner

type PlaylistOwner struct {
	ExternalURLs ExternalURLs `json:"external_urls"`
	Href         string       `json:"href"`
	ID           string       `json:"id"`
	Type         string       `json:"type"`
	URI          string       `json:"uri"`
	DisplayName  string       `json:"display_name"`
}

type PlaylistPage

type PlaylistPage struct {
	Href     string     `json:"href"`
	Limit    int        `json:"limit"`
	Next     string     `json:"next"`
	Offset   int        `json:"offset"`
	Previous string     `json:"previous"`
	Total    int        `json:"total"`
	Items    []Playlist `json:"items"`
}

type PlaylistTrackObject

type PlaylistTrackObject struct {
	AddedAt        string       `json:"added_at"`
	AddedBy        *SpotifyUser `json:"added_by"`
	IsLocal        bool         `json:"is_local"`
	Track          Track        `json:"track"`
	IsItFromQueue  bool         `json:"isItFromQueue"`
	IsItFromSearch bool         `json:"-"`
}

func (PlaylistTrackObject) FilterValue

func (playlist PlaylistTrackObject) FilterValue() string

func (PlaylistTrackObject) Title

func (playlist PlaylistTrackObject) Title() string

type PlaylistTracks

type PlaylistTracks struct {
	Href  string `json:"href"`
	Total int    `json:"total"`
}

type Restriction

type Restriction struct {
	Reason string `json:"reason"`
}

type Restrictions

type Restrictions struct {
	Reason string `json:"reason"`
}

type ResumePoint

type ResumePoint struct {
	FullyPlayed      bool `json:"fully_played"`
	ResumePositionMS int  `json:"resume_position_ms"`
}

type SavedAlbum

type SavedAlbum struct {
	AddedAt string `json:"added_at"`
	Album   Album  `json:"album"`
}

type SavedAlbumsResponse

type SavedAlbumsResponse struct {
	Href     string       `json:"href"`
	Limit    int          `json:"limit"`
	Next     string       `json:"next"`
	Offset   int          `json:"offset"`
	Previous string       `json:"previous"`
	Total    int          `json:"total"`
	Items    []SavedAlbum `json:"items"`
}

type SavedTrack added in v0.2.0

type SavedTrack struct {
	AddedAt string `json:"added_at"`
	Track   Track  `json:"track"`
}

type SearchResponse

type SearchResponse struct {
	Tracks     Paging[Track]     `json:"tracks"`
	Artists    Paging[Artist]    `json:"artists"`
	Albums     Paging[Album]     `json:"albums"`
	Playlists  Paging[Playlist]  `json:"playlists"`
	Shows      Paging[Show]      `json:"shows"`
	Episodes   Paging[Episode]   `json:"episodes"`
	Audiobooks Paging[Audiobook] `json:"audiobooks"`
}

type SearchingMsg

type SearchingMsg struct{}

type Show

type Show struct {
	AvailableMarkets   []string     `json:"available_markets"`
	Copyrights         []Copyright  `json:"copyrights"`
	Description        string       `json:"description"`
	HTMLDescription    string       `json:"html_description"`
	Explicit           bool         `json:"explicit"`
	ExternalURLs       ExternalURLs `json:"external_urls"`
	Href               string       `json:"href"`
	ID                 string       `json:"id"`
	Images             []Image      `json:"images"`
	IsExternallyHosted bool         `json:"is_externally_hosted"`
	Languages          []string     `json:"languages"`
	MediaType          string       `json:"media_type"`
	Name               string       `json:"name"`
	Publisher          string       `json:"publisher"`
	Type               string       `json:"type"`
	URI                string       `json:"uri"`
	TotalEpisodes      int          `json:"total_episodes"`
}

type SpotifyImage

type SpotifyImage struct {
	URL    string `json:"url"`
	Height int    `json:"height"`
	Width  int    `json:"width"`
}

type SpotifySearchResultMsg

type SpotifySearchResultMsg struct {
	Result *SearchResponse
	Err    error
}

type SpotifyUser

type SpotifyUser struct {
	ExternalURLs struct {
		Spotify string `json:"spotify"`
	} `json:"external_urls"`
	Href        string `json:"href"`
	ID          string `json:"id"`
	Type        string `json:"type"`
	URI         string `json:"uri"`
	DisplayName string `json:"display_name,omitempty"`
}

type SpotifyUserProfile

type SpotifyUserProfile struct {
	Country         string `json:"country"`
	DisplayName     string `json:"display_name"`
	Email           string `json:"email"`
	ExplicitContent struct {
		FilterEnabled bool `json:"filter_enabled"`
		FilterLocked  bool `json:"filter_locked"`
	} `json:"explicit_content"`
	ExternalURLs struct {
		Spotify string `json:"spotify"`
	} `json:"external_urls"`
	Followers struct {
		Href  string `json:"href"`
		Total int    `json:"total"`
	} `json:"followers"`
	Href    string         `json:"href"`
	ID      string         `json:"id"`
	Images  []SpotifyImage `json:"images"`
	Product string         `json:"product"`
	Type    string         `json:"type"`
	URI     string         `json:"uri"`
}

type Track

type Track struct {
	Artists          []Artist     `json:"artists"`
	Album            Album        `json:"album"`
	AvailableMarkets []string     `json:"available_markets"`
	DiscNumber       int          `json:"disc_number"`
	DurationMS       int          `json:"duration_ms"`
	Explicit         bool         `json:"explicit"`
	ExternalURLs     ExternalURLs `json:"external_urls"`
	Href             string       `json:"href"`
	ID               string       `json:"id"`
	IsPlayable       bool         `json:"is_playable"`
	LinkedFrom       *LinkedFrom  `json:"linked_from,omitempty"`
	Restrictions     *Restriction `json:"restrictions,omitempty"`
	Name             string       `json:"name"`
	PreviewURL       string       `json:"preview_url"`
	TrackNumber      int          `json:"track_number"`
	Type             string       `json:"type"`
	URI              string       `json:"uri"`
	IsLocal          bool         `json:"is_local"`
}

type UpdatePlayedSeconds

type UpdatePlayedSeconds struct {
	TrackID string
}

type UpdatePlaylistMsg

type UpdatePlaylistMsg struct {
	Playlist          []*PlaylistTrackObject
	Err               error
	PaginationInfo    *PaginationInfo
	ShouldAppendQueue bool
	ShouldAppend      bool
}

type UserFollowedArtistResponse

type UserFollowedArtistResponse struct {
	Artists Artists `json:"artists"`
}

type UserPlaylistsResponse

type UserPlaylistsResponse = PlaylistPage

type UserSavedTracks added in v0.2.0

type UserSavedTracks struct {
	Href     string       `json:"href"`
	Limit    int          `json:"limit"`
	Next     string       `json:"next"`
	Offset   int          `json:"offset"`
	Previous string       `json:"previous"`
	Total    int          `json:"total"`
	Items    []SavedTrack `json:"items"`
}

type UserTokenInfo

type UserTokenInfo struct {
	AccessToken  string `json:"access_token"`
	TokenType    string `json:"token_type"`
	ExpiresIn    int    `json:"expires_in"`
	RefreshToken string `json:"refresh_token"`
	Scope        string `json:"scope"`
	ExpiresAt    int64  `json:"expires_at,omitempty"`
}

type UserTopItemsResponse

type UserTopItemsResponse struct {
	Href     string   `json:"href"`
	Limit    int      `json:"limit"`
	Next     string   `json:"next"`
	Offset   int      `json:"offset"`
	Previous string   `json:"previous"`
	Total    int      `json:"total"`
	Items    []Artist `json:"items"`
}

Jump to

Keyboard shortcuts

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