All URIs are relative to https://navigator-api.tweakwise.com
Method | HTTP request | Description |
---|---|---|
CategoryAddCategory | Post /category | Creates a new category. |
CategoryDeleteCategory | Delete /category/{categoryId} | Deletes a single category based on the category Id. |
CategoryGetAllCategories | Get /category | Returns all categories. |
CategoryGetCategory | Get /category/{categoryId} | Returns a single category with the specified categoryId. |
CategoryGetCategoryByKey | Get /category/getbykey/{key} | Returns a single category with the specified key. |
CategoryPatchCategory | Patch /category/{categoryId} | Patches a category with the specified change. |
CategoryUpdateCategory | Put /category | Update an existing category. |
map[string]interface{} CategoryAddCategory(ctx).Category(category).Execute()
Creates a new category.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
category := *openapiclient.NewCategoryApiModel() // CategoryApiModel | Category object that needs to be added to the store
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.CategoryApi.CategoryAddCategory(context.Background()).Category(category).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CategoryApi.CategoryAddCategory``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CategoryAddCategory`: map[string]interface{}
fmt.Fprintf(os.Stdout, "Response from `CategoryApi.CategoryAddCategory`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCategoryAddCategoryRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
category | CategoryApiModel | Category object that needs to be added to the store |
map[string]interface{}
apiKeyDefinition, instanceKeyDefinition
- Content-Type: application/json, text/json
- Accept: application/json, text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
map[string]interface{} CategoryDeleteCategory(ctx, categoryId).Execute()
Deletes a single category based on the category Id.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
categoryId := int64(789) // int64 | ID of the category to delete
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.CategoryApi.CategoryDeleteCategory(context.Background(), categoryId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CategoryApi.CategoryDeleteCategory``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CategoryDeleteCategory`: map[string]interface{}
fmt.Fprintf(os.Stdout, "Response from `CategoryApi.CategoryDeleteCategory`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
categoryId | int64 | ID of the category to delete |
Other parameters are passed through a pointer to a apiCategoryDeleteCategoryRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
map[string]interface{}
apiKeyDefinition, instanceKeyDefinition
- Content-Type: Not defined
- Accept: application/json, text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]Category CategoryGetAllCategories(ctx).Execute()
Returns all categories.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.CategoryApi.CategoryGetAllCategories(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CategoryApi.CategoryGetAllCategories``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CategoryGetAllCategories`: []Category
fmt.Fprintf(os.Stdout, "Response from `CategoryApi.CategoryGetAllCategories`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiCategoryGetAllCategoriesRequest struct via the builder pattern
apiKeyDefinition, instanceKeyDefinition
- Content-Type: Not defined
- Accept: application/json, text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CategoryApiModel CategoryGetCategory(ctx, categoryId).Execute()
Returns a single category with the specified categoryId.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
categoryId := int64(789) // int64 | The categoryId/id
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.CategoryApi.CategoryGetCategory(context.Background(), categoryId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CategoryApi.CategoryGetCategory``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CategoryGetCategory`: CategoryApiModel
fmt.Fprintf(os.Stdout, "Response from `CategoryApi.CategoryGetCategory`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
categoryId | int64 | The categoryId/id |
Other parameters are passed through a pointer to a apiCategoryGetCategoryRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
apiKeyDefinition, instanceKeyDefinition
- Content-Type: Not defined
- Accept: application/json, text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Category CategoryGetCategoryByKey(ctx, key).Execute()
Returns a single category with the specified key.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
key := "key_example" // string | an unique reference to get a category
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.CategoryApi.CategoryGetCategoryByKey(context.Background(), key).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CategoryApi.CategoryGetCategoryByKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CategoryGetCategoryByKey`: Category
fmt.Fprintf(os.Stdout, "Response from `CategoryApi.CategoryGetCategoryByKey`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
key | string | an unique reference to get a category |
Other parameters are passed through a pointer to a apiCategoryGetCategoryByKeyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
apiKeyDefinition, instanceKeyDefinition
- Content-Type: Not defined
- Accept: application/json, text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
map[string]interface{} CategoryPatchCategory(ctx, categoryId).CategoryDelta(categoryDelta).Execute()
Patches a category with the specified change.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
categoryId := int64(789) // int64 | The ID to patch
categoryDelta := *openapiclient.NewCategoryDeltaApiModel() // CategoryDeltaApiModel | A category object with only the values that needs to be updated.
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.CategoryApi.CategoryPatchCategory(context.Background(), categoryId).CategoryDelta(categoryDelta).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CategoryApi.CategoryPatchCategory``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CategoryPatchCategory`: map[string]interface{}
fmt.Fprintf(os.Stdout, "Response from `CategoryApi.CategoryPatchCategory`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
categoryId | int64 | The ID to patch |
Other parameters are passed through a pointer to a apiCategoryPatchCategoryRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
categoryDelta | CategoryDeltaApiModel | A category object with only the values that needs to be updated. |
map[string]interface{}
apiKeyDefinition, instanceKeyDefinition
- Content-Type: application/json, text/json
- Accept: application/json, text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
map[string]interface{} CategoryUpdateCategory(ctx).Category(category).Execute()
Update an existing category.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
category := *openapiclient.NewCategoryApiModel() // CategoryApiModel | A category object with changes to update the given category
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.CategoryApi.CategoryUpdateCategory(context.Background()).Category(category).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CategoryApi.CategoryUpdateCategory``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CategoryUpdateCategory`: map[string]interface{}
fmt.Fprintf(os.Stdout, "Response from `CategoryApi.CategoryUpdateCategory`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCategoryUpdateCategoryRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
category | CategoryApiModel | A category object with changes to update the given category |
map[string]interface{}
apiKeyDefinition, instanceKeyDefinition
- Content-Type: application/json, text/json
- Accept: application/json, text/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]