v2

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AllTracksPlaylistID = "all-tracks"
	TASOwnerID          = "tas-owner"
)

Variables

This section is empty.

Functions

func TASOwnerIncluded

func TASOwnerIncluded() server.ArtistData

func TASOwnerRels

func TASOwnerRels() server.RelationshipList

Types

type Handlers

type Handlers struct {
	DB          *db.DB
	BaseURL     string
	AuthEnabled bool
}

Handlers holds shared dependencies for all v2 HTTP handlers.

func (*Handlers) AlbumHandler

func (h *Handlers) AlbumHandler(w http.ResponseWriter, r *http.Request)

func (*Handlers) AlbumItemsHandler

func (h *Handlers) AlbumItemsHandler(w http.ResponseWriter, r *http.Request)

func (*Handlers) ArtistHandler

func (h *Handlers) ArtistHandler(w http.ResponseWriter, r *http.Request)

func (*Handlers) ArtistPageHandler

func (h *Handlers) ArtistPageHandler(w http.ResponseWriter, r *http.Request)

ArtistPageHandler handles /v2/artist/{id} (singular, v2 page format).

func (*Handlers) FeedStub

func (h *Handlers) FeedStub(w http.ResponseWriter, r *http.Request)

func (*Handlers) HomeFeedStaticHandler

func (h *Handlers) HomeFeedStaticHandler(w http.ResponseWriter, r *http.Request)

HomeFeedStaticHandler returns a v2.Page with local library sections. Home uses PageItem with Type=HORIZONTAL_LIST containing Item objects.

func (*Handlers) PlaylistHandler

func (h *Handlers) PlaylistHandler(w http.ResponseWriter, r *http.Request)

func (*Handlers) PlaylistItemsHandler

func (h *Handlers) PlaylistItemsHandler(w http.ResponseWriter, r *http.Request)

func (*Handlers) Register

func (h *Handlers) Register(r chi.Router)

Register wires all v2 routes onto the given router.

func (*Handlers) SearchAlbumsHandler

func (h *Handlers) SearchAlbumsHandler(w http.ResponseWriter, r *http.Request)

func (*Handlers) SearchArtistsHandler

func (h *Handlers) SearchArtistsHandler(w http.ResponseWriter, r *http.Request)

func (*Handlers) SearchHandler

func (h *Handlers) SearchHandler(w http.ResponseWriter, r *http.Request)

func (*Handlers) SearchPlaylistsHandler

func (h *Handlers) SearchPlaylistsHandler(w http.ResponseWriter, r *http.Request)

func (*Handlers) SearchTracksHandler

func (h *Handlers) SearchTracksHandler(w http.ResponseWriter, r *http.Request)

func (*Handlers) TrackHandler

func (h *Handlers) TrackHandler(w http.ResponseWriter, r *http.Request)

func (*Handlers) UserCollectionAlbumsHandler

func (h *Handlers) UserCollectionAlbumsHandler(w http.ResponseWriter, r *http.Request)

func (*Handlers) UserCollectionArtistsHandler

func (h *Handlers) UserCollectionArtistsHandler(w http.ResponseWriter, r *http.Request)

func (*Handlers) UserCollectionHandler

func (h *Handlers) UserCollectionHandler(w http.ResponseWriter, r *http.Request)

func (*Handlers) UserCollectionPlaylistsHandler

func (h *Handlers) UserCollectionPlaylistsHandler(w http.ResponseWriter, r *http.Request)

func (*Handlers) UserCollectionTracksHandler

func (h *Handlers) UserCollectionTracksHandler(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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