gonextcloud/monitoring_impl.go

17 lines
319 B
Go
Raw Permalink Normal View History

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