All URIs are relative to https://api.eduframe.nl/api/v1
| Method | HTTP request | Description |
|---|---|---|
| AddLabelToOrder | Post /orders/{id}/labels | Add label to an order |
| CreateLabel | Post /labels | Create a label |
| DeleteLabelById | Delete /labels/{id} | Delete a label |
| GetLabelById | Get /labels/{id} | Get a label |
| GetLabels | Get /labels | Get all labels |
| UpdateLabelById | Patch /labels/{id} | Update a label |
AddLabelToOrder(ctx, id).AddLabelToOrderRequest(addLabelToOrderRequest).Execute()
Add label to an order
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
id := int32(56) // int32 |
addLabelToOrderRequest := *openapiclient.NewAddLabelToOrderRequest(int32(123)) // AddLabelToOrderRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.LabelsAPI.AddLabelToOrder(context.Background(), id).AddLabelToOrderRequest(addLabelToOrderRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsAPI.AddLabelToOrder``: %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 apiAddLabelToOrderRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
addLabelToOrderRequest | AddLabelToOrderRequest | |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Label CreateLabel(ctx).CreateLabelRequest(createLabelRequest).Execute()
Create a label
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
createLabelRequest := *openapiclient.NewCreateLabelRequest("Name_example", "ModelType_example") // CreateLabelRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.LabelsAPI.CreateLabel(context.Background()).CreateLabelRequest(createLabelRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsAPI.CreateLabel``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateLabel`: Label
fmt.Fprintf(os.Stdout, "Response from `LabelsAPI.CreateLabel`: %v\n", resp)
}Other parameters are passed through a pointer to a apiCreateLabelRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| createLabelRequest | CreateLabelRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteLabelById(ctx, id).Execute()
Delete a label
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.LabelsAPI.DeleteLabelById(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsAPI.DeleteLabelById``: %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 apiDeleteLabelByIdRequest 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]
Label GetLabelById(ctx, id).Execute()
Get a label
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.LabelsAPI.GetLabelById(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsAPI.GetLabelById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetLabelById`: Label
fmt.Fprintf(os.Stdout, "Response from `LabelsAPI.GetLabelById`: %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 apiGetLabelByIdRequest 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]
[]Label GetLabels(ctx).ModelType(modelType).Search(search).Id(id).Cursor(cursor).PerPage(perPage).Execute()
Get all labels
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
modelType := "modelType_example" // string | Filter results on model_type (optional)
search := "search_example" // string | Filter results on search (optional)
id := []int32{int32(123)} // []int32 | Filter results on 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.LabelsAPI.GetLabels(context.Background()).ModelType(modelType).Search(search).Id(id).Cursor(cursor).PerPage(perPage).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsAPI.GetLabels``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetLabels`: []Label
fmt.Fprintf(os.Stdout, "Response from `LabelsAPI.GetLabels`: %v\n", resp)
}Other parameters are passed through a pointer to a apiGetLabelsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| modelType | string | Filter results on model_type | |
| search | string | Filter results on search | |
| id | []int32 | Filter results on 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]
Label UpdateLabelById(ctx, id).UpdateLabelByIdRequest(updateLabelByIdRequest).Execute()
Update a label
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
id := int32(56) // int32 |
updateLabelByIdRequest := *openapiclient.NewUpdateLabelByIdRequest() // UpdateLabelByIdRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.LabelsAPI.UpdateLabelById(context.Background(), id).UpdateLabelByIdRequest(updateLabelByIdRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `LabelsAPI.UpdateLabelById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateLabelById`: Label
fmt.Fprintf(os.Stdout, "Response from `LabelsAPI.UpdateLabelById`: %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 apiUpdateLabelByIdRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
updateLabelByIdRequest | UpdateLabelByIdRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]