All URIs are relative to https://api.eduframe.nl/api/v1
| Method | HTTP request | Description |
|---|---|---|
| CreateProgramElement | Post /program/elements | Create a program element |
| DeleteProgramElementById | Delete /program/elements/{id} | Delete a element |
| GetProgramElementById | Get /program/elements/{id} | Get an element |
| GetProgramElements | Get /program/elements | Get all elements |
| UpdateProgramElementById | Patch /program/elements/{id} | Update an element |
Element CreateProgramElement(ctx).CreateProgramElementRequest(createProgramElementRequest).Execute()
Create a program element
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
createProgramElementRequest := *openapiclient.NewCreateProgramElementRequest(int32(123), int32(123)) // CreateProgramElementRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ProgramElementsAPI.CreateProgramElement(context.Background()).CreateProgramElementRequest(createProgramElementRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProgramElementsAPI.CreateProgramElement``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateProgramElement`: Element
fmt.Fprintf(os.Stdout, "Response from `ProgramElementsAPI.CreateProgramElement`: %v\n", resp)
}Other parameters are passed through a pointer to a apiCreateProgramElementRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| createProgramElementRequest | CreateProgramElementRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteProgramElementById(ctx, id).Execute()
Delete a element
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.ProgramElementsAPI.DeleteProgramElementById(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProgramElementsAPI.DeleteProgramElementById``: %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 apiDeleteProgramElementByIdRequest 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]
Element GetProgramElementById(ctx, id).Execute()
Get an element
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.ProgramElementsAPI.GetProgramElementById(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProgramElementsAPI.GetProgramElementById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetProgramElementById`: Element
fmt.Fprintf(os.Stdout, "Response from `ProgramElementsAPI.GetProgramElementById`: %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 apiGetProgramElementByIdRequest 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]
[]Element GetProgramElements(ctx).EditionId(editionId).Cursor(cursor).PerPage(perPage).Execute()
Get all elements
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
editionId := int32(56) // int32 | Filter results on edition_id (optional)
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.ProgramElementsAPI.GetProgramElements(context.Background()).EditionId(editionId).Cursor(cursor).PerPage(perPage).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProgramElementsAPI.GetProgramElements``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetProgramElements`: []Element
fmt.Fprintf(os.Stdout, "Response from `ProgramElementsAPI.GetProgramElements`: %v\n", resp)
}Other parameters are passed through a pointer to a apiGetProgramElementsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| editionId | int32 | Filter results on edition_id | |
| 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]
Element UpdateProgramElementById(ctx, id).UpdateProgramElementByIdRequest(updateProgramElementByIdRequest).Execute()
Update an element
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
id := int32(56) // int32 |
updateProgramElementByIdRequest := *openapiclient.NewUpdateProgramElementByIdRequest() // UpdateProgramElementByIdRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ProgramElementsAPI.UpdateProgramElementById(context.Background(), id).UpdateProgramElementByIdRequest(updateProgramElementByIdRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProgramElementsAPI.UpdateProgramElementById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateProgramElementById`: Element
fmt.Fprintf(os.Stdout, "Response from `ProgramElementsAPI.UpdateProgramElementById`: %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 apiUpdateProgramElementByIdRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
updateProgramElementByIdRequest | UpdateProgramElementByIdRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]