78 lines
2.1 KiB
Markdown
78 lines
2.1 KiB
Markdown
# \PermissionAPI
|
|
|
|
All URIs are relative to *http://localhost*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**AnswerApiV1PermissionGet**](PermissionAPI.md#AnswerApiV1PermissionGet) | **Get** /answer/api/v1/permission | check user permission
|
|
|
|
|
|
|
|
## AnswerApiV1PermissionGet
|
|
|
|
> AnswerApiV1PermissionGet200Response AnswerApiV1PermissionGet(ctx).Authorization(authorization).Action(action).Execute()
|
|
|
|
check user permission
|
|
|
|
|
|
|
|
### Example
|
|
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
openapiclient "git.ncc.cx/package/openapi-go-answer"
|
|
)
|
|
|
|
func main() {
|
|
authorization := "authorization_example" // string | access-token
|
|
action := "action_example" // string | permission key
|
|
|
|
configuration := openapiclient.NewConfiguration()
|
|
apiClient := openapiclient.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.PermissionAPI.AnswerApiV1PermissionGet(context.Background()).Authorization(authorization).Action(action).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `PermissionAPI.AnswerApiV1PermissionGet``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `AnswerApiV1PermissionGet`: AnswerApiV1PermissionGet200Response
|
|
fmt.Fprintf(os.Stdout, "Response from `PermissionAPI.AnswerApiV1PermissionGet`: %v\n", resp)
|
|
}
|
|
```
|
|
|
|
### Path Parameters
|
|
|
|
|
|
|
|
### Other Parameters
|
|
|
|
Other parameters are passed through a pointer to a apiAnswerApiV1PermissionGetRequest struct via the builder pattern
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**authorization** | **string** | access-token |
|
|
**action** | **string** | permission key |
|
|
|
|
### Return type
|
|
|
|
[**AnswerApiV1PermissionGet200Response**](AnswerApiV1PermissionGet200Response.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)
|
|
|