更新文档内容
This commit is contained in:
144
docs/CollectionAPI.md
Normal file
144
docs/CollectionAPI.md
Normal file
@@ -0,0 +1,144 @@
|
||||
# \CollectionAPI
|
||||
|
||||
All URIs are relative to *http://localhost*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**AnswerApiV1CollectionSwitchPost**](CollectionAPI.md#AnswerApiV1CollectionSwitchPost) | **Post** /answer/api/v1/collection/switch | add collection
|
||||
[**AnswerApiV1PersonalCollectionPageGet**](CollectionAPI.md#AnswerApiV1PersonalCollectionPageGet) | **Get** /answer/api/v1/personal/collection/page | list personal collections
|
||||
|
||||
|
||||
|
||||
## AnswerApiV1CollectionSwitchPost
|
||||
|
||||
> AnswerApiV1CollectionSwitchPost200Response AnswerApiV1CollectionSwitchPost(ctx).Data(data).Execute()
|
||||
|
||||
add collection
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
openapiclient "git.ncc.cx/package/openapi-go-answer"
|
||||
)
|
||||
|
||||
func main() {
|
||||
data := *openapiclient.NewSchemaCollectionSwitchReq("GroupId_example", "ObjectId_example") // SchemaCollectionSwitchReq | collection
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.CollectionAPI.AnswerApiV1CollectionSwitchPost(context.Background()).Data(data).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `CollectionAPI.AnswerApiV1CollectionSwitchPost``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `AnswerApiV1CollectionSwitchPost`: AnswerApiV1CollectionSwitchPost200Response
|
||||
fmt.Fprintf(os.Stdout, "Response from `CollectionAPI.AnswerApiV1CollectionSwitchPost`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
### Path Parameters
|
||||
|
||||
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiAnswerApiV1CollectionSwitchPostRequest struct via the builder pattern
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**data** | [**SchemaCollectionSwitchReq**](SchemaCollectionSwitchReq.md) | collection |
|
||||
|
||||
### Return type
|
||||
|
||||
[**AnswerApiV1CollectionSwitchPost200Response**](AnswerApiV1CollectionSwitchPost200Response.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)
|
||||
|
||||
|
||||
## AnswerApiV1PersonalCollectionPageGet
|
||||
|
||||
> HandlerRespBody AnswerApiV1PersonalCollectionPageGet(ctx).Page(page).PageSize(pageSize).Execute()
|
||||
|
||||
list personal collections
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
openapiclient "git.ncc.cx/package/openapi-go-answer"
|
||||
)
|
||||
|
||||
func main() {
|
||||
page := "page_example" // string | page (default to "0")
|
||||
pageSize := "pageSize_example" // string | page_size (default to "20")
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
resp, r, err := apiClient.CollectionAPI.AnswerApiV1PersonalCollectionPageGet(context.Background()).Page(page).PageSize(pageSize).Execute()
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error when calling `CollectionAPI.AnswerApiV1PersonalCollectionPageGet``: %v\n", err)
|
||||
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
|
||||
}
|
||||
// response from `AnswerApiV1PersonalCollectionPageGet`: HandlerRespBody
|
||||
fmt.Fprintf(os.Stdout, "Response from `CollectionAPI.AnswerApiV1PersonalCollectionPageGet`: %v\n", resp)
|
||||
}
|
||||
```
|
||||
|
||||
### Path Parameters
|
||||
|
||||
|
||||
|
||||
### Other Parameters
|
||||
|
||||
Other parameters are passed through a pointer to a apiAnswerApiV1PersonalCollectionPageGetRequest struct via the builder pattern
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**page** | **string** | page | [default to "0"]
|
||||
**pageSize** | **string** | page_size | [default to "20"]
|
||||
|
||||
### 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)
|
||||
|
||||
Reference in New Issue
Block a user