spotify

package module
v0.0.0-...-d4b98a6 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

README ΒΆ

Welcome to go-spotify πŸ‘‹

*** Work In Progress ***

GitHub code size in bytes GitHub go.mod Go version GitHub closed pull requests GitHub pull requests GitHub issues GitHub contributors

go-spotify is a Go client library for accessing the Spotify API

🚚 Install

go get github.com/tsirysndr/go-spotify

πŸš€ Usage

Import the package into your project.

import "github.com/tsirysndr/go-spotify"

Construct a new Spotify client, then use the various services on the client to access different parts of the Spotify API. For example:

client := spotify.NewClient("<YOUR TOKEN AUTHORIZATION>")
result, err := client.Track.List("6rqhFgbbKwnb9MLmUQDhG6")

✨ Coverage

Currently the following services are supported:

  • Search for an Item
  • Get Audio Analysis for a Track
  • Get Audio Features for Several Tracks
  • Get Audio Features for a Track
  • Get Several Tracks
  • Get a Track
  • Get Current User's Profile
  • Get a User's Profile
  • Remove Tracks from a Playlist
  • Get a List of Current User's Playlists
  • Get a Playlist's Tracks
  • Get a Playlist
  • Get a List of a User's Playlists
  • Add Tracks to a Playlist
  • Create a Playlist
  • Reorder or replace a Playlist's Tracks
  • Change a Playlist's Details
  • Get the Current User's Recently Played Tracks
  • Get Information About The User's Current Playback
  • Get a User's Available Devices
  • Get the User's Currently Playing Track
  • Skip User's Playback To Next Track
  • Skip User's Playback To Previous Track
  • Pause a User's Playback
  • Start/Resume a User's Playback
  • Set Repeat Mode On User's Playback
  • Seek To Position In Currently Playing Track
  • Toggle Shuffle For User's Playback
  • Transfer a User's Playback
  • Set Volume For User's Playback
  • Get User's Top Artists and Tracks
  • Remove Albums for Current User
  • Remove Tracks for Current User
  • Check Current User's Saved Albums
  • Check Current User's Saved Tracks
  • Get Current User's Saved Albums
  • Get Current User's Saved Tracks
  • Save Albums for Current User
  • Save Tracks for Current User
  • Unfollow Artists or Users
  • Unfollow a Playlist
  • Check if Current User Follows Artists or Users
  • Get Followed Artists
  • Check if Users Follow a Playlist
  • Follow Artists or Users
  • Follow a Playlist
  • Get Available Genre Seeds
  • Get a List of Browse Categories
  • Get a Single Browse Category
  • Get a Category's playlists
  • Get a List of Featured Playlists
  • Get a List of New Releases
  • Get Recommendations Based on Seeds
  • Get an Artist's Albums
  • Get an Artist's Related Artists
  • Get an Artist's Top Tracks
  • Get an Artist
  • Get Several Artists
  • Get an Album's Tracks
  • Get an Album
  • Get Several Albums
  • Search for an Item

Author

πŸ‘€ Tsiry Sandratraina

Show your support

Give a ⭐️ if this project helped you!

Documentation ΒΆ

Index ΒΆ

Constants ΒΆ

This section is empty.

Variables ΒΆ

This section is empty.

Functions ΒΆ

This section is empty.

Types ΒΆ

type Actions ΒΆ

type Actions struct {
	Disallows *struct {
		Resuming bool `json:"resuming,omitempty"`
	} `json:"disallows,omitempty"`
}

type Album ΒΆ

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

type AlbumParams ΒΆ

type AlbumParams struct {
	IDs string `url:"ids,omitempty"`
}

type AlbumService ΒΆ

type AlbumService service

func (*AlbumService) Get ΒΆ

func (s *AlbumService) Get(ID string) (*Album, error)

func (*AlbumService) GetTracks ΒΆ

func (s *AlbumService) GetTracks(ID string, limit, offset int) (*Tracks, error)

func (*AlbumService) List ΒΆ

func (s *AlbumService) List(IDs string) (*AlbumsResult, error)

type Albums ΒΆ

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

type AlbumsResult ΒΆ

type AlbumsResult struct {
	Albums []Album `json:"albums,omitempty"`
}

type AnalysisMeta ΒΆ

type AnalysisMeta struct {
	AnalyzerVersion string  `json:"analyzer_version,omitempty"`
	Platform        string  `json:"platform,omitempty"`
	DetailedStatus  string  `json:"detailed_status,omitempty"`
	StatusCode      int     `json:"status,omitempty"`
	Timestamp       int64   `json:"timestamp,omitempty"`
	AnalysisTime    float64 `json:"analysis_time,omitempty"`
	InputProcess    string  `json:"input_process,omitempty"`
}

AnalysisMeta describes details about Spotify's audio analysis of the track

type AnalysisTrack ΒΆ

type AnalysisTrack struct {
	NumSamples              int64   `json:"num_samples,omitempty"`
	Duration                float64 `json:"duration,omitempty"`
	SampleMD5               string  `json:"sample_md5,omitempty"`
	OffsetSeconds           int     `json:"offset_seconds,omitempty"`
	WindowSeconds           int     `json:"window_seconds,omitempty"`
	AnalysisSampleRate      int64   `json:"analysis_sample_rate,omitempty"`
	AnalysisChannels        int     `json:"analysis_channels,omitempty"`
	EndOfFadeIn             float64 `json:"end_of_fade_in,omitempty"`
	StartOfFadeOut          float64 `json:"start_of_fade_out,omitempty"`
	Loudness                float64 `json:"loudness,omitempty"`
	Tempo                   float64 `json:"tempo,omitempty"`
	TempoConfidence         float64 `json:"tempo_confidence,omitempty"`
	TimeSignature           int     `json:"time_signature,omitempty"`
	TimeSignatureConfidence float64 `json:"time_signature_confidence,omitempty"`
	Key                     Key     `json:"key,omitempty"`
	KeyConfidence           float64 `json:"key_confidence,omitempty"`
	Mode                    Mode    `json:"mode,omitempty"`
	ModeConfidence          float64 `json:"mode_confidence,omitempty"`
	CodeString              string  `json:"codestring,omitempty"`
	CodeVersion             float64 `json:"code_version,omitempty"`
	EchoprintString         string  `json:"echoprintstring,omitempty"`
	EchoprintVersion        float64 `json:"echoprint_version,omitempty"`
	SynchString             string  `json:"synchstring,omitempty"`
	SynchVersion            float64 `json:"synch_version,omitempty"`
	RhythmString            string  `json:"rhythmstring,omitempty"`
	RhythmVersion           float64 `json:"rhythm_version,omitempty"`
}

AnalysisTrack contains audio analysis data about the track as a whole

type Artist ΒΆ

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

type ArtistAlbumsParams ΒΆ

type ArtistAlbumsParams struct {
	IncludeGroups string `url:"include_groups,omitempty"`
	Market        string `url:"market,omitempty"`
	Limit         int    `url:"limit,omitempty"`
	Offset        int    `url:"offset,omitempty"`
}

type ArtistParams ΒΆ

type ArtistParams struct {
	IDs string `url:"ids,omitempty"`
}

type ArtistService ΒΆ

type ArtistService service

func (*ArtistService) Get ΒΆ

func (s *ArtistService) Get(ID string) (*Artist, error)

func (*ArtistService) GetAlbums ΒΆ

func (s *ArtistService) GetAlbums(ID, includeGroups, market string, limit, offset int) (*Albums, error)

func (*ArtistService) GetTopTracks ΒΆ

func (s *ArtistService) GetTopTracks(ID, country string) (*TracksResult, error)

func (*ArtistService) List ΒΆ

func (s *ArtistService) List(IDs string) (*ArtistsResult, error)

func (*ArtistService) RelatedArtists ΒΆ

func (s *ArtistService) RelatedArtists(ID string) (*ArtistsResult, error)

type Artists ΒΆ

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

type ArtistsResult ΒΆ

type ArtistsResult struct {
	Artists []Artist `json:"artists,omitempty"`
}

type AudioAnalysis ΒΆ

type AudioAnalysis struct {
	Bars     []Marker      `json:"bars,omitempty"`
	Beats    []Marker      `json:"beats,omitempty"`
	Meta     AnalysisMeta  `json:"meta,omitempty"`
	Sections []Section     `json:"sections,omitempty"`
	Segments []Segment     `json:"segments,omitempty"`
	Tatums   []Marker      `json:"tatums,omitempty"`
	Track    AnalysisTrack `json:"track,omitempty"`
}

type AudioFeatures ΒΆ

type AudioFeatures struct {
	Danceability     float32 `json:"danceablity,omitempty"`
	Energy           float32 `json:"energy,omitempty"`
	Key              int     `json:"key,omitempty"`
	Loudness         float32 `json:"loudness,omitempty"`
	Mode             int     `json:"mode,omitempty"`
	Speechiness      float32 `json:"speechiness,omitempty"`
	Acousticness     float32 `json:"acousticness,omitempty"`
	Instrumentalness float32 `json:"instrumentalness,omitempty"`
	Liveness         float32 `json:"liveness,omitempty"`
	Valence          float32 `json:"valence,omitempty"`
	Tempo            float32 `json:"tempo,omitempty"`
	Type             string  `json:"type,omitempty"`
	ID               ID      `json:"id,omitempty"`
	URI              URI     `json:"uri,omitempty"`
	TrackHref        string  `json:"track_href,omitempty"`
	AnalysisURL      string  `json:"analysis_url,omitempty"`
	DurationMS       int     `json:"duration_ms,omitempty"`
	TimeSignature    int     `json:"time_signature,omitempty"`
}

type AudioFeaturesResult ΒΆ

type AudioFeaturesResult struct {
	AudioFeatures []AudioFeatures `json:"audio_features,omitempty"`
}

type CategoryService ΒΆ

type CategoryService service

type Client ΒΆ

type Client struct {
	Album    *AlbumService
	Artist   *ArtistService
	Category *CategoryService
	Library  *LibraryService
	Me       *MeService
	Playlist *PlaylistService
	Player   *PlayerService
	Search   *SearchService
	Track    *TrackService
	User     *UserService
	// contains filtered or unexported fields
}

func NewClient ΒΆ

func NewClient(accessToken string) *Client

type Context ΒΆ

type Context struct {
	ExternalURLs ExternalURLs `json:"external_urls,omitempty"`
	Href         string       `json:"href,omitempty"`
	Type         string       `json:"type,omitempty"`
	URI          URI          `json:"uri,omitempty"`
}
type Copyright struct {
	Text string `json:"text,omitempty"`
	Type string `json:"type,omitempty"`
}

type CountryParams ΒΆ

type CountryParams struct {
	Country string `url:"country,omitempty"`
}

type CreatePlaylist ΒΆ

type CreatePlaylist struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Public      bool   `json:"public"`
}

type Error ΒΆ

type Error struct {
	Status  int    `json:"status,omitempty"`
	Message string `json:"message,omitempty"`
}

type ExternalIDs ΒΆ

type ExternalIDs struct {
	UPC string `json:"upc,omitempty"`
}

type ExternalURLs ΒΆ

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

type Followers ΒΆ

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

type ID ΒΆ

type ID string

ID is a base-62 identifier for an artist, track, album, etc. It can be found at the end of a spotify.URI.

type Image ΒΆ

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

type Key ΒΆ

type Key int

type LibraryParams ΒΆ

type LibraryParams struct {
	IDs string `url:"ids"`
}

type LibraryService ΒΆ

type LibraryService service

func (*LibraryService) CheckCurrentUserSavedAlbums ΒΆ

func (s *LibraryService) CheckCurrentUserSavedAlbums(IDs string) (*[]bool, error)

func (*LibraryService) CheckCurrentUserSavedTracks ΒΆ

func (s *LibraryService) CheckCurrentUserSavedTracks(IDs string) (*[]bool, error)

func (*LibraryService) GetCurrentUserSavedAlbums ΒΆ

func (s *LibraryService) GetCurrentUserSavedAlbums(limit, offset int) (*SavedAlbums, error)

func (*LibraryService) GetCurrentUserSavedTracks ΒΆ

func (s *LibraryService) GetCurrentUserSavedTracks(limit, offset int) (*SavedTracks, error)

type Marker ΒΆ

type Marker struct {
	Start      float64 `json:"start,omitempty"`
	Duration   float64 `json:"duration,omitempty"`
	Confidence float64 `json:"confidence,omitempty"`
}

Marker represents beats, bars, tatums and are used in segment and section descriptions.

type MeService ΒΆ

type MeService service

type Mode ΒΆ

type Mode int

type PaginationParams ΒΆ

type PaginationParams struct {
	Limit  int `url:"limit"`
	Offset int `url:"offset"`
}

type PlayerService ΒΆ

type PlayerService service

func (*PlayerService) GetCurrentlyPlaying ΒΆ

func (s *PlayerService) GetCurrentlyPlaying() (*PlayingTrack, error)

func (*PlayerService) GetRecentlyPlayed ΒΆ

func (s *PlayerService) GetRecentlyPlayed(filter string, limit, after int) (*RecentlyPlayedTracks, error)

type PlayingTrack ΒΆ

type PlayingTrack struct {
	Timestamp            int      `json:"timestamp,omitempty"`
	Context              *Context `json:"context,omitempty"`
	ProgressMS           int      `json:"progress_ms,omitempty"`
	Item                 *Track   `json:"item,omitempty"`
	CurrentlyPlayingType string   `json:"currently_playing_type,omitempty"`
	Actions              *Actions `json:"actions,omitempty"`
	IsPlaying            bool     `json:"is_playing,omitempty"`
}

type Playlist ΒΆ

type Playlist struct {
	Collaborative bool            `json:"collaborative,omitempty"`
	Description   string          `json:"description,omitempty"`
	ExternalURLs  *ExternalURLs   `json:"external_urls,omitempty"`
	Followers     *Followers      `json:"followers,omitempty"`
	Href          string          `json:"href,omitempty"`
	ID            ID              `json:"id,omitempty"`
	Images        []Image         `json:"images,omitempty"`
	Name          string          `json:"name,omitempty"`
	Owner         *Profile        `json:"profile,omitempty"`
	PrimaryColor  string          `json:"primary_color,omitempty"`
	Public        bool            `json:"public,omitempty"`
	SnapshotID    string          `json:"snapshot_id,omitempty"`
	Tracks        *PlaylistTracks `json:"tracks,omitempty"`
}

type PlaylistAddTracks ΒΆ

type PlaylistAddTracks struct {
	SnapshotID string `json:"snapshot_id"`
}

type PlaylistService ΒΆ

type PlaylistService service

func (*PlaylistService) AddTracksToPlaylists ΒΆ

func (s *PlaylistService) AddTracksToPlaylists(playlistID string, tracksIDS string) (*PlaylistAddTracks, error)

func (*PlaylistService) CreatePlaylist ΒΆ

func (s *PlaylistService) CreatePlaylist(userID string, name string, description string, public bool) (*CreatePlaylist, error)

func (*PlaylistService) Get ΒΆ

func (s *PlaylistService) Get(ID string) (*Playlist, error)

func (*PlaylistService) GetCoverImages ΒΆ

func (s *PlaylistService) GetCoverImages(ID string) (*[]Image, error)

func (*PlaylistService) GetCurrentUserPlaylists ΒΆ

func (s *PlaylistService) GetCurrentUserPlaylists(limit, offset int) (*Playlists, error)

func (*PlaylistService) GetTracks ΒΆ

func (s *PlaylistService) GetTracks(ID string, limit, offset int) (*PlaylistTracks, error)

func (*PlaylistService) GetUserPlaylists ΒΆ

func (s *PlaylistService) GetUserPlaylists(userID string, limit, offset int) (*Playlists, error)

type PlaylistTracks ΒΆ

type PlaylistTracks struct {
	Href  string `json:"href,omitempty"`
	Items []struct {
		AddedAt        string   `json:"added_at,omitempty"`
		AddedBy        *Profile `json:"added_by,omitempty"`
		IsLocal        bool     `json:"is_local,omitempty"`
		PrimaryColor   string   `json:"primary_color,omitempty"`
		Track          *Track   `json:"track,omitempty"`
		VideoThumbnail *struct {
			URL string `json:"url,omitempty"`
		} `json:"video_thumbnail,omitempty"`
	} `json:"items,omitempty"`
}

type Playlists ΒΆ

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

type Profile ΒΆ

type Profile struct {
	DisplayName  string        `json:"display_name,omitempty"`
	ExternalURLs *ExternalURLs `json:"external_urls,omitempty"`
	Followers    *Followers    `json:"followers,omitempty"`
	Href         string        `json:"href,omitempty"`
	ID           ID            `json:"id,omitempty"`
	Images       []Image       `json:"images,omitempty"`
	Type         string        `json:"type,omitempty"`
	URI          URI           `json:"uri,omitempty"`
}

type RecentlyPlayedTracks ΒΆ

type RecentlyPlayedTracks struct {
	Items []struct {
		Track    *Track   `json:"track,omitempty"`
		PlayedAt string   `json:"played_at,omitempty"`
		Context  *Context `json:"context,omitempty"`
	} `json:"items,omitempty"`
	Next    string `json:"next,omitempty"`
	Cursors *struct {
		After  string `json:"after,omitempty"`
		Before string `json:"before,omitempty"`
	} `json:"cursors,omitempty"`
	Limit int    `json:"limit,omitempty"`
	Href  string `json:"href,omitmepty"`
}

type RecentlyPlayedTracksParams ΒΆ

type RecentlyPlayedTracksParams struct {
	Type  string `url:"type"`
	Limit int    `url:"type"`
	After int    `url:"after"`
}

type SavedAlbums ΒΆ

type SavedAlbums struct {
	Href  string `json:"href,omitempty"`
	Items []struct {
		AddedAt string `json:"added_at,omitempty"`
		Album   *Album `json:"album,omitempty"`
	} `json:"items,omitempty"`
	Limit    int    `json:"limit,omitempty"`
	Next     string `json:"next,omitempty"`
	Offset   int    `json:"offset,omitempty"`
	Previous string `json:"previous,omitempty"`
	Total    int    `json:"total,omitempty"`
}

type SavedTracks ΒΆ

type SavedTracks struct {
	Href  string `json:"href,omitempty"`
	Items []struct {
		AddedAt string `json:"added_at,omitempty"`
		Track   *Track `json:"track,omitempty"`
	} `json:"items,omitempty"`
	Limit    int    `json:"limit,omitempty"`
	Next     string `json:"next,omitempty"`
	Offset   int    `json:"offset,omitempty"`
	Previous string `json:"previous,omitempty"`
	Total    int    `json:"total,omitempty"`
}

type SearchParams ΒΆ

type SearchParams struct {
	Q      string `url:"q"`
	Type   string `url:"type"`
	Limit  int    `url:"limit"`
	Offset int    `url:"offset"`
}

type SearchResult ΒΆ

type SearchResult struct {
	Artists *Artists `json:"artists,omitempty"`
	Tracks  *Tracks  `json:"tracks,omitempty"`
	Albums  *Artists `json:"albums,omitempty"`
}

type SearchService ΒΆ

type SearchService service

func (*SearchService) Get ΒΆ

func (s *SearchService) Get(query, filter string, limit, offset int) (*SearchResult, error)

type Section ΒΆ

type Section struct {
	Marker
	Loudness                float64 `json:"loudness,omitempty"`
	Tempo                   float64 `json:"tempo,omitempty"`
	TempoConfidence         float64 `json:"tempo_confidence,omitempty"`
	Key                     Key     `json:"key,omitempty"`
	KeyConfidence           float64 `json:"key_confidence,omitempty"`
	Mode                    Mode    `json:"mode,omitempty"`
	ModeConfidence          float64 `json:"mode_confidence,omitempty"`
	TimeSignature           int     `json:"time_signature,omitempty"`
	TimeSignatureConfidence float64 `json:"time_signature_confidence,omitempty"`
}

Section represents a large variation 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.

type Segment ΒΆ

type Segment struct {
	Marker
	LoudnessStart   float64   `json:"loudness_start,omitempty"`
	LoudnessMaxTime float64   `json:"loudness_max_time,omitempty"`
	LoudnessMax     float64   `json:"loudness_max,omitempty"`
	LoudnessEnd     float64   `json:"loudness_end,omitempty"`
	Pitches         []float64 `json:"pitches,omitempty"`
	Timbre          []float64 `json:"timbre,omitempty"`
}

Segment is characterized by it's perceptual onset and duration in seconds, loudness (dB), pitch and timbral content.

type SpfError ΒΆ

type SpfError struct {
	Error `json:"error,omitempty"`
}

type Track ΒΆ

type Track struct {
	Artists     []Artist     `json:"artists,omitempty"`
	Album       *Album       `json:"album,omitempty"`
	ExternalIDs *ExternalIDs `json:"external_ids,omitempty"`
	Popularity  int          `json:"popularity,omitempty"`
	DiscNumber  int          `json:"disc_number,omitempty"`
	DurationMS  int          `json:"duration_ms,omitempty"`
	ID          string       `json:"id,omitempty"`
	Href        string       `json:"href,omitempty"`
	IsLocal     bool         `json:"is_local,omitempty"`
	IsPlayable  bool         `json:"is_playable,omitempty"`
	Name        string       `json:"name,omitempty"`
	PreviewURL  string       `json:"preview_url,omitempty"`
	TrackNumber int          `json:"track_number,omitempty"`
	Type        string       `json:"type,omitempty"`
	URI         string       `json:"uri,omitempty"`
}

type TrackParams ΒΆ

type TrackParams struct {
	IDs string `url:"ids,omitempty"`
}

type TrackService ΒΆ

type TrackService service

func (*TrackService) AudioAnalysis ΒΆ

func (s *TrackService) AudioAnalysis(ID string) (*AudioAnalysis, error)

func (*TrackService) AudioFeatures ΒΆ

func (s *TrackService) AudioFeatures(IDs string) (*AudioFeaturesResult, error)

func (*TrackService) AudioFeaturesByTrackID ΒΆ

func (s *TrackService) AudioFeaturesByTrackID(ID string) (*AudioFeatures, error)

func (*TrackService) Get ΒΆ

func (s *TrackService) Get(ID string) (*Track, error)

func (*TrackService) List ΒΆ

func (s *TrackService) List(IDs string) (*TracksResult, error)

type Tracks ΒΆ

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

type TracksResult ΒΆ

type TracksResult struct {
	Tracks []Track `json:"tracks,omitempty"`
}

type URI ΒΆ

type URI string

URI identifies an artist, album, track, or category. For example, spotify:track:6rqhFgbbKwnb9MLmUQDhG6

type UserService ΒΆ

type UserService service

func (*UserService) GetProfile ΒΆ

func (s *UserService) GetProfile(ID string) (*Profile, error)

Jump to

Keyboard shortcuts

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