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

140 lines
3.5 KiB
Markdown

# \SearchAPI
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**AnswerApiV1SearchDescGet**](SearchAPI.md#AnswerApiV1SearchDescGet) | **Get** /answer/api/v1/search/desc | get search description
[**AnswerApiV1SearchGet**](SearchAPI.md#AnswerApiV1SearchGet) | **Get** /answer/api/v1/search | search object
## AnswerApiV1SearchDescGet
> AnswerApiV1SearchGet200Response AnswerApiV1SearchDescGet(ctx).Execute()
get search description
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SearchAPI.AnswerApiV1SearchDescGet(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SearchAPI.AnswerApiV1SearchDescGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1SearchDescGet`: AnswerApiV1SearchGet200Response
fmt.Fprintf(os.Stdout, "Response from `SearchAPI.AnswerApiV1SearchDescGet`: %v\n", resp)
}
```
### Path Parameters
This endpoint does not need any parameter.
### Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1SearchDescGetRequest struct via the builder pattern
### Return type
[**AnswerApiV1SearchGet200Response**](AnswerApiV1SearchGet200Response.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)
## AnswerApiV1SearchGet
> AnswerApiV1SearchGet200Response AnswerApiV1SearchGet(ctx).Q(q).Order(order).Execute()
search object
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
q := "q_example" // string | query string
order := "order_example" // string | order
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.SearchAPI.AnswerApiV1SearchGet(context.Background()).Q(q).Order(order).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `SearchAPI.AnswerApiV1SearchGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1SearchGet`: AnswerApiV1SearchGet200Response
fmt.Fprintf(os.Stdout, "Response from `SearchAPI.AnswerApiV1SearchGet`: %v\n", resp)
}
```
### Path Parameters
### Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1SearchGetRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**q** | **string** | query string |
**order** | **string** | order |
### Return type
[**AnswerApiV1SearchGet200Response**](AnswerApiV1SearchGet200Response.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)