All URIs are relative to https://api.eduframe.nl/api/v1
| Method | HTTP request | Description |
|---|---|---|
| CreateMaterialGroup | Post /material_groups | Create a material group. |
| DeleteMaterialGroupById | Delete /material_groups/{id} | Delete a material group. |
| GetMaterialGroupById | Get /material_groups/{id} | Get a material group record |
| GetMaterialGroups | Get /material_groups | Get all material group records |
| UpdateMaterialGroupById | Patch /material_groups/{id} | Update a material group. |
MaterialGroup CreateMaterialGroup(ctx).CreateMaterialGroupRequest(createMaterialGroupRequest).Execute()
Create a material group.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
createMaterialGroupRequest := *openapiclient.NewCreateMaterialGroupRequest("Name_example") // CreateMaterialGroupRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MaterialGroupsAPI.CreateMaterialGroup(context.Background()).CreateMaterialGroupRequest(createMaterialGroupRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MaterialGroupsAPI.CreateMaterialGroup``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateMaterialGroup`: MaterialGroup
fmt.Fprintf(os.Stdout, "Response from `MaterialGroupsAPI.CreateMaterialGroup`: %v\n", resp)
}Other parameters are passed through a pointer to a apiCreateMaterialGroupRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| createMaterialGroupRequest | CreateMaterialGroupRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteMaterialGroupById(ctx, id).Execute()
Delete a material group.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
id := int32(56) // int32 |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.MaterialGroupsAPI.DeleteMaterialGroupById(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MaterialGroupsAPI.DeleteMaterialGroupById``: %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. | |
| id | int32 |
Other parameters are passed through a pointer to a apiDeleteMaterialGroupByIdRequest 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]
MaterialGroup GetMaterialGroupById(ctx, id).Execute()
Get a material group record
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
id := int32(56) // int32 |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MaterialGroupsAPI.GetMaterialGroupById(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MaterialGroupsAPI.GetMaterialGroupById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetMaterialGroupById`: MaterialGroup
fmt.Fprintf(os.Stdout, "Response from `MaterialGroupsAPI.GetMaterialGroupById`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 |
Other parameters are passed through a pointer to a apiGetMaterialGroupByIdRequest 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]
[]MaterialGroup GetMaterialGroups(ctx).Cursor(cursor).PerPage(perPage).Execute()
Get all material group records
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
cursor := "cursor_example" // string | **Note**: It's almost never necessary to use this parameter directly, the URL should be retrieved from the `Link` header. The cursor used to fetch the next result set. (optional)
perPage := int32(10) // int32 | The number of results to retrieve for this page. (optional) (default to 25)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MaterialGroupsAPI.GetMaterialGroups(context.Background()).Cursor(cursor).PerPage(perPage).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MaterialGroupsAPI.GetMaterialGroups``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetMaterialGroups`: []MaterialGroup
fmt.Fprintf(os.Stdout, "Response from `MaterialGroupsAPI.GetMaterialGroups`: %v\n", resp)
}Other parameters are passed through a pointer to a apiGetMaterialGroupsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| cursor | string | Note: It's almost never necessary to use this parameter directly, the URL should be retrieved from the `Link` header. The cursor used to fetch the next result set. | |
| perPage | int32 | The number of results to retrieve for this page. | [default to 25] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MaterialGroup UpdateMaterialGroupById(ctx, id).UpdateMaterialGroupByIdRequest(updateMaterialGroupByIdRequest).Execute()
Update a material group.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
id := int32(56) // int32 |
updateMaterialGroupByIdRequest := *openapiclient.NewUpdateMaterialGroupByIdRequest() // UpdateMaterialGroupByIdRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.MaterialGroupsAPI.UpdateMaterialGroupById(context.Background(), id).UpdateMaterialGroupByIdRequest(updateMaterialGroupByIdRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `MaterialGroupsAPI.UpdateMaterialGroupById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateMaterialGroupById`: MaterialGroup
fmt.Fprintf(os.Stdout, "Response from `MaterialGroupsAPI.UpdateMaterialGroupById`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 |
Other parameters are passed through a pointer to a apiUpdateMaterialGroupByIdRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
updateMaterialGroupByIdRequest | UpdateMaterialGroupByIdRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]