quintodrome/api/responses/subsonic.go

16 lines
306 B
Go
Raw Normal View History

package responses
import (
"encoding/xml"
"github.com/astaxie/beego"
)
2016-02-24 08:00:55 -09:00
func NewEmpty() Subsonic {
return Subsonic{Status: "ok", Version: beego.AppConfig.String("apiVersion")}
2016-02-24 08:00:55 -09:00
}
2016-03-02 07:11:46 -09:00
func ToXML(response Subsonic) []byte {
xmlBody, _ := xml.Marshal(response)
return []byte(xml.Header + string(xmlBody))
2016-02-25 14:52:07 -09:00
}