Files
navidrome/api/responses/subsonic.go
T
2016-03-02 11:11:46 -05:00

16 lines
306 B
Go

package responses
import (
"encoding/xml"
"github.com/astaxie/beego"
)
func NewEmpty() Subsonic {
return Subsonic{Status: "ok", Version: beego.AppConfig.String("apiVersion")}
}
func ToXML(response Subsonic) []byte {
xmlBody, _ := xml.Marshal(response)
return []byte(xml.Header + string(xmlBody))
}