cmdTypes

package
v1.0.75 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 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 Actions

type Actions struct {
	Disallows Disallows `json:"disallows"`
}

type AlbumArtist

type AlbumArtist struct {
	ExternalURLs AlbumExternalURLs `json:"external_urls"`
	Href         string            `json:"href"`
	ID           string            `json:"id"`
	Name         string            `json:"name"`
	Type         string            `json:"type"`
	URI          string            `json:"uri"`
}

type AlbumExternalURLs

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

type AlbumItems

type AlbumItems struct {
	AlbumType            string            `json:"album_type"`
	TotalTracks          int               `json:"total_tracks"`
	AvailableMarkets     []string          `json:"available_markets"`
	ExternalURLs         map[string]string `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         AlbumRestrictions `json:"restrictions"`
	Type                 string            `json:"type"`
	URI                  string            `json:"uri"`
	Artists              []AlbumArtist     `json:"artists"`
}

type AlbumRestrictions

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

type Albums

type Albums struct {
	Body
	Items []AlbumItems `json:"items"`
}

type ArtistItems

type ArtistItems struct {
	ExternalURLs ArtistsExternalURLs `json:"external_urls"`
	Followers    ArtistsFollowers    `json:"followers"`
	Genres       []string            `json:"genres"`
	Href         string              `json:"href"`
	ID           string              `json:"id"`
	Images       []Image             `json:"images"`
	Name         string              `json:"name"`
	Popularity   int                 `json:"popularity"`
	Type         string              `json:"type"`
	URI          string              `json:"uri"`
}

type Artists

type Artists struct {
	Body
	Items []ArtistItems `json:"items"`
}

type ArtistsExternalURLs

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

type ArtistsFollowers

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

type AudiobookAuthor

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

type AudiobookCopyright

type AudiobookCopyright struct {
	Text string `json:"text"`
	Type string `json:"type"`
}

type AudiobookItems

type AudiobookItems struct {
	Authors          []AudiobookAuthor    `json:"authors"`
	AvailableMarkets []string             `json:"available_markets"`
	Copyrights       []AudiobookCopyright `json:"copyrights"`
	Description      string               `json:"description"`
	HTMLDescription  string               `json:"html_description"`
	Edition          string               `json:"edition"`
	Explicit         bool                 `json:"explicit"`
	ExternalURLs     map[string]string    `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        []AudiobookNarrator  `json:"narrators"`
	Publisher        string               `json:"publisher"`
	Type             string               `json:"type"`
	URI              string               `json:"uri"`
	TotalChapters    int                  `json:"total_chapters"`
}

type AudiobookNarrator

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

type Audiobooks

type Audiobooks struct {
	Body
	Items []AudiobookItems `json:"items"`
}

type Body

type Body 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"`
}

type Context

type Context struct {
	ExternalURLs map[string]string `json:"external_urls"`
	Href         string            `json:"href"`
	Type         string            `json:"type"`
	URI          string            `json:"uri"`
}

type DeviceType

type DeviceType struct {
	Name             string `json:"name"`
	IsActive         bool   `json:"is_active"`
	ID               string `json:"id"`
	IsPrivateSession bool   `json:"is_private_session"`
	IsRestricted     bool   `json:"is_restricted"`
	SupportsVolume   bool   `json:"supports_volume"`
	Type             string `json:"type"`
	VolumePercent    int    `json:"volume_percent"`
}

type Disallows

type Disallows struct {
	Pausing bool `json:"pausing"`
}

type EpisodeItems

type EpisodeItems 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         map[string]string   `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          EpisodeResumePoint  `json:"resume_point"`
	Type                 string              `json:"type"`
	URI                  string              `json:"uri"`
	Restrictions         EpisodeRestrictions `json:"restrictions"`
}

type EpisodeRestrictions

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

type EpisodeResumePoint

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

type Episodes

type Episodes struct {
	Body
	Items []EpisodeItems `json:"items"`
}

type ExternalIDs

type ExternalIDs struct {
	Isrc string `json:"isrc"`
	Ean  string `json:"ean"`
	Upc  string `json:"upc"`
}

type Image

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

type Item

type Item struct {
	Album            PlayerAlbum       `json:"album"`
	Artists          []PlayerArtist    `json:"artists"`
	AvailableMarkets []string          `json:"available_markets"`
	DiscNumber       int               `json:"disc_number"`
	DurationMS       int               `json:"duration_ms"`
	Explicit         bool              `json:"explicit"`
	ExternalIDs      map[string]string `json:"external_ids"`
	ExternalURLs     map[string]string `json:"external_urls"`
	Href             string            `json:"href"`
	ID               string            `json:"id"`
	IsLocal          bool              `json:"is_local"`
	Name             string            `json:"name"`
	Popularity       int               `json:"popularity"`
	PreviewURL       string            `json:"preview_url"`
	TrackNumber      int               `json:"track_number"`
	Type             string            `json:"type"`
	URI              string            `json:"uri"`
}

type PlayerAlbum

type PlayerAlbum struct {
	AlbumType            string            `json:"album_type"`
	Artists              []PlayerArtist    `json:"artists"`
	AvailableMarkets     []string          `json:"available_markets"`
	ExternalURLs         map[string]string `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"`
	TotalTracks          int               `json:"total_tracks"`
	Type                 string            `json:"type"`
	URI                  string            `json:"uri"`
}

type PlayerArtist

type PlayerArtist struct {
	ExternalURLs map[string]string `json:"external_urls"`
	Href         string            `json:"href"`
	ID           string            `json:"id"`
	Name         string            `json:"name"`
	Type         string            `json:"type"`
	URI          string            `json:"uri"`
}

type PlaylistItems

type PlaylistItems struct {
	Collaborative bool              `json:"collaborative"`
	Description   string            `json:"description"`
	ExternalURLs  map[string]string `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        PlaylistTrackInfo `json:"tracks"`
	Type          string            `json:"type"`
	URI           string            `json:"uri"`
}

type PlaylistOwner

type PlaylistOwner struct {
	ExternalURLs map[string]string      `json:"external_urls"`
	Followers    PlaylistOwnerFollowers `json:"followers"`
	Href         string                 `json:"href"`
	ID           string                 `json:"id"`
	Type         string                 `json:"type"`
	URI          string                 `json:"uri"`
	DisplayName  string                 `json:"display_name"`
}

type PlaylistOwnerFollowers

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

type PlaylistTrackInfo

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

type Playlists

type Playlists struct {
	Body
	Items []PlaylistItems `json:"items"`
}

type SavedAlbum

type SavedAlbum struct {
	AlbumType            string            `json:"album_type"`
	TotalTracks          int               `json:"total_tracks"`
	AvailableMarkets     []string          `json:"available_markets"`
	ExternalUrls         SavedExternalUrls `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         SavedRestrictions `json:"restrictions"`
	Type                 string            `json:"type"`
	Uri                  string            `json:"uri"`
	Artists              []SavedArtist     `json:"artists"`
}

type SavedArtist

type SavedArtist struct {
	ExternalUrls SavedExternalUrls `json:"external_urls"`
	Followers    SavedFollowers    `json:"followers"`
	Genres       []string          `json:"genres"`
	Href         string            `json:"href"`
	ID           string            `json:"id"`
	Images       []Image           `json:"images"`
	Name         string            `json:"name"`
	Popularity   int               `json:"popularity"`
	Type         string            `json:"type"`
	Uri          string            `json:"uri"`
}

type SavedExternalUrls

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

type SavedFollowers

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

type SavedItem

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

type SavedRestrictions

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

type SavedTrack

type SavedTrack struct {
	Album            SavedAlbum        `json:"album"`
	Artists          []SavedArtist     `json:"artists"`
	AvailableMarkets []string          `json:"available_markets"`
	DiscNumber       int               `json:"disc_number"`
	DurationMS       int               `json:"duration_ms"`
	Explicit         bool              `json:"explicit"`
	ExternalIDs      ExternalIDs       `json:"external_ids"`
	ExternalUrls     SavedExternalUrls `json:"external_urls"`
	Href             string            `json:"href"`
	ID               string            `json:"id"`
	IsPlayable       bool              `json:"is_playable"`
	LinkedFrom       interface{}       `json:"linked_from"` // Use interface{} if the type is not known or varies
	Restrictions     SavedRestrictions `json:"restrictions"`
	Name             string            `json:"name"`
	Popularity       int               `json:"popularity"`
	PreviewUrl       string            `json:"preview_url"`
	TrackNumber      int               `json:"track_number"`
	Type             string            `json:"type"`
	Uri              string            `json:"uri"`
	IsLocal          bool              `json:"is_local"`
}

type SavedTracks

type SavedTracks struct {
	Body
	Items []SavedItem `json:"items"`
}

type SearchPromptResults

type SearchPromptResults struct {
	PlayUrl string
	NextUrl string
}

type SelectionPromptConfig

type SelectionPromptConfig struct {
	Label         string
	FormattedInfo []string
}

type ShowCopyright

type ShowCopyright struct {
	Text string `json:"text"`
	Type string `json:"type"`
}

type ShowItems

type ShowItems struct {
	AvailableMarkets   []string          `json:"available_markets"`
	Copyrights         []ShowCopyright   `json:"copyrights"`
	Description        string            `json:"description"`
	HTMLDescription    string            `json:"html_description"`
	Explicit           bool              `json:"explicit"`
	ExternalURLs       map[string]string `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 Shows

type Shows struct {
	Body
	Items []ShowItems `json:"items"`
}

type SpotifyAPIError

type SpotifyAPIError struct {
	Detail SpotifyError
}

func (SpotifyAPIError) Error

func (e SpotifyAPIError) Error() string

type SpotifyError

type SpotifyError struct {
	Error struct {
		Status  int    `json:"status"`
		Message string `json:"message"`
		Reason  string `json:"reason"`
	} `json:"error"`
}

type SpotifyResponse

type SpotifyResponse struct {
	Device               DeviceType `json:"device"`
	ShuffleState         bool       `json:"shuffle_state"`
	RepeatState          string     `json:"repeat_state"`
	Timestamp            int64      `json:"timestamp"`
	Context              Context    `json:"context"`
	ProgressMS           int        `json:"progress_ms"`
	Item                 Item       `json:"item"`
	CurrentlyPlayingType string     `json:"currently_playing_type"`
	Actions              Actions    `json:"actions"`
	IsPlaying            bool       `json:"is_playing"`
}

type SpotifySearchQuery

type SpotifySearchQuery struct {
	Query string
	Type  string
	Limit string
}

type SpotifySearchResponse

type SpotifySearchResponse struct {
	Tracks     *Tracks     `json:"tracks"`
	Artists    *Artists    `json:"artists"`
	Albums     *Albums     `json:"albums"`
	Playlists  *Playlists  `json:"playlists"`
	Shows      *Shows      `json:"shows"`
	Episodes   *Episodes   `json:"episodes"`
	Audiobooks *Audiobooks `json:"audiobooks"`
}

type TrackItems

type TrackItems struct {
	Album            TracksAlbums      `json:"album"`
	Artists          []TracksArtists   `json:"artists"`
	AvailableMarkets []string          `json:"available_markets"`
	DiscNumber       int               `json:"disc_number"`
	DurationMs       int               `json:"duration_ms"`
	Explicit         bool              `json:"explicit"`
	ExternalIDs      map[string]string `json:"external_ids"`
	ExternalUrls     map[string]string `json:"external_urls"`
	Href             string            `json:"href"`
	ID               string            `json:"id"`
	IsLocal          bool              `json:"is_local"`
	Name             string            `json:"name"`
	Popularity       int               `json:"popularity"`
	PreviewURL       string            `json:"preview_url"` // using string instead of null for simplicity, adjust accordingly
	TrackNumber      int               `json:"track_number"`
	Type             string            `json:"type"`
	URI              string            `json:"uri"`
}

type Tracks

type Tracks struct {
	Body
	Items []TrackItems `json:"items"`
}

type TracksAlbums

type TracksAlbums struct {
	AlbumType            string            `json:"album_type"`
	Artists              []TracksArtists   `json:"artists"`
	AvailableMarkets     []string          `json:"available_markets"`
	ExternalUrls         map[string]string `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"`
	TotalTracks          int               `json:"total_tracks"`
	Type                 string            `json:"type"`
	URI                  string            `json:"uri"`
}

type TracksArtists

type TracksArtists struct {
	ExternalUrls map[string]string `json:"external_urls"`
	Href         string            `json:"href"`
	ID           string            `json:"id"`
	Name         string            `json:"name"`
	Type         string            `json:"type"`
	URI          string            `json:"uri"`
}

type UrlParams

type UrlParams struct {
	ClientID        string
	RedirectURI     string
	RequestedScopes string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳