spotifyapi

package
v0.0.0-...-33a2a00 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConsumePaginatedEndpoint

func ConsumePaginatedEndpoint[T any](client *spotify.Client, paginatedEndpoint PaginatedEndpoint[T], options *PageOptions) <-chan T

Types

type AllUserPlaylistPaginator

type AllUserPlaylistPaginator struct {
}

func NewAllUserPlaylistPaginator

func NewAllUserPlaylistPaginator() *AllUserPlaylistPaginator

func (*AllUserPlaylistPaginator) RequestData

func (_ *AllUserPlaylistPaginator) RequestData(client *spotify.Client, options *PageOptions, ch chan []spotify.SimplePlaylist) bool

type ItemsPaginator

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

func NewItemsPaginator

func NewItemsPaginator(playlistId spotify.ID) *ItemsPaginator

func (*ItemsPaginator) RequestData

func (p *ItemsPaginator) RequestData(client *spotify.Client, options *PageOptions, ch chan PlaylistItem) bool

type PageOptions

type PageOptions struct {
	Offset int
	Limit  int
}

func DefaultPageOptions

func DefaultPageOptions() *PageOptions

func NewPageOptions

func NewPageOptions(limit int, offset int) *PageOptions

type PaginatedEndpoint

type PaginatedEndpoint[T any] interface {
	RequestData(*spotify.Client, *PageOptions, chan T) bool
}

type PlaylistItem

type PlaylistItem struct {
	Track    spotify.SimpleTrack
	Position int
}

Jump to

Keyboard shortcuts

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