gonextcloud/monitoring_impl.go

17 lines
322 B
Go
Raw Permalink Normal View History

package gonextcloud
import (
"net/http"
)
//Monitoring return nextcloud monitoring statistics
func (c *client) Monitoring() (*Monitoring, error) {
2019-12-20 20:22:13 +00:00
res, err := c.baseOcsRequest(http.MethodGet, routes.monitor, nil)
if err != nil {
return nil, err
}
var m monitoringResponse
res.JSON(&m)
return &m.Ocs.Data, nil
}