gonextcloud/monitoring.go

18 lines
380 B
Go
Raw Normal View History

2018-07-31 11:24:20 +00:00
package gonextcloud
import (
"github.com/partitio/gonextcloud/types"
"net/http"
)
//Monitoring return nextcloud monitoring statistics
2018-07-31 11:24:20 +00:00
func (c *Client) Monitoring() (*types.Monitoring, error) {
res, err := c.baseRequest(routes.monitor, "", "", nil, http.MethodGet)
if err != nil {
return nil, err
}
var m types.MonitoringResponse
res.JSON(&m)
return &m.Ocs.Data, nil
}