2016-02-24 07:29:26 -09:00
|
|
|
package responses
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"encoding/xml"
|
|
|
|
|
"github.com/astaxie/beego"
|
|
|
|
|
)
|
|
|
|
|
|
2016-02-24 08:00:55 -09:00
|
|
|
func NewEmpty() Subsonic {
|
2016-02-24 14:06:49 -09:00
|
|
|
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
|
|
|
}
|