All URIs are relative to https://ocis.ocis.rolling.owncloud.works/graph
Method | HTTP request | Description |
---|---|---|
CreateEducationUser | Post /v1.0/education/users | Add new education user |
DeleteEducationUser | Delete /v1.0/education/users/{user-id} | Delete educationUser |
GetEducationUser | Get /v1.0/education/users/{user-id} | Get properties of educationUser |
ListEducationUsers | Get /v1.0/education/users | Get entities from education users |
UpdateEducationUser | Patch /v1.0/education/users/{user-id} | Update properties of educationUser |
EducationUser CreateEducationUser(ctx).EducationUser(educationUser).Execute()
Add new education user
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/owncloud/libre-graph-api-go"
)
func main() {
educationUser := *openapiclient.NewEducationUser() // EducationUser | New entity
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.EducationUserApi.CreateEducationUser(context.Background()).EducationUser(educationUser).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EducationUserApi.CreateEducationUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateEducationUser`: EducationUser
fmt.Fprintf(os.Stdout, "Response from `EducationUserApi.CreateEducationUser`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateEducationUserRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
educationUser | EducationUser | New entity |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteEducationUser(ctx, userId).Execute()
Delete educationUser
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/owncloud/libre-graph-api-go"
)
func main() {
userId := "90eedea1-dea1-90ee-a1de-ee90a1deee90" // string | key: id or username of user
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.EducationUserApi.DeleteEducationUser(context.Background(), userId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EducationUserApi.DeleteEducationUser``: %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. | |
userId | string | key: id or username of user |
Other parameters are passed through a pointer to a apiDeleteEducationUserRequest 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]
EducationUser GetEducationUser(ctx, userId).Expand(expand).Execute()
Get properties of educationUser
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/owncloud/libre-graph-api-go"
)
func main() {
userId := "90eedea1-dea1-90ee-a1de-ee90a1deee90" // string | key: id or username of user
expand := []string{"Expand_example"} // []string | Expand related entities (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.EducationUserApi.GetEducationUser(context.Background(), userId).Expand(expand).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EducationUserApi.GetEducationUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetEducationUser`: EducationUser
fmt.Fprintf(os.Stdout, "Response from `EducationUserApi.GetEducationUser`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
userId | string | key: id or username of user |
Other parameters are passed through a pointer to a apiGetEducationUserRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
expand | []string | Expand related entities |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CollectionOfEducationUser ListEducationUsers(ctx).Orderby(orderby).Expand(expand).Execute()
Get entities from education users
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/owncloud/libre-graph-api-go"
)
func main() {
orderby := []string{"Orderby_example"} // []string | Order items by property values (optional)
expand := []string{"Expand_example"} // []string | Expand related entities (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.EducationUserApi.ListEducationUsers(context.Background()).Orderby(orderby).Expand(expand).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EducationUserApi.ListEducationUsers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListEducationUsers`: CollectionOfEducationUser
fmt.Fprintf(os.Stdout, "Response from `EducationUserApi.ListEducationUsers`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListEducationUsersRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
orderby | []string | Order items by property values | |
expand | []string | Expand related entities |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EducationUser UpdateEducationUser(ctx, userId).EducationUser(educationUser).Execute()
Update properties of educationUser
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/owncloud/libre-graph-api-go"
)
func main() {
userId := "90eedea1-dea1-90ee-a1de-ee90a1deee90" // string | key: id or username of user
educationUser := *openapiclient.NewEducationUser() // EducationUser | New property values
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.EducationUserApi.UpdateEducationUser(context.Background(), userId).EducationUser(educationUser).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EducationUserApi.UpdateEducationUser``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateEducationUser`: EducationUser
fmt.Fprintf(os.Stdout, "Response from `EducationUserApi.UpdateEducationUser`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
userId | string | key: id or username of user |
Other parameters are passed through a pointer to a apiUpdateEducationUserRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
educationUser | EducationUser | New property values |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]