provider

package
v0.0.0-...-be84f31 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FullPlaylist

type FullPlaylist struct {
	Playlist
	Tracks []Track
}

type Playlist

type Playlist struct {
	ID      PlaylistID
	Name    string
	Tracks  uint
	Creator string
}

type PlaylistID

type PlaylistID string

type Provider

type Provider interface {
	Name() string
	IsLoggedIn() bool
	GetPlaylists() ([]Playlist, error)
	CreatePlaylist(name string) (PlaylistID, error)
	FindTrack(name string) (TrackID, error)
	FindPlaylistByName(name string) (PlaylistID, error)
	GetFullPlaylist(id string) (*FullPlaylist, error)
	AddToPlaylist(playlistId string, trackId string) error
}

type TokenProvider

type TokenProvider interface {
	GetToken() (*oauth2.Token, error)
	RefreshToken() (*oauth2.Token, error)
}

type Track

type Track struct {
	ID      string
	Name    string
	Artists []string
}

func (Track) FullName

func (t Track) FullName() string

type TrackID

type TrackID string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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