zvuk

package
v0.0.0-...-ac441f4 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RemoteName shared.RemoteName = "Zvuk"
)

Variables

This section is empty.

Functions

func NewAccount

func NewAccount(ctx context.Context, alias string, token string) (shared.Account, error)

func Reauth

func Reauth(ctx context.Context,
	account shared.Account,
	accessToken string) error

Types

type AccountActions

type AccountActions struct {
	// contains filtered or unexported fields
}

func (AccountActions) LikedAlbums

func (e AccountActions) LikedAlbums() shared.LikedActions

func (AccountActions) LikedArtists

func (e AccountActions) LikedArtists() shared.LikedActions

func (AccountActions) LikedTracks

func (e AccountActions) LikedTracks() shared.LikedActions

func (AccountActions) Playlist

func (e AccountActions) Playlist() shared.PlaylistActions

type Actions

type Actions struct {
	// contains filtered or unexported fields
}

func (Actions) Album

func (Actions) Artist

func (Actions) SearchAlbums

func (e Actions) SearchAlbums(ctx context.Context, what shared.RemoteAlbum) ([10]shared.RemoteAlbum, error)

func (Actions) SearchArtists

func (e Actions) SearchArtists(ctx context.Context, what shared.RemoteArtist) ([10]shared.RemoteArtist, error)

func (Actions) SearchTracks

func (e Actions) SearchTracks(ctx context.Context, what shared.RemoteTrack) ([10]shared.RemoteTrack, error)

func (Actions) Track

type Album

type Album struct {
	*Entity
	// contains filtered or unexported fields
}

func (Album) Artists

func (e Album) Artists() []shared.RemoteArtist

func (Album) CoverURL

func (e Album) CoverURL() *url.URL

func (Album) EAN

func (e Album) EAN() *string

func (Album) TrackCount

func (e Album) TrackCount() int

func (Album) UPC

func (e Album) UPC() *string

func (Album) Year

func (e Album) Year() int

type AlbumsSearchAction

type AlbumsSearchAction struct {
	// contains filtered or unexported fields
}

func (AlbumsSearchAction) Search

type Artist

type Artist struct {
	*Entity
	// contains filtered or unexported fields
}

func (*Artist) OldestAlbumsNames

func (e *Artist) OldestAlbumsNames(ctx context.Context) ([20]string, error)

func (*Artist) OldestSinglesNames

func (e *Artist) OldestSinglesNames(ctx context.Context) ([20]string, error)

type ArtistsSearchAction

type ArtistsSearchAction struct {
	// contains filtered or unexported fields
}

func (ArtistsSearchAction) Search

type Entity

type Entity struct {
	// contains filtered or unexported fields
}

func (Entity) ID

func (e Entity) ID() shared.RemoteID

func (Entity) Name

func (e Entity) Name() string

func (Entity) RemoteName

func (e Entity) RemoteName() shared.RemoteName

type LikedAlbumsActions

type LikedAlbumsActions struct {
	// contains filtered or unexported fields
}

func (LikedAlbumsActions) Like

func (LikedAlbumsActions) Liked

func (LikedAlbumsActions) Unlike

func (e LikedAlbumsActions) Unlike(ctx context.Context, ids []shared.RemoteID) error

type LikedArtistsActions

type LikedArtistsActions struct {
	// contains filtered or unexported fields
}

func (LikedArtistsActions) Like

func (LikedArtistsActions) Liked

func (LikedArtistsActions) Unlike

func (e LikedArtistsActions) Unlike(ctx context.Context, ids []shared.RemoteID) error

type LikedTracksActions

type LikedTracksActions struct {
	// contains filtered or unexported fields
}

func (LikedTracksActions) Like

func (LikedTracksActions) Liked

func (LikedTracksActions) Unlike

func (e LikedTracksActions) Unlike(ctx context.Context, ids []shared.RemoteID) error

type Playlist

type Playlist struct {
	*Entity
	// contains filtered or unexported fields
}

func (*Playlist) AddTracks

func (e *Playlist) AddTracks(ctx context.Context, ids []shared.RemoteID) error

func (Playlist) Description

func (e Playlist) Description() *string

func (Playlist) FromAccount

func (e Playlist) FromAccount() shared.Account

func (*Playlist) IsVisible

func (e *Playlist) IsVisible() (bool, error)

func (*Playlist) RemoveTracks

func (e *Playlist) RemoveTracks(ctx context.Context, ids []shared.RemoteID) error

func (*Playlist) Rename

func (e *Playlist) Rename(ctx context.Context, newName string) error

func (*Playlist) SetDescription

func (e *Playlist) SetDescription(ctx context.Context, newDesc string) error

func (*Playlist) SetIsVisible

func (e *Playlist) SetIsVisible(ctx context.Context, val bool) error

func (*Playlist) Tracks

func (e *Playlist) Tracks(ctx context.Context) ([]shared.RemoteTrack, error)

type PlaylistActions

type PlaylistActions struct {
	// contains filtered or unexported fields
}

func (PlaylistActions) Create

func (e PlaylistActions) Create(ctx context.Context, name string, isVisible bool, description *string) (shared.RemotePlaylist, error)

func (PlaylistActions) Delete

func (e PlaylistActions) Delete(ctx context.Context, ids []shared.RemoteID) error

func (*PlaylistActions) MyPlaylists

func (e *PlaylistActions) MyPlaylists(ctx context.Context) ([]shared.RemotePlaylist, error)

func (PlaylistActions) Playlist

type Remote

type Remote struct {
}

func (Remote) Actions

func (s Remote) Actions() (shared.RemoteActions, error)

func (Remote) AssignAccountActions

func (s Remote) AssignAccountActions(account shared.Account) (shared.AccountActions, error)

func (*Remote) Boot

func (s *Remote) Boot(repo shared.RemoteRepository) error

func (Remote) EntityURL

func (e Remote) EntityURL(etype shared.EntityType, id shared.RemoteID) url.URL

func (Remote) Name

func (s Remote) Name() shared.RemoteName

func (Remote) Repository

func (s Remote) Repository() shared.RemoteRepository

type Track

type Track struct {
	*Entity
	// contains filtered or unexported fields
}

func (*Track) Album

func (e *Track) Album() (shared.RemoteAlbum, error)

func (*Track) Artists

func (e *Track) Artists() []shared.RemoteArtist

func (*Track) CoverURL

func (e *Track) CoverURL() *url.URL

func (Track) ISRC

func (e Track) ISRC() *string

func (Track) LengthMs

func (e Track) LengthMs() int

func (*Track) Year

func (e *Track) Year() int

type TracksSearchAction

type TracksSearchAction struct {
	// contains filtered or unexported fields
}

func (TracksSearchAction) Search

Jump to

Keyboard shortcuts

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