2018-07-31 11:24:20 +00:00
|
|
|
package gonextcloud
|
|
|
|
|
|
|
|
import (
|
2018-10-26 13:35:50 +00:00
|
|
|
"gitlab.bertha.cloud/partitio/Nextcloud-Partitio/gonextcloud/types"
|
2018-07-31 11:24:20 +00:00
|
|
|
"net/http"
|
|
|
|
)
|
|
|
|
|
2018-07-31 13:38:07 +00:00
|
|
|
//Monitoring return nextcloud monitoring statistics
|
2018-07-31 11:24:20 +00:00
|
|
|
func (c *Client) Monitoring() (*types.Monitoring, error) {
|
2018-09-03 10:17:02 +00:00
|
|
|
res, err := c.baseRequest(http.MethodGet, routes.monitor, nil)
|
2018-07-31 11:24:20 +00:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
var m types.MonitoringResponse
|
|
|
|
res.JSON(&m)
|
|
|
|
return &m.Ocs.Data, nil
|
|
|
|
}
|