spotify

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth interface {
	GetAuthURL(state string) string
	Exchange(ctx context.Context, code string) (*oauth2.Token, error)
	Refresh(ctx context.Context, token *oauth2.Token) (*oauth2.Token, error)
}

Auth はSpotify OAuthに関連したAPIを呼び出すためのインターフェイスです。

type Player

type Player interface {
	CurrentlyPlaying(ctx context.Context) (*entity.CurrentPlayingInfo, error)
	PlayWithTracksAndPosition(ctx context.Context, deviceID string, trackURIs []string, position time.Duration) error
	Pause(ctx context.Context, deviceID string) error
	Enqueue(ctx context.Context, trackURI string, deviceID string) error
	SetRepeatMode(ctx context.Context, on bool, deviceID string) error
	SetShuffleMode(ctx context.Context, on bool, deviceID string) error
	DeleteAllTracksInQueue(ctx context.Context, deviceID string, trackURI string) error
	GoNextTrack(ctx context.Context, deviceID string) error
}

Player はSpotifyの曲の操作に関連するAPIを呼び出すためのインターフェースです。

type TrackClient

type TrackClient interface {
	Search(ctx context.Context, q string) ([]*entity.Track, error)
	GetTracksFromURI(ctx context.Context, trackURIs []string) ([]*entity.Track, error)
}

TrackClient はSpotifyの音楽に関連したAPIを呼び出すためのインターフェイスです。

type User

type User interface {
	GetMe(ctx context.Context) (*entity.SpotifyUser, error)
	GetActiveDevices(ctx context.Context) ([]*entity.Device, error)
}

User はSpotifyのユーザに関連したAPIを呼び出すためのインターフェイスです。

Jump to

Keyboard shortcuts

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