responses

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2022 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LibraryDirectory

type LibraryDirectory struct {
	XMLName xml.Name `xml:"Directory"`
	Type    string   `xml:"type,attr"`
	Key     string   `xml:"key,attr"`
	Title   string   `xml:"title,attr"`
}

type LibraryMediaContainer

type LibraryMediaContainer struct {
	XMLName     xml.Name           `xml:"MediaContainer"`
	Directories []LibraryDirectory `xml:"Directory"`
}

type ResponseAlbumDirectory

type ResponseAlbumDirectory struct {
	XMLName xml.Name `xml:"Directory"`
	//Will always be album
	Type string `xml:"type,attr"`
	//This is the endpoint we use to interact with this album
	//example /library/metadata/33342/children
	Key string `xml:"key,attr"`
	//Album title
	Title string `xml:"title,attr"`
	//This is like the artist's ID. We can use it to reverse engineer
	//the key. This makes running commands easier
	RatingKey string `xml:"ratingKey,attr"`
	//Artist Name
	ParentTitle string `xml:"parentTitle,attr"`
}

type ResponseAlbumMediaContainer

type ResponseAlbumMediaContainer struct {
	XMLName     xml.Name                 `xml:"MediaContainer"`
	Directories []ResponseAlbumDirectory `xml:"Directory"`
}

type ResponseArtistDirectory

type ResponseArtistDirectory struct {
	XMLName xml.Name `xml:"Directory"`
	//Will always be artist
	Type string `xml:"type,attr"`
	//This is the endpoint we use to interact with this artist
	//example /library/metadata/100098/children
	Key string `xml:"key,attr"`
	//Artist title
	Title string `xml:"title,attr"`
	//This is like the artist's ID. We can use it to reverse engineer
	//the key. This makes running commands easier
	RatingKey string `xml:"ratingKey,attr"`
}

type ResponseArtistMediaContainer

type ResponseArtistMediaContainer struct {
	XMLName     xml.Name                  `xml:"MediaContainer"`
	Directories []ResponseArtistDirectory `xml:"Directory"`
}

type ResponseTrack

type ResponseTrack struct {
	XMLName xml.Name `xml:"Track"`
	//Will always be album
	Type string `xml:"type,attr"`
	//This is the endpoint we use to play a song
	//key="/library/parts/77708/1574343480/file.mp3"
	Key string `xml:"key,attr"`
	//Album title
	Title string `xml:"title,attr"`
	//This is like the artist's ID. We can use it to reverse engineer
	//the key. This makes running commands easier
	RatingKey string `xml:"ratingKey,attr"`
	//Album Name
	ParentTitle string `xml:"parentTitle,attr"`
	//Album Name
	GrandParentTitle string             `xml:"grandparentTitle,attr"`
	Media            ResponseTrackMedia `xml:"Media"`
	//Track Number
	Index string `xml:"index,attr"`
	Image string `xml:"thumb,attr"`
}

func (*ResponseTrack) GetPath

func (r *ResponseTrack) GetPath() string

type ResponseTrackMedia

type ResponseTrackMedia struct {
	XMLName xml.Name               `xml:"Media"`
	Part    ResponseTrackMediaPart `xml:"Part"`
}

type ResponseTrackMediaPart

type ResponseTrackMediaPart struct {
	XMLName xml.Name `xml:"Part"`
	//This is what we actually play
	///library/parts/77708/1574343480/file.mp3
	Key string `xml:"key,attr"`
}

type ResponseTracksMediaContainer

type ResponseTracksMediaContainer struct {
	XMLName xml.Name        `xml:"MediaContainer"`
	Tracks  []ResponseTrack `xml:"Track"`
}

type Server

type Server struct {
	Name    string `xml:"name,attr"`
	Address string `xml:"address,attr"`
	Port    string `xml:"port,attr"`
}

type ServerMediaContainer

type ServerMediaContainer struct {
	Server Server `xml:"Server"`
}

Jump to

Keyboard shortcuts

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