getplaylist

package
v0.7.11 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddedBy

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

type Album

type Album struct {
	AlbumType            string    `json:"album_type"`
	Artists              []Artists `json:"artists"`
	Href                 string    `json:"href"`
	ID                   string    `json:"id"`
	Images               []Images  `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 Artists

type Artists struct {
	Href string `json:"href"`
	ID   string `json:"id"`
	Name string `json:"name"`
	Type string `json:"type"`
	URI  string `json:"uri"`
}

type ExternalIds

type ExternalIds struct {
	Isrc string `json:"isrc"`
}

type Images

type Images struct {
	URL string `json:"url"`
}

type Items

type Items struct {
	AddedAt time.Time    `json:"added_at"`
	AddedBy AddedBy      `json:"added_by"`
	IsLocal bool         `json:"is_local"`
	Track   SpotifyTrack `json:"track,omitempty"`
}

type LinkedFrom

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

type Owner

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

type SpotifyData

type SpotifyData struct {
	Description string   `json:"description"`
	Href        string   `json:"href"`
	ID          string   `json:"id"`
	Images      []Images `json:"images"`
	Name        string   `json:"name"`
	Owner       Owner    `json:"owner"`
	Public      bool     `json:"public"`
	SnapshotID  string   `json:"snapshot_id"`
	Tracks      Tracks   `json:"tracks"`
	Type        string   `json:"type"`
	URI         string   `json:"uri"`
}

type SpotifyTrack

type SpotifyTrack struct {
	Album       Album       `json:"album"`
	Artists     []Artists   `json:"artists"`
	DiscNumber  int         `json:"disc_number"`
	DurationMs  int         `json:"duration_ms"`
	Episode     bool        `json:"episode"`
	Explicit    bool        `json:"explicit"`
	ExternalIds ExternalIds `json:"external_ids"`
	Href        string      `json:"href"`
	ID          string      `json:"id"`
	IsLocal     bool        `json:"is_local"`
	IsPlayable  bool        `json:"is_playable"`
	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 Track

type Track struct {
	Number int    `json:"number"`
	Title  string `json:"title"`
	Artist string `json:"artist"`
}

Track is the basic track entity

func GetTracks

func GetTracks(spotifyURL string) (playlistName string, tracks []Track, err error)

GetTracks will return the playlist name and list of tracks from a Spotify playlist

type Tracks

type Tracks struct {
	Href   string  `json:"href"`
	Items  []Items `json:"items"`
	Limit  int     `json:"limit"`
	Offset int     `json:"offset"`
	Total  int     `json:"total"`
}

Jump to

Keyboard shortcuts

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