-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathroutes.go
35 lines (31 loc) · 1.29 KB
/
routes.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package gonextcloud
import "net/url"
// apiRoutes references the available routes
type apiRoutes struct {
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
}
const badRequest = 998
var (
apiPath = &url.URL{Path: "/ocs/v2.php"}
routes = apiRoutes{
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"},
}
)