3.9 KiB
3.9 KiB
\ReasonAPI
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| AnswerAdminApiReasonsGet | Get /answer/admin/api/reasons | get reasons by object type and action |
| AnswerApiV1ReasonsGet | Get /answer/api/v1/reasons | get reasons by object type and action |
AnswerAdminApiReasonsGet
HandlerRespBody AnswerAdminApiReasonsGet(ctx).ObjectType(objectType).Action(action).Execute()
get reasons by object type and action
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
objectType := "objectType_example" // string | object_type
action := "action_example" // string | action
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ReasonAPI.AnswerAdminApiReasonsGet(context.Background()).ObjectType(objectType).Action(action).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ReasonAPI.AnswerAdminApiReasonsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerAdminApiReasonsGet`: HandlerRespBody
fmt.Fprintf(os.Stdout, "Response from `ReasonAPI.AnswerAdminApiReasonsGet`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiAnswerAdminApiReasonsGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| objectType | string | object_type | |
| action | string | action |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AnswerApiV1ReasonsGet
HandlerRespBody AnswerApiV1ReasonsGet(ctx).ObjectType(objectType).Action(action).Execute()
get reasons by object type and action
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
objectType := "objectType_example" // string | object_type
action := "action_example" // string | action
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ReasonAPI.AnswerApiV1ReasonsGet(context.Background()).ObjectType(objectType).Action(action).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ReasonAPI.AnswerApiV1ReasonsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1ReasonsGet`: HandlerRespBody
fmt.Fprintf(os.Stdout, "Response from `ReasonAPI.AnswerApiV1ReasonsGet`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1ReasonsGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| objectType | string | object_type | |
| action | string | action |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]