All URIs are relative to /v2/management
| Method | HTTP request | Description |
|---|---|---|
| CreateStops | Post /stop | Create new Stops. |
| DeleteStop | Delete /stop/{stopId} | Delete a Stop with the specified ID. |
| GetStop | Get /stop/{stopId} | Find and return a single Stop by its ID. |
| GetStops | Get /stop | Find and return all existing Stops. |
| UpdateStops | Put /stop | Update already existing Stops. |
[]Stop CreateStops(ctx).Stop(stop).Execute()
Create new Stops.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
stop := []openapiclient.Stop{*openapiclient.NewStop("Lidická", *openapiclient.NewGNSSPosition())} // []Stop | A list of Stop models in JSON format.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StopAPI.CreateStops(context.Background()).Stop(stop).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StopAPI.CreateStops``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateStops`: []Stop
fmt.Fprintf(os.Stdout, "Response from `StopAPI.CreateStops`: %v\n", resp)
}Other parameters are passed through a pointer to a apiCreateStopsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| stop | []Stop | A list of Stop models in JSON format. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteStop(ctx, stopId).Execute()
Delete a Stop with the specified ID.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
stopId := int32(56) // int32 | The Stop ID.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.StopAPI.DeleteStop(context.Background(), stopId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StopAPI.DeleteStop``: %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. | |
| stopId | int32 | The Stop ID. |
Other parameters are passed through a pointer to a apiDeleteStopRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
(empty response body)
- Content-Type: Not defined
- Accept: text/plain, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Stop GetStop(ctx, stopId).Execute()
Find and return a single Stop by its ID.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
stopId := int32(56) // int32 | The Stop ID.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StopAPI.GetStop(context.Background(), stopId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StopAPI.GetStop``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetStop`: Stop
fmt.Fprintf(os.Stdout, "Response from `StopAPI.GetStop`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| stopId | int32 | The Stop ID. |
Other parameters are passed through a pointer to a apiGetStopRequest 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]
[]Stop GetStops(ctx).Execute()
Find and return all existing Stops.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StopAPI.GetStops(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StopAPI.GetStops``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetStops`: []Stop
fmt.Fprintf(os.Stdout, "Response from `StopAPI.GetStops`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetStopsRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateStops(ctx).Stop(stop).Execute()
Update already existing Stops.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
stop := []openapiclient.Stop{*openapiclient.NewStop("Lidická", *openapiclient.NewGNSSPosition())} // []Stop | JSON representation of a list of the Stops with updated data.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.StopAPI.UpdateStops(context.Background()).Stop(stop).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StopAPI.UpdateStops``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}Other parameters are passed through a pointer to a apiUpdateStopsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| stop | []Stop | JSON representation of a list of the Stops with updated data. |
(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]