add routes
This commit is contained in:
@@ -2,36 +2,38 @@
|
||||
|
||||
package subsonic
|
||||
|
||||
import (
|
||||
"encoding/xml"
|
||||
)
|
||||
import "encoding/xml"
|
||||
|
||||
var (
|
||||
apiVersion = "1.9.0"
|
||||
xmlns = "http://subsonic.org/restapi"
|
||||
)
|
||||
|
||||
type MetaResponse struct {
|
||||
XMLName xml.Name `xml:"subsonic-response" json:"-"`
|
||||
*Response `json:"subsonic-response"`
|
||||
}
|
||||
|
||||
type Response struct {
|
||||
XMLName xml.Name `xml:"subsonic-response" json:"-"`
|
||||
Status string `xml:"status,attr" json:"status"`
|
||||
Version string `xml:"version,attr" json:"version"`
|
||||
XMLNS string `xml:"xmlns,attr" json:"-"`
|
||||
Error *Error `xml:"error" json:"error,omitempty"`
|
||||
AlbumList2 *[]*Album `xml:"albumList2>album" json:"album,omitempty"`
|
||||
Album *Album `xml:"album" json:"album,omitempty"`
|
||||
Song *Song `xml:"song" json:"song,omitempty"`
|
||||
Indexes *Indexes `xml:"indexes" json:"indexes,omitempty"`
|
||||
Artists *[]*Index `xml:"artists>index" json:"artists,omitempty"`
|
||||
Artist *Artist `xml:"artist" json:"artist,omitempty"`
|
||||
MusicDirectory *Directory `xml:"directory" json:"directory,omitempty"`
|
||||
RandomSongs *RandomSongs `xml:"randomSongs" json:"randomSongs,omitempty"`
|
||||
Licence *Licence `xml:"license" json:"license,omitempty"`
|
||||
Status string `xml:"status,attr" json:"status"`
|
||||
Version string `xml:"version,attr" json:"version"`
|
||||
XMLNS string `xml:"xmlns,attr" json:"-"`
|
||||
Error *Error `xml:"error" json:"error,omitempty"`
|
||||
Albums []*Album `xml:"albumList2>album" json:"albumList2,omitempty"`
|
||||
Album *Album `xml:"album" json:"album,omitempty"`
|
||||
Track *Track `xml:"song" json:"song,omitempty"`
|
||||
Indexes *Indexes `xml:"indexes" json:"indexes,omitempty"`
|
||||
Artists []*Index `xml:"artists>index" json:"artists,omitempty"`
|
||||
Artist *Artist `xml:"artist" json:"artist,omitempty"`
|
||||
Directory *Directory `xml:"directory" json:"directory,omitempty"`
|
||||
RandomTracks *RandomTracks `xml:"randomSongs" json:"randomSongs,omitempty"`
|
||||
MusicFolders []*MusicFolder `xml:"musicFolders>musicFolder" json:"musicFolders,omitempty"`
|
||||
Licence *Licence `xml:"license" json:"license,omitempty"`
|
||||
}
|
||||
|
||||
type Error struct {
|
||||
XMLName xml.Name `xml:"error" json:"-"`
|
||||
Code uint64 `xml:"code,attr" json:"code"`
|
||||
Message string `xml:"message,attr" json:"message"`
|
||||
Code uint64 `xml:"code,attr" json:"code"`
|
||||
Message string `xml:"message,attr" json:"message"`
|
||||
}
|
||||
|
||||
func NewResponse() *Response {
|
||||
|
||||
Reference in New Issue
Block a user