All URIs are relative to https://ocis.ocis.rolling.owncloud.works/graph
Method | HTTP request | Description |
---|---|---|
AddUserToClass | Post /v1.0/education/classes/{class-id}/members/$ref | Assign a user to a class |
CreateClass | Post /v1.0/education/classes | Add new education class |
DeleteClass | Delete /v1.0/education/classes/{class-id} | Delete education class |
DeleteUserFromClass | Delete /v1.0/education/classes/{class-id}/members/{user-id}/$ref | Unassign user from a class |
GetClass | Get /v1.0/education/classes/{class-id} | Get class by key |
ListClassMembers | Get /v1.0/education/classes/{class-id}/members | Get the educationClass resources owned by an educationSchool |
ListClasses | Get /v1.0/education/classes | list education classes |
UpdateClass | Patch /v1.0/education/classes/{class-id} | Update properties of a education class |
AddUserToClass(ctx, classId).ClassMemberReference(classMemberReference).Execute()
Assign a user to a class
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/owncloud/libre-graph-api-go"
)
func main() {
classId := "86948e45-96a6-43df-b83d-46e92afd30de" // string | key: id or externalId of class
classMemberReference := *openapiclient.NewClassMemberReference() // ClassMemberReference | educationUser to be added as member
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.EducationClassApi.AddUserToClass(context.Background(), classId).ClassMemberReference(classMemberReference).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EducationClassApi.AddUserToClass``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
classId | string | key: id or externalId of class |
Other parameters are passed through a pointer to a apiAddUserToClassRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
classMemberReference | ClassMemberReference | educationUser to be added as member |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EducationClass CreateClass(ctx).EducationClass(educationClass).Execute()
Add new education class
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/owncloud/libre-graph-api-go"
)
func main() {
educationClass := *openapiclient.NewEducationClass() // EducationClass | New entity
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.EducationClassApi.CreateClass(context.Background()).EducationClass(educationClass).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EducationClassApi.CreateClass``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateClass`: EducationClass
fmt.Fprintf(os.Stdout, "Response from `EducationClassApi.CreateClass`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateClassRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
educationClass | EducationClass | New entity |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteClass(ctx, classId).Execute()
Delete education class
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/owncloud/libre-graph-api-go"
)
func main() {
classId := "86948e45-96a6-43df-b83d-46e92afd30de" // string | key: id or externalId of class
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.EducationClassApi.DeleteClass(context.Background(), classId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EducationClassApi.DeleteClass``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
classId | string | key: id or externalId of class |
Other parameters are passed through a pointer to a apiDeleteClassRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteUserFromClass(ctx, classId, userId).Execute()
Unassign user from a class
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/owncloud/libre-graph-api-go"
)
func main() {
classId := "classId_example" // string | key: id or externalId of class
userId := "90eedea1-dea1-90ee-a1de-ee90a1deee90" // string | key: id or username of the user to unassign from class
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.EducationClassApi.DeleteUserFromClass(context.Background(), classId, userId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EducationClassApi.DeleteUserFromClass``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
classId | string | key: id or externalId of class | |
userId | string | key: id or username of the user to unassign from class |
Other parameters are passed through a pointer to a apiDeleteUserFromClassRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EducationClass GetClass(ctx, classId).Execute()
Get class by key
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/owncloud/libre-graph-api-go"
)
func main() {
classId := "86948e45-96a6-43df-b83d-46e92afd30de" // string | key: id or externalId of class
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.EducationClassApi.GetClass(context.Background(), classId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EducationClassApi.GetClass``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetClass`: EducationClass
fmt.Fprintf(os.Stdout, "Response from `EducationClassApi.GetClass`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
classId | string | key: id or externalId of class |
Other parameters are passed through a pointer to a apiGetClassRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CollectionOfEducationUser ListClassMembers(ctx, classId).Execute()
Get the educationClass resources owned by an educationSchool
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/owncloud/libre-graph-api-go"
)
func main() {
classId := "86948e45-96a6-43df-b83d-46e92afd30de" // string | key: id or externalId of class
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.EducationClassApi.ListClassMembers(context.Background(), classId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EducationClassApi.ListClassMembers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListClassMembers`: CollectionOfEducationUser
fmt.Fprintf(os.Stdout, "Response from `EducationClassApi.ListClassMembers`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
classId | string | key: id or externalId of class |
Other parameters are passed through a pointer to a apiListClassMembersRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CollectionOfClass ListClasses(ctx).Execute()
list education classes
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/owncloud/libre-graph-api-go"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.EducationClassApi.ListClasses(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EducationClassApi.ListClasses``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListClasses`: CollectionOfClass
fmt.Fprintf(os.Stdout, "Response from `EducationClassApi.ListClasses`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListClassesRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EducationClass UpdateClass(ctx, classId).EducationClass(educationClass).Execute()
Update properties of a education class
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/owncloud/libre-graph-api-go"
)
func main() {
classId := "86948e45-96a6-43df-b83d-46e92afd30de" // string | key: id or externalId of class
educationClass := *openapiclient.NewEducationClass() // EducationClass | New property values
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.EducationClassApi.UpdateClass(context.Background(), classId).EducationClass(educationClass).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EducationClassApi.UpdateClass``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateClass`: EducationClass
fmt.Fprintf(os.Stdout, "Response from `EducationClassApi.UpdateClass`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
classId | string | key: id or externalId of class |
Other parameters are passed through a pointer to a apiUpdateClassRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
educationClass | EducationClass | New property values |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]