All URIs are relative to https://tours.api.rezkit.app
| Method | HTTP request | Description |
|---|---|---|
| CreateApiKey | Post /api-keys | Create API Key |
| DeleteApiKey | Delete /api-keys/{id} | Delete API Key |
| ListApiKeys | Get /api-keys | List API Keys |
| UpdateApiKey | Patch /api-keys/{id} | Update API Key |
CreateApiKey201Response CreateApiKey(ctx).CreateApiKeyRequest(createApiKeyRequest).Execute()
Create API Key
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/rezkit/tour-manager-go"
)
func main() {
createApiKeyRequest := *openapiclient.NewCreateApiKeyRequest("My awesome app") // CreateApiKeyRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.APIKeysAPI.CreateApiKey(context.Background()).CreateApiKeyRequest(createApiKeyRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `APIKeysAPI.CreateApiKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateApiKey`: CreateApiKey201Response
fmt.Fprintf(os.Stdout, "Response from `APIKeysAPI.CreateApiKey`: %v\n", resp)
}Other parameters are passed through a pointer to a apiCreateApiKeyRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| createApiKeyRequest | CreateApiKeyRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteApiKey(ctx, id).Execute()
Delete API Key
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/rezkit/tour-manager-go"
)
func main() {
id := "id_example" // string | API Key ID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.APIKeysAPI.DeleteApiKey(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `APIKeysAPI.DeleteApiKey``: %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 | string | API Key ID |
Other parameters are passed through a pointer to a apiDeleteApiKeyRequest 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]
ListApiKeys200Response ListApiKeys(ctx).Execute()
List API Keys
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/rezkit/tour-manager-go"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.APIKeysAPI.ListApiKeys(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `APIKeysAPI.ListApiKeys``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListApiKeys`: ListApiKeys200Response
fmt.Fprintf(os.Stdout, "Response from `APIKeysAPI.ListApiKeys`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListApiKeysRequest 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]
ApiKey UpdateApiKey(ctx, id).UpdateApiKeyRequest(updateApiKeyRequest).Execute()
Update API Key
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/rezkit/tour-manager-go"
)
func main() {
id := "id_example" // string | API Key ID
updateApiKeyRequest := *openapiclient.NewUpdateApiKeyRequest() // UpdateApiKeyRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.APIKeysAPI.UpdateApiKey(context.Background(), id).UpdateApiKeyRequest(updateApiKeyRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `APIKeysAPI.UpdateApiKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateApiKey`: ApiKey
fmt.Fprintf(os.Stdout, "Response from `APIKeysAPI.UpdateApiKey`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | string | API Key ID |
Other parameters are passed through a pointer to a apiUpdateApiKeyRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
updateApiKeyRequest | UpdateApiKeyRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]