Skip to content

Latest commit

 

History

History
332 lines (213 loc) · 8.01 KB

File metadata and controls

332 lines (213 loc) · 8.01 KB

\StopAPI

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.

CreateStops

[]Stop CreateStops(ctx).Stop(stop).Execute()

Create new Stops.

Example

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)
}

Path Parameters

Other Parameters

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.

Return type

[]Stop

Authorization

oAuth2AuthCode, APIKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteStop

DeleteStop(ctx, stopId).Execute()

Delete a Stop with the specified ID.

Example

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)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
stopId int32 The Stop ID.

Other Parameters

Other parameters are passed through a pointer to a apiDeleteStopRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

oAuth2AuthCode, APIKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetStop

Stop GetStop(ctx, stopId).Execute()

Find and return a single Stop by its ID.

Example

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)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
stopId int32 The Stop ID.

Other Parameters

Other parameters are passed through a pointer to a apiGetStopRequest struct via the builder pattern

Name Type Description Notes

Return type

Stop

Authorization

oAuth2AuthCode, APIKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetStops

[]Stop GetStops(ctx).Execute()

Find and return all existing Stops.

Example

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)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiGetStopsRequest struct via the builder pattern

Return type

[]Stop

Authorization

oAuth2AuthCode, APIKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateStops

UpdateStops(ctx).Stop(stop).Execute()

Update already existing Stops.

Example

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)
	}
}

Path Parameters

Other Parameters

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.

Return type

(empty response body)

Authorization

oAuth2AuthCode, APIKeyAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: text/plain, application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]