9.3 KiB
\ActivityAPI
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| AnswerApiV1FollowPost | Post /answer/api/v1/follow | follow object or cancel follow operation |
| AnswerApiV1FollowTagsPut | Put /answer/api/v1/follow/tags | update user follow tags |
| AnswerApiV1PersonalVotePageGet | Get /answer/api/v1/personal/vote/page | get user personal votes |
| AnswerApiV1VoteDownPost | Post /answer/api/v1/vote/down | vote down |
| AnswerApiV1VoteUpPost | Post /answer/api/v1/vote/up | vote up |
AnswerApiV1FollowPost
AnswerApiV1FollowPost200Response AnswerApiV1FollowPost(ctx).Data(data).Execute()
follow object or cancel follow operation
Example
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 | follow |
Return type
AnswerApiV1FollowPost200Response
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AnswerApiV1FollowTagsPut
HandlerRespBody AnswerApiV1FollowTagsPut(ctx).Data(data).Execute()
update user follow tags
Example
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 | follow |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AnswerApiV1PersonalVotePageGet
AnswerApiV1PersonalVotePageGet200Response AnswerApiV1PersonalVotePageGet(ctx).Page(page).PageSize(pageSize).Execute()
get user personal votes
Example
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
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AnswerApiV1VoteDownPost
AnswerApiV1VoteDownPost200Response AnswerApiV1VoteDownPost(ctx).Data(data).Execute()
vote down
Example
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 | vote |
Return type
AnswerApiV1VoteDownPost200Response
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AnswerApiV1VoteUpPost
AnswerApiV1VoteDownPost200Response AnswerApiV1VoteUpPost(ctx).Data(data).Execute()
vote up
Example
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 | vote |
Return type
AnswerApiV1VoteDownPost200Response
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]