Files
openapi-go-answer/docs/ReasonAPI.md
2023-09-26 16:20:01 +08:00

147 lines
3.9 KiB
Markdown

# \ReasonAPI
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**AnswerAdminApiReasonsGet**](ReasonAPI.md#AnswerAdminApiReasonsGet) | **Get** /answer/admin/api/reasons | get reasons by object type and action
[**AnswerApiV1ReasonsGet**](ReasonAPI.md#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
```go
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
[**HandlerRespBody**](HandlerRespBody.md)
### Authorization
[ApiKeyAuth](../README.md#ApiKeyAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)
## AnswerApiV1ReasonsGet
> HandlerRespBody AnswerApiV1ReasonsGet(ctx).ObjectType(objectType).Action(action).Execute()
get reasons by object type and action
### Example
```go
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
[**HandlerRespBody**](HandlerRespBody.md)
### Authorization
[ApiKeyAuth](../README.md#ApiKeyAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)