api

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig() error

func SaveConfig

func SaveConfig() error

func SubsonicCoverArt

func SubsonicCoverArt(id string) ([]byte, error)

func SubsonicPing

func SubsonicPing() error

func SubsonicScrobble

func SubsonicScrobble(id string, submission bool)

func SubsonicStar

func SubsonicStar(id string)

func SubsonicStream

func SubsonicStream(id string) string

func SubsonicUnstar

func SubsonicUnstar(id string)

Types

type Album

type Album struct {
	ID     string `json:"id"`
	Name   string `json:"name"`
	Artist string `json:"artist"`
}

func SubsonicGetArtist

func SubsonicGetArtist(id string) ([]Album, error)

func SubsonicSearchAlbum

func SubsonicSearchAlbum(query string, page int) ([]Album, error)

type Artist

type Artist struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

func SubsonicSearchArtist

func SubsonicSearchArtist(query string, page int) ([]Artist, error)

type Config

type Config struct {
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	URL      string `yaml:"URL"`
}
var AppConfig Config

type Playlist

type Playlist struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

func SubsonicGetPlaylists

func SubsonicGetPlaylists() ([]Playlist, error)

type SearchResult3

type SearchResult3 struct {
	Artists []Artist `json:"artist"`
	Albums  []Album  `json:"album"`
	Songs   []Song   `json:"song"`
}

func SubsonicGetStarred

func SubsonicGetStarred() (*SearchResult3, error)

type Song

type Song struct {
	ID       string `json:"id"`
	Title    string `json:"title"`
	Artist   string `json:"artist"`
	Album    string `json:"album"`
	Duration int    `json:"duration"`
}

func SubsonicGetAlbum

func SubsonicGetAlbum(id string) ([]Song, error)

func SubsonicGetPlaylistSongs

func SubsonicGetPlaylistSongs(id string) ([]Song, error)

func SubsonicSearchSong

func SubsonicSearchSong(query string, page int) ([]Song, error)

type SubsonicResponse

type SubsonicResponse struct {
	Response struct {
		Status            string        `json:"status"`
		SearchResult      SearchResult3 `json:"searchResult3"`
		PlaylistContainer struct {
			Playlists []Playlist `json:"playlist"`
		} `json:"playlists"`
		PlaylistDetail struct {
			Entries []Song `json:"entry"`
		} `json:"playlist"`
		Album struct {
			Songs []Song `json:"song"`
		} `json:"album"`
		Artist struct {
			Albums []Album `json:"album"`
		} `json:"artist"`
		Starred2 struct {
			Artist []Artist `json:"artist"`
			Album  []Album  `json:"album"`
			Song   []Song   `json:"song"`
		} `json:"starred2"`
	} `json:"subsonic-response"`
}

Jump to

Keyboard shortcuts

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