gonextcloud/routes.go

36 lines
1.3 KiB
Go
Raw Permalink Normal View History

package gonextcloud
import "net/url"
2018-07-30 08:08:35 +00:00
// Routes references the available routes
type Routes struct {
2018-10-17 09:15:27 +00:00
capabilities *url.URL
users *url.URL
groups *url.URL
apps *url.URL
monitor *url.URL
shares *url.URL
groupfolders *url.URL
appsConfig *url.URL
notifications *url.URL
adminNotifications *url.URL
}
2018-07-24 18:26:12 +00:00
const badRequest = 998
var (
2018-08-08 14:04:06 +00:00
apiPath = &url.URL{Path: "/ocs/v2.php"}
routes = Routes{
2018-10-17 09:15:27 +00:00
capabilities: &url.URL{Path: apiPath.Path + "/cloud/capabilities"},
users: &url.URL{Path: apiPath.Path + "/cloud/users"},
groups: &url.URL{Path: apiPath.Path + "/cloud/groups"},
apps: &url.URL{Path: apiPath.Path + "/cloud/apps"},
monitor: &url.URL{Path: apiPath.Path + "/apps/serverinfo/api/v1/info"},
shares: &url.URL{Path: apiPath.Path + "/apps/files_sharing/api/v1/shares"},
groupfolders: &url.URL{Path: "/apps/groupfolders/folders"},
appsConfig: &url.URL{Path: apiPath.Path + "/apps/provisioning_api/api/v1/config/apps"},
notifications: &url.URL{Path: apiPath.Path + "/apps/notifications/api/v2/notifications"},
adminNotifications: &url.URL{Path: apiPath.Path + "/apps/admin_notifications/api/v2/notifications"},
}
)