Documentation ¶
Overview ¶
Package rest implements the REST API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Folder ¶
Folder represents a music folder. It can be any folder in the filesystem hierarchy such as an album, an artist folder containing many albums, a genre folder containing many artists, etc. It is output by the REST API.
type FolderContents ¶
FolderContents represents the contents of a folder. It can contain SubFolders and Songs
type Song ¶
type Song struct { Title string `json:"title"` // Title is the song's title. E.g. "Know Your Enemy" // TrackNumber uint `json:"trackNumber"` // TrackNumber is the track number of the song. E.g. "3" // DiskNumber uint `json:"diskNumber"` // DiskNumber is the disk number of the song. E.g. "1" // Artist string `json:"artist"` // Artist is the name of the main artist. E.g. "Yoko Kanno" // Duration uint `json:"duration"` // Duration is the duration of the song in seconds. E.g. "165" URI string `json:"uri"` // URI to access this song on this server. E.g. "/music/Yoko%20Kanno/1-03%20-Know%20Your%20Enemy.flac" }
Song represents a music file. It is distinguished by media type (audio/mp3, audio/flac, etc.) Most of its fields mirror tags such as ID3 tags for MP3. It is output by the REST API.
type SubFolder ¶
type SubFolder struct { Name string `json:"name"` // Basename of the folder Path string `json:"path"` // Path from the root music folder. For example "Yoko%20Kanno" }
SubFolder represents a music folder that is a child of a Folder. We do not expose its items yet, another HTTP request is needed to expose them.