Skip to content

Latest commit

 

History

History
424 lines (272 loc) · 10.2 KB

File metadata and controls

424 lines (272 loc) · 10.2 KB

\ContentAPI

All URIs are relative to https://tours.api.rezkit.app

Method HTTP request Description
CreateContentItem Post /{type}/content Create Content Item
DeleteContentItem Delete /{type}/content/{id} Delete Content Item
GetContentItem Get /{type}/content/{id} Get Content Item
ListContentItems Get /{type}/content List Content Items
RestoreContentItem Put /{type}/content/{id}/restore Restore Content Item
UpdateContentItem Patch /{type}/content/{id} Update Content Item

CreateContentItem

CreateContentItem(ctx, type_).Execute()

Create Content Item

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/rezkit/tour-manager-go"
)

func main() {
	type_ := openapiclient.EntityType("accommodation") // EntityType | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.ContentAPI.CreateContentItem(context.Background(), type_).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ContentAPI.CreateContentItem``: %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.
type_ EntityType

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

DeleteContentItem

DeleteContentItem(ctx, type_, id).Execute()

Delete Content Item

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/rezkit/tour-manager-go"
)

func main() {
	type_ := openapiclient.EntityType("accommodation") // EntityType | 
	id := "id_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.ContentAPI.DeleteContentItem(context.Background(), type_, id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ContentAPI.DeleteContentItem``: %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.
type_ EntityType
id string

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

GetContentItem

GetContentItem(ctx, type_, id).Execute()

Get Content Item

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/rezkit/tour-manager-go"
)

func main() {
	type_ := openapiclient.EntityType("accommodation") // EntityType | 
	id := "id_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.ContentAPI.GetContentItem(context.Background(), type_, id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ContentAPI.GetContentItem``: %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.
type_ EntityType
id string

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

ListContentItems

ListContentItems200Response ListContentItems(ctx, type_).Execute()

List Content Items

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/rezkit/tour-manager-go"
)

func main() {
	type_ := openapiclient.EntityType("accommodation") // EntityType | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.ContentAPI.ListContentItems(context.Background(), type_).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ContentAPI.ListContentItems``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ListContentItems`: ListContentItems200Response
	fmt.Fprintf(os.Stdout, "Response from `ContentAPI.ListContentItems`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
type_ EntityType

Other Parameters

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

Name Type Description Notes

Return type

ListContentItems200Response

Authorization

api_key

HTTP request headers

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

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

RestoreContentItem

RestoreContentItem(ctx, type_, id).Execute()

Restore Content Item

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/rezkit/tour-manager-go"
)

func main() {
	type_ := openapiclient.EntityType("accommodation") // EntityType | 
	id := "id_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.ContentAPI.RestoreContentItem(context.Background(), type_, id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ContentAPI.RestoreContentItem``: %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.
type_ EntityType
id string

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

UpdateContentItem

UpdateContentItem(ctx, type_, id).Execute()

Update Content Item

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/rezkit/tour-manager-go"
)

func main() {
	type_ := openapiclient.EntityType("accommodation") // EntityType | 
	id := "id_example" // string | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.ContentAPI.UpdateContentItem(context.Background(), type_, id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ContentAPI.UpdateContentItem``: %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.
type_ EntityType
id string

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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