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

346 lines
9.3 KiB
Markdown

# \ActivityAPI
All URIs are relative to *http://localhost*
Method | HTTP request | Description
------------- | ------------- | -------------
[**AnswerApiV1FollowPost**](ActivityAPI.md#AnswerApiV1FollowPost) | **Post** /answer/api/v1/follow | follow object or cancel follow operation
[**AnswerApiV1FollowTagsPut**](ActivityAPI.md#AnswerApiV1FollowTagsPut) | **Put** /answer/api/v1/follow/tags | update user follow tags
[**AnswerApiV1PersonalVotePageGet**](ActivityAPI.md#AnswerApiV1PersonalVotePageGet) | **Get** /answer/api/v1/personal/vote/page | get user personal votes
[**AnswerApiV1VoteDownPost**](ActivityAPI.md#AnswerApiV1VoteDownPost) | **Post** /answer/api/v1/vote/down | vote down
[**AnswerApiV1VoteUpPost**](ActivityAPI.md#AnswerApiV1VoteUpPost) | **Post** /answer/api/v1/vote/up | vote up
## AnswerApiV1FollowPost
> AnswerApiV1FollowPost200Response AnswerApiV1FollowPost(ctx).Data(data).Execute()
follow object or cancel follow operation
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
data := *openapiclient.NewSchemaFollowReq("ObjectId_example") // SchemaFollowReq | follow
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ActivityAPI.AnswerApiV1FollowPost(context.Background()).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ActivityAPI.AnswerApiV1FollowPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1FollowPost`: AnswerApiV1FollowPost200Response
fmt.Fprintf(os.Stdout, "Response from `ActivityAPI.AnswerApiV1FollowPost`: %v\n", resp)
}
```
### Path Parameters
### Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1FollowPostRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**data** | [**SchemaFollowReq**](SchemaFollowReq.md) | follow |
### Return type
[**AnswerApiV1FollowPost200Response**](AnswerApiV1FollowPost200Response.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)
## AnswerApiV1FollowTagsPut
> HandlerRespBody AnswerApiV1FollowTagsPut(ctx).Data(data).Execute()
update user follow tags
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
data := *openapiclient.NewSchemaUpdateFollowTagsReq() // SchemaUpdateFollowTagsReq | follow
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ActivityAPI.AnswerApiV1FollowTagsPut(context.Background()).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ActivityAPI.AnswerApiV1FollowTagsPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1FollowTagsPut`: HandlerRespBody
fmt.Fprintf(os.Stdout, "Response from `ActivityAPI.AnswerApiV1FollowTagsPut`: %v\n", resp)
}
```
### Path Parameters
### Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1FollowTagsPutRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**data** | [**SchemaUpdateFollowTagsReq**](SchemaUpdateFollowTagsReq.md) | follow |
### 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)
## AnswerApiV1PersonalVotePageGet
> AnswerApiV1PersonalVotePageGet200Response AnswerApiV1PersonalVotePageGet(ctx).Page(page).PageSize(pageSize).Execute()
get user personal votes
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
page := int32(56) // int32 | page size (optional)
pageSize := int32(56) // int32 | page size (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ActivityAPI.AnswerApiV1PersonalVotePageGet(context.Background()).Page(page).PageSize(pageSize).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ActivityAPI.AnswerApiV1PersonalVotePageGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1PersonalVotePageGet`: AnswerApiV1PersonalVotePageGet200Response
fmt.Fprintf(os.Stdout, "Response from `ActivityAPI.AnswerApiV1PersonalVotePageGet`: %v\n", resp)
}
```
### Path Parameters
### Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1PersonalVotePageGetRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**page** | **int32** | page size |
**pageSize** | **int32** | page size |
### Return type
[**AnswerApiV1PersonalVotePageGet200Response**](AnswerApiV1PersonalVotePageGet200Response.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)
## AnswerApiV1VoteDownPost
> AnswerApiV1VoteDownPost200Response AnswerApiV1VoteDownPost(ctx).Data(data).Execute()
vote down
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
data := *openapiclient.NewSchemaVoteReq("ObjectId_example") // SchemaVoteReq | vote
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ActivityAPI.AnswerApiV1VoteDownPost(context.Background()).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ActivityAPI.AnswerApiV1VoteDownPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1VoteDownPost`: AnswerApiV1VoteDownPost200Response
fmt.Fprintf(os.Stdout, "Response from `ActivityAPI.AnswerApiV1VoteDownPost`: %v\n", resp)
}
```
### Path Parameters
### Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1VoteDownPostRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**data** | [**SchemaVoteReq**](SchemaVoteReq.md) | vote |
### Return type
[**AnswerApiV1VoteDownPost200Response**](AnswerApiV1VoteDownPost200Response.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)
## AnswerApiV1VoteUpPost
> AnswerApiV1VoteDownPost200Response AnswerApiV1VoteUpPost(ctx).Data(data).Execute()
vote up
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
data := *openapiclient.NewSchemaVoteReq("ObjectId_example") // SchemaVoteReq | vote
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ActivityAPI.AnswerApiV1VoteUpPost(context.Background()).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ActivityAPI.AnswerApiV1VoteUpPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1VoteUpPost`: AnswerApiV1VoteDownPost200Response
fmt.Fprintf(os.Stdout, "Response from `ActivityAPI.AnswerApiV1VoteUpPost`: %v\n", resp)
}
```
### Path Parameters
### Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1VoteUpPostRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**data** | [**SchemaVoteReq**](SchemaVoteReq.md) | vote |
### Return type
[**AnswerApiV1VoteDownPost200Response**](AnswerApiV1VoteDownPost200Response.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)