957 lines
26 KiB
Markdown
957 lines
26 KiB
Markdown
# \QuestionAPI
|
|
|
|
All URIs are relative to *http://localhost*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**AnswerApiV1PersonalQaTopGet**](QuestionAPI.md#AnswerApiV1PersonalQaTopGet) | **Get** /answer/api/v1/personal/qa/top | UserTop
|
|
[**AnswerApiV1QuestionAnswerPost**](QuestionAPI.md#AnswerApiV1QuestionAnswerPost) | **Post** /answer/api/v1/question/answer | add question and answer
|
|
[**AnswerApiV1QuestionDelete**](QuestionAPI.md#AnswerApiV1QuestionDelete) | **Delete** /answer/api/v1/question | delete question
|
|
[**AnswerApiV1QuestionInfoGet**](QuestionAPI.md#AnswerApiV1QuestionInfoGet) | **Get** /answer/api/v1/question/info | get question details
|
|
[**AnswerApiV1QuestionInviteGet**](QuestionAPI.md#AnswerApiV1QuestionInviteGet) | **Get** /answer/api/v1/question/invite | get question invite user info
|
|
[**AnswerApiV1QuestionInvitePut**](QuestionAPI.md#AnswerApiV1QuestionInvitePut) | **Put** /answer/api/v1/question/invite | update question invite user
|
|
[**AnswerApiV1QuestionOperationPut**](QuestionAPI.md#AnswerApiV1QuestionOperationPut) | **Put** /answer/api/v1/question/operation | Operation question
|
|
[**AnswerApiV1QuestionPageGet**](QuestionAPI.md#AnswerApiV1QuestionPageGet) | **Get** /answer/api/v1/question/page | get questions by page
|
|
[**AnswerApiV1QuestionPost**](QuestionAPI.md#AnswerApiV1QuestionPost) | **Post** /answer/api/v1/question | add question
|
|
[**AnswerApiV1QuestionPut**](QuestionAPI.md#AnswerApiV1QuestionPut) | **Put** /answer/api/v1/question | update question
|
|
[**AnswerApiV1QuestionReopenPut**](QuestionAPI.md#AnswerApiV1QuestionReopenPut) | **Put** /answer/api/v1/question/reopen | reopen question
|
|
[**AnswerApiV1QuestionSimilarGet**](QuestionAPI.md#AnswerApiV1QuestionSimilarGet) | **Get** /answer/api/v1/question/similar | fuzzy query similar questions based on title
|
|
[**AnswerApiV1QuestionSimilarTagGet**](QuestionAPI.md#AnswerApiV1QuestionSimilarTagGet) | **Get** /answer/api/v1/question/similar/tag | Search Similar Question
|
|
[**AnswerApiV1QuestionStatusPut**](QuestionAPI.md#AnswerApiV1QuestionStatusPut) | **Put** /answer/api/v1/question/status | Close question
|
|
|
|
|
|
|
|
## AnswerApiV1PersonalQaTopGet
|
|
|
|
> HandlerRespBody AnswerApiV1PersonalQaTopGet(ctx).Username(username).Execute()
|
|
|
|
UserTop
|
|
|
|
|
|
|
|
### Example
|
|
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
openapiclient "git.ncc.cx/package/openapi-go-answer"
|
|
)
|
|
|
|
func main() {
|
|
username := "username_example" // string | username (default to "string")
|
|
|
|
configuration := openapiclient.NewConfiguration()
|
|
apiClient := openapiclient.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.QuestionAPI.AnswerApiV1PersonalQaTopGet(context.Background()).Username(username).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `QuestionAPI.AnswerApiV1PersonalQaTopGet``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `AnswerApiV1PersonalQaTopGet`: HandlerRespBody
|
|
fmt.Fprintf(os.Stdout, "Response from `QuestionAPI.AnswerApiV1PersonalQaTopGet`: %v\n", resp)
|
|
}
|
|
```
|
|
|
|
### Path Parameters
|
|
|
|
|
|
|
|
### Other Parameters
|
|
|
|
Other parameters are passed through a pointer to a apiAnswerApiV1PersonalQaTopGetRequest struct via the builder pattern
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**username** | **string** | username | [default to "string"]
|
|
|
|
### 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)
|
|
|
|
|
|
## AnswerApiV1QuestionAnswerPost
|
|
|
|
> HandlerRespBody AnswerApiV1QuestionAnswerPost(ctx).Data(data).Execute()
|
|
|
|
add question and answer
|
|
|
|
|
|
|
|
### Example
|
|
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
openapiclient "git.ncc.cx/package/openapi-go-answer"
|
|
)
|
|
|
|
func main() {
|
|
data := *openapiclient.NewSchemaQuestionAddByAnswer("AnswerContent_example", "Content_example", []openapiclient.SchemaTagItem{*openapiclient.NewSchemaTagItem()}, "Title_example") // SchemaQuestionAddByAnswer | question
|
|
|
|
configuration := openapiclient.NewConfiguration()
|
|
apiClient := openapiclient.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.QuestionAPI.AnswerApiV1QuestionAnswerPost(context.Background()).Data(data).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `QuestionAPI.AnswerApiV1QuestionAnswerPost``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `AnswerApiV1QuestionAnswerPost`: HandlerRespBody
|
|
fmt.Fprintf(os.Stdout, "Response from `QuestionAPI.AnswerApiV1QuestionAnswerPost`: %v\n", resp)
|
|
}
|
|
```
|
|
|
|
### Path Parameters
|
|
|
|
|
|
|
|
### Other Parameters
|
|
|
|
Other parameters are passed through a pointer to a apiAnswerApiV1QuestionAnswerPostRequest struct via the builder pattern
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**data** | [**SchemaQuestionAddByAnswer**](SchemaQuestionAddByAnswer.md) | question |
|
|
|
|
### Return type
|
|
|
|
[**HandlerRespBody**](HandlerRespBody.md)
|
|
|
|
### Authorization
|
|
|
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **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)
|
|
|
|
|
|
## AnswerApiV1QuestionDelete
|
|
|
|
> HandlerRespBody AnswerApiV1QuestionDelete(ctx).Data(data).Execute()
|
|
|
|
delete question
|
|
|
|
|
|
|
|
### Example
|
|
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
openapiclient "git.ncc.cx/package/openapi-go-answer"
|
|
)
|
|
|
|
func main() {
|
|
data := *openapiclient.NewSchemaRemoveQuestionReq("Id_example") // SchemaRemoveQuestionReq | question
|
|
|
|
configuration := openapiclient.NewConfiguration()
|
|
apiClient := openapiclient.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.QuestionAPI.AnswerApiV1QuestionDelete(context.Background()).Data(data).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `QuestionAPI.AnswerApiV1QuestionDelete``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `AnswerApiV1QuestionDelete`: HandlerRespBody
|
|
fmt.Fprintf(os.Stdout, "Response from `QuestionAPI.AnswerApiV1QuestionDelete`: %v\n", resp)
|
|
}
|
|
```
|
|
|
|
### Path Parameters
|
|
|
|
|
|
|
|
### Other Parameters
|
|
|
|
Other parameters are passed through a pointer to a apiAnswerApiV1QuestionDeleteRequest struct via the builder pattern
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**data** | [**SchemaRemoveQuestionReq**](SchemaRemoveQuestionReq.md) | question |
|
|
|
|
### Return type
|
|
|
|
[**HandlerRespBody**](HandlerRespBody.md)
|
|
|
|
### Authorization
|
|
|
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **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)
|
|
|
|
|
|
## AnswerApiV1QuestionInfoGet
|
|
|
|
> string AnswerApiV1QuestionInfoGet(ctx).Id(id).Execute()
|
|
|
|
get question details
|
|
|
|
|
|
|
|
### Example
|
|
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
openapiclient "git.ncc.cx/package/openapi-go-answer"
|
|
)
|
|
|
|
func main() {
|
|
id := "id_example" // string | Question TagID (default to "1")
|
|
|
|
configuration := openapiclient.NewConfiguration()
|
|
apiClient := openapiclient.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.QuestionAPI.AnswerApiV1QuestionInfoGet(context.Background()).Id(id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `QuestionAPI.AnswerApiV1QuestionInfoGet``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `AnswerApiV1QuestionInfoGet`: string
|
|
fmt.Fprintf(os.Stdout, "Response from `QuestionAPI.AnswerApiV1QuestionInfoGet`: %v\n", resp)
|
|
}
|
|
```
|
|
|
|
### Path Parameters
|
|
|
|
|
|
|
|
### Other Parameters
|
|
|
|
Other parameters are passed through a pointer to a apiAnswerApiV1QuestionInfoGetRequest struct via the builder pattern
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**id** | **string** | Question TagID | [default to "1"]
|
|
|
|
### Return type
|
|
|
|
**string**
|
|
|
|
### 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)
|
|
|
|
|
|
## AnswerApiV1QuestionInviteGet
|
|
|
|
> string AnswerApiV1QuestionInviteGet(ctx).Id(id).Execute()
|
|
|
|
get question invite user info
|
|
|
|
|
|
|
|
### Example
|
|
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
openapiclient "git.ncc.cx/package/openapi-go-answer"
|
|
)
|
|
|
|
func main() {
|
|
id := "id_example" // string | Question ID (default to "1")
|
|
|
|
configuration := openapiclient.NewConfiguration()
|
|
apiClient := openapiclient.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.QuestionAPI.AnswerApiV1QuestionInviteGet(context.Background()).Id(id).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `QuestionAPI.AnswerApiV1QuestionInviteGet``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `AnswerApiV1QuestionInviteGet`: string
|
|
fmt.Fprintf(os.Stdout, "Response from `QuestionAPI.AnswerApiV1QuestionInviteGet`: %v\n", resp)
|
|
}
|
|
```
|
|
|
|
### Path Parameters
|
|
|
|
|
|
|
|
### Other Parameters
|
|
|
|
Other parameters are passed through a pointer to a apiAnswerApiV1QuestionInviteGetRequest struct via the builder pattern
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**id** | **string** | Question ID | [default to "1"]
|
|
|
|
### Return type
|
|
|
|
**string**
|
|
|
|
### 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)
|
|
|
|
|
|
## AnswerApiV1QuestionInvitePut
|
|
|
|
> HandlerRespBody AnswerApiV1QuestionInvitePut(ctx).Data(data).Execute()
|
|
|
|
update question invite user
|
|
|
|
|
|
|
|
### Example
|
|
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
openapiclient "git.ncc.cx/package/openapi-go-answer"
|
|
)
|
|
|
|
func main() {
|
|
data := *openapiclient.NewSchemaQuestionUpdateInviteUser("Id_example") // SchemaQuestionUpdateInviteUser | question
|
|
|
|
configuration := openapiclient.NewConfiguration()
|
|
apiClient := openapiclient.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.QuestionAPI.AnswerApiV1QuestionInvitePut(context.Background()).Data(data).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `QuestionAPI.AnswerApiV1QuestionInvitePut``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `AnswerApiV1QuestionInvitePut`: HandlerRespBody
|
|
fmt.Fprintf(os.Stdout, "Response from `QuestionAPI.AnswerApiV1QuestionInvitePut`: %v\n", resp)
|
|
}
|
|
```
|
|
|
|
### Path Parameters
|
|
|
|
|
|
|
|
### Other Parameters
|
|
|
|
Other parameters are passed through a pointer to a apiAnswerApiV1QuestionInvitePutRequest struct via the builder pattern
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**data** | [**SchemaQuestionUpdateInviteUser**](SchemaQuestionUpdateInviteUser.md) | question |
|
|
|
|
### Return type
|
|
|
|
[**HandlerRespBody**](HandlerRespBody.md)
|
|
|
|
### Authorization
|
|
|
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **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)
|
|
|
|
|
|
## AnswerApiV1QuestionOperationPut
|
|
|
|
> HandlerRespBody AnswerApiV1QuestionOperationPut(ctx).Data(data).Execute()
|
|
|
|
Operation question
|
|
|
|
|
|
|
|
### Example
|
|
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
openapiclient "git.ncc.cx/package/openapi-go-answer"
|
|
)
|
|
|
|
func main() {
|
|
data := *openapiclient.NewSchemaOperationQuestionReq("Id_example") // SchemaOperationQuestionReq | question
|
|
|
|
configuration := openapiclient.NewConfiguration()
|
|
apiClient := openapiclient.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.QuestionAPI.AnswerApiV1QuestionOperationPut(context.Background()).Data(data).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `QuestionAPI.AnswerApiV1QuestionOperationPut``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `AnswerApiV1QuestionOperationPut`: HandlerRespBody
|
|
fmt.Fprintf(os.Stdout, "Response from `QuestionAPI.AnswerApiV1QuestionOperationPut`: %v\n", resp)
|
|
}
|
|
```
|
|
|
|
### Path Parameters
|
|
|
|
|
|
|
|
### Other Parameters
|
|
|
|
Other parameters are passed through a pointer to a apiAnswerApiV1QuestionOperationPutRequest struct via the builder pattern
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**data** | [**SchemaOperationQuestionReq**](SchemaOperationQuestionReq.md) | question |
|
|
|
|
### Return type
|
|
|
|
[**HandlerRespBody**](HandlerRespBody.md)
|
|
|
|
### Authorization
|
|
|
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **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)
|
|
|
|
|
|
## AnswerApiV1QuestionPageGet
|
|
|
|
> AnswerApiV1QuestionPageGet200Response AnswerApiV1QuestionPageGet(ctx).Page(page).PageSize(pageSize).Order(order).Tag(tag).Username(username).InDays(inDays).Execute()
|
|
|
|
get questions by page
|
|
|
|
|
|
|
|
### Example
|
|
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
openapiclient "git.ncc.cx/package/openapi-go-answer"
|
|
)
|
|
|
|
func main() {
|
|
page := int32(56) // int32 | page (optional)
|
|
pageSize := int32(56) // int32 | page_size (optional)
|
|
order := "order_example" // string | order cond (optional)
|
|
tag := "tag_example" // string | tag (optional)
|
|
username := "username_example" // string | username (optional)
|
|
inDays := int32(56) // int32 | in_days (optional)
|
|
|
|
configuration := openapiclient.NewConfiguration()
|
|
apiClient := openapiclient.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.QuestionAPI.AnswerApiV1QuestionPageGet(context.Background()).Page(page).PageSize(pageSize).Order(order).Tag(tag).Username(username).InDays(inDays).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `QuestionAPI.AnswerApiV1QuestionPageGet``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `AnswerApiV1QuestionPageGet`: AnswerApiV1QuestionPageGet200Response
|
|
fmt.Fprintf(os.Stdout, "Response from `QuestionAPI.AnswerApiV1QuestionPageGet`: %v\n", resp)
|
|
}
|
|
```
|
|
|
|
### Path Parameters
|
|
|
|
|
|
|
|
### Other Parameters
|
|
|
|
Other parameters are passed through a pointer to a apiAnswerApiV1QuestionPageGetRequest struct via the builder pattern
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**page** | **int32** | page |
|
|
**pageSize** | **int32** | page_size |
|
|
**order** | **string** | order cond |
|
|
**tag** | **string** | tag |
|
|
**username** | **string** | username |
|
|
**inDays** | **int32** | in_days |
|
|
|
|
### Return type
|
|
|
|
[**AnswerApiV1QuestionPageGet200Response**](AnswerApiV1QuestionPageGet200Response.md)
|
|
|
|
### Authorization
|
|
|
|
No authorization required
|
|
|
|
### 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)
|
|
|
|
|
|
## AnswerApiV1QuestionPost
|
|
|
|
> HandlerRespBody AnswerApiV1QuestionPost(ctx).Data(data).Execute()
|
|
|
|
add question
|
|
|
|
|
|
|
|
### Example
|
|
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
openapiclient "git.ncc.cx/package/openapi-go-answer"
|
|
)
|
|
|
|
func main() {
|
|
data := *openapiclient.NewSchemaQuestionAdd("Content_example", []openapiclient.SchemaTagItem{*openapiclient.NewSchemaTagItem()}, "Title_example") // SchemaQuestionAdd | question
|
|
|
|
configuration := openapiclient.NewConfiguration()
|
|
apiClient := openapiclient.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.QuestionAPI.AnswerApiV1QuestionPost(context.Background()).Data(data).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `QuestionAPI.AnswerApiV1QuestionPost``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `AnswerApiV1QuestionPost`: HandlerRespBody
|
|
fmt.Fprintf(os.Stdout, "Response from `QuestionAPI.AnswerApiV1QuestionPost`: %v\n", resp)
|
|
}
|
|
```
|
|
|
|
### Path Parameters
|
|
|
|
|
|
|
|
### Other Parameters
|
|
|
|
Other parameters are passed through a pointer to a apiAnswerApiV1QuestionPostRequest struct via the builder pattern
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**data** | [**SchemaQuestionAdd**](SchemaQuestionAdd.md) | question |
|
|
|
|
### Return type
|
|
|
|
[**HandlerRespBody**](HandlerRespBody.md)
|
|
|
|
### Authorization
|
|
|
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **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)
|
|
|
|
|
|
## AnswerApiV1QuestionPut
|
|
|
|
> HandlerRespBody AnswerApiV1QuestionPut(ctx).Data(data).Execute()
|
|
|
|
update question
|
|
|
|
|
|
|
|
### Example
|
|
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
openapiclient "git.ncc.cx/package/openapi-go-answer"
|
|
)
|
|
|
|
func main() {
|
|
data := *openapiclient.NewSchemaQuestionUpdate("Content_example", "Id_example", []openapiclient.SchemaTagItem{*openapiclient.NewSchemaTagItem()}, "Title_example") // SchemaQuestionUpdate | question
|
|
|
|
configuration := openapiclient.NewConfiguration()
|
|
apiClient := openapiclient.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.QuestionAPI.AnswerApiV1QuestionPut(context.Background()).Data(data).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `QuestionAPI.AnswerApiV1QuestionPut``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `AnswerApiV1QuestionPut`: HandlerRespBody
|
|
fmt.Fprintf(os.Stdout, "Response from `QuestionAPI.AnswerApiV1QuestionPut`: %v\n", resp)
|
|
}
|
|
```
|
|
|
|
### Path Parameters
|
|
|
|
|
|
|
|
### Other Parameters
|
|
|
|
Other parameters are passed through a pointer to a apiAnswerApiV1QuestionPutRequest struct via the builder pattern
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**data** | [**SchemaQuestionUpdate**](SchemaQuestionUpdate.md) | question |
|
|
|
|
### Return type
|
|
|
|
[**HandlerRespBody**](HandlerRespBody.md)
|
|
|
|
### Authorization
|
|
|
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **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)
|
|
|
|
|
|
## AnswerApiV1QuestionReopenPut
|
|
|
|
> HandlerRespBody AnswerApiV1QuestionReopenPut(ctx).Data(data).Execute()
|
|
|
|
reopen question
|
|
|
|
|
|
|
|
### Example
|
|
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
openapiclient "git.ncc.cx/package/openapi-go-answer"
|
|
)
|
|
|
|
func main() {
|
|
data := *openapiclient.NewSchemaReopenQuestionReq() // SchemaReopenQuestionReq | question
|
|
|
|
configuration := openapiclient.NewConfiguration()
|
|
apiClient := openapiclient.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.QuestionAPI.AnswerApiV1QuestionReopenPut(context.Background()).Data(data).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `QuestionAPI.AnswerApiV1QuestionReopenPut``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `AnswerApiV1QuestionReopenPut`: HandlerRespBody
|
|
fmt.Fprintf(os.Stdout, "Response from `QuestionAPI.AnswerApiV1QuestionReopenPut`: %v\n", resp)
|
|
}
|
|
```
|
|
|
|
### Path Parameters
|
|
|
|
|
|
|
|
### Other Parameters
|
|
|
|
Other parameters are passed through a pointer to a apiAnswerApiV1QuestionReopenPutRequest struct via the builder pattern
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**data** | [**SchemaReopenQuestionReq**](SchemaReopenQuestionReq.md) | question |
|
|
|
|
### Return type
|
|
|
|
[**HandlerRespBody**](HandlerRespBody.md)
|
|
|
|
### Authorization
|
|
|
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **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)
|
|
|
|
|
|
## AnswerApiV1QuestionSimilarGet
|
|
|
|
> HandlerRespBody AnswerApiV1QuestionSimilarGet(ctx).Title(title).Execute()
|
|
|
|
fuzzy query similar questions based on title
|
|
|
|
|
|
|
|
### Example
|
|
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
openapiclient "git.ncc.cx/package/openapi-go-answer"
|
|
)
|
|
|
|
func main() {
|
|
title := "title_example" // string | title (default to "string")
|
|
|
|
configuration := openapiclient.NewConfiguration()
|
|
apiClient := openapiclient.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.QuestionAPI.AnswerApiV1QuestionSimilarGet(context.Background()).Title(title).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `QuestionAPI.AnswerApiV1QuestionSimilarGet``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `AnswerApiV1QuestionSimilarGet`: HandlerRespBody
|
|
fmt.Fprintf(os.Stdout, "Response from `QuestionAPI.AnswerApiV1QuestionSimilarGet`: %v\n", resp)
|
|
}
|
|
```
|
|
|
|
### Path Parameters
|
|
|
|
|
|
|
|
### Other Parameters
|
|
|
|
Other parameters are passed through a pointer to a apiAnswerApiV1QuestionSimilarGetRequest struct via the builder pattern
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**title** | **string** | title | [default to "string"]
|
|
|
|
### 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)
|
|
|
|
|
|
## AnswerApiV1QuestionSimilarTagGet
|
|
|
|
> string AnswerApiV1QuestionSimilarTagGet(ctx).QuestionId(questionId).Execute()
|
|
|
|
Search Similar Question
|
|
|
|
|
|
|
|
### Example
|
|
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
openapiclient "git.ncc.cx/package/openapi-go-answer"
|
|
)
|
|
|
|
func main() {
|
|
questionId := "questionId_example" // string | question_id
|
|
|
|
configuration := openapiclient.NewConfiguration()
|
|
apiClient := openapiclient.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.QuestionAPI.AnswerApiV1QuestionSimilarTagGet(context.Background()).QuestionId(questionId).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `QuestionAPI.AnswerApiV1QuestionSimilarTagGet``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `AnswerApiV1QuestionSimilarTagGet`: string
|
|
fmt.Fprintf(os.Stdout, "Response from `QuestionAPI.AnswerApiV1QuestionSimilarTagGet`: %v\n", resp)
|
|
}
|
|
```
|
|
|
|
### Path Parameters
|
|
|
|
|
|
|
|
### Other Parameters
|
|
|
|
Other parameters are passed through a pointer to a apiAnswerApiV1QuestionSimilarTagGetRequest struct via the builder pattern
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**questionId** | **string** | question_id |
|
|
|
|
### Return type
|
|
|
|
**string**
|
|
|
|
### Authorization
|
|
|
|
No authorization required
|
|
|
|
### 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)
|
|
|
|
|
|
## AnswerApiV1QuestionStatusPut
|
|
|
|
> HandlerRespBody AnswerApiV1QuestionStatusPut(ctx).Data(data).Execute()
|
|
|
|
Close question
|
|
|
|
|
|
|
|
### Example
|
|
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
openapiclient "git.ncc.cx/package/openapi-go-answer"
|
|
)
|
|
|
|
func main() {
|
|
data := *openapiclient.NewSchemaCloseQuestionReq("Id_example") // SchemaCloseQuestionReq | question
|
|
|
|
configuration := openapiclient.NewConfiguration()
|
|
apiClient := openapiclient.NewAPIClient(configuration)
|
|
resp, r, err := apiClient.QuestionAPI.AnswerApiV1QuestionStatusPut(context.Background()).Data(data).Execute()
|
|
if err != nil {
|
|
fmt.Fprintf(os.Stderr, "Error when calling `QuestionAPI.AnswerApiV1QuestionStatusPut``: %v\n", err)
|
|
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
|
}
|
|
// response from `AnswerApiV1QuestionStatusPut`: HandlerRespBody
|
|
fmt.Fprintf(os.Stdout, "Response from `QuestionAPI.AnswerApiV1QuestionStatusPut`: %v\n", resp)
|
|
}
|
|
```
|
|
|
|
### Path Parameters
|
|
|
|
|
|
|
|
### Other Parameters
|
|
|
|
Other parameters are passed through a pointer to a apiAnswerApiV1QuestionStatusPutRequest struct via the builder pattern
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**data** | [**SchemaCloseQuestionReq**](SchemaCloseQuestionReq.md) | question |
|
|
|
|
### Return type
|
|
|
|
[**HandlerRespBody**](HandlerRespBody.md)
|
|
|
|
### Authorization
|
|
|
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **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)
|
|
|