All URIs are relative to /v2/management
| Method | HTTP request | Description |
|---|---|---|
| CreateCarStates | Post /carstate | Add new Car States. |
| GetAllCarStates | Get /carstate | Find one or all Car States for all existing Cars. |
| GetCarStates | Get /carstate/{carId} | Find one or all Car States for a Car with given ID. |
CreateCarStates(ctx).CarState(carState).Execute()
Add new Car States.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
carState := []openapiclient.CarState{*openapiclient.NewCarState(openapiclient.CarStatus("idle"), int32(1))} // []CarState | A list of Car State model in JSON format.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.CarStateAPI.CreateCarStates(context.Background()).CarState(carState).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CarStateAPI.CreateCarStates``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}Other parameters are passed through a pointer to a apiCreateCarStatesRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| carState | []CarState | A list of Car State model in JSON format. |
(empty response body)
- Content-Type: application/json
- Accept: text/plain, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]CarState GetAllCarStates(ctx).Wait(wait).Since(since).LastN(lastN).Execute()
Find one or all Car States for all existing Cars.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
wait := true // bool | Applies to GET methods when no objects would be returned at the moment of request. If wait=true, \\ the request will wait for the next object to be created and then returns it. If wait=False or unspecified, the request will return \\ an empty list. (optional) (default to false)
since := int64(789) // int64 | A Unix timestamp in milliseconds. If specified, only objects created at the time or later will be returned. If unspecified, all objects are returned (since is set to 0 in that case). (optional)
lastN := int32(56) // int32 | If specified, only the last N objects will be returned. If unspecified, all objects are returned. \\ If some states have identical timestamps and they all do not fit into the maximum N states, only those with higher IDs are returned. If value smaller than 1 is provided, this filtering is ignored. (optional) (default to 0)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CarStateAPI.GetAllCarStates(context.Background()).Wait(wait).Since(since).LastN(lastN).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CarStateAPI.GetAllCarStates``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAllCarStates`: []CarState
fmt.Fprintf(os.Stdout, "Response from `CarStateAPI.GetAllCarStates`: %v\n", resp)
}Other parameters are passed through a pointer to a apiGetAllCarStatesRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| wait | bool | Applies to GET methods when no objects would be returned at the moment of request. If wait=true, \ the request will wait for the next object to be created and then returns it. If wait=False or unspecified, the request will return \ an empty list. | [default to false] |
| since | int64 | A Unix timestamp in milliseconds. If specified, only objects created at the time or later will be returned. If unspecified, all objects are returned (since is set to 0 in that case). | |
| lastN | int32 | If specified, only the last N objects will be returned. If unspecified, all objects are returned. \ If some states have identical timestamps and they all do not fit into the maximum N states, only those with higher IDs are returned. If value smaller than 1 is provided, this filtering is ignored. | [default to 0] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]CarState GetCarStates(ctx, carId).Wait(wait).Since(since).LastN(lastN).Execute()
Find one or all Car States for a Car with given ID.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
carId := int32(56) // int32 | The car ID.
wait := true // bool | Applies to GET methods when no objects would be returned at the moment of request. If wait=true, \\ the request will wait for the next object to be created and then returns it. If wait=False or unspecified, the request will return \\ an empty list. (optional) (default to false)
since := int64(789) // int64 | A Unix timestamp in milliseconds. If specified, only objects created at the time or later will be returned. If unspecified, all objects are returned (since is set to 0 in that case). (optional)
lastN := int32(56) // int32 | If specified, only the last N objects will be returned. If unspecified, all objects are returned. \\ If some states have identical timestamps and they all do not fit into the maximum N states, only those with higher IDs are returned. If value smaller than 1 is provided, this filtering is ignored. (optional) (default to 0)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CarStateAPI.GetCarStates(context.Background(), carId).Wait(wait).Since(since).LastN(lastN).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CarStateAPI.GetCarStates``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetCarStates`: []CarState
fmt.Fprintf(os.Stdout, "Response from `CarStateAPI.GetCarStates`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| carId | int32 | The car ID. |
Other parameters are passed through a pointer to a apiGetCarStatesRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
wait | bool | Applies to GET methods when no objects would be returned at the moment of request. If wait=true, \ the request will wait for the next object to be created and then returns it. If wait=False or unspecified, the request will return \ an empty list. | [default to false] since | int64 | A Unix timestamp in milliseconds. If specified, only objects created at the time or later will be returned. If unspecified, all objects are returned (since is set to 0 in that case). | lastN | int32 | If specified, only the last N objects will be returned. If unspecified, all objects are returned. \ If some states have identical timestamps and they all do not fit into the maximum N states, only those with higher IDs are returned. If value smaller than 1 is provided, this filtering is ignored. | [default to 0]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]