16 KiB
\CommentAPI
All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| AnswerApiV1ActivityTimelineDetailGet | Get /answer/api/v1/activity/timeline/detail | get object timeline detail |
| AnswerApiV1ActivityTimelineGet | Get /answer/api/v1/activity/timeline | get object timeline |
| AnswerApiV1CommentDelete | Delete /answer/api/v1/comment | remove comment |
| AnswerApiV1CommentGet | Get /answer/api/v1/comment | get comment by id |
| AnswerApiV1CommentPageGet | Get /answer/api/v1/comment/page | get comment page |
| AnswerApiV1CommentPost | Post /answer/api/v1/comment | add comment |
| AnswerApiV1CommentPut | Put /answer/api/v1/comment | update comment |
| AnswerApiV1PersonalCommentPageGet | Get /answer/api/v1/personal/comment/page | user personal comment list |
AnswerApiV1ActivityTimelineDetailGet
AnswerApiV1ActivityTimelineGet200Response AnswerApiV1ActivityTimelineDetailGet(ctx).RevisionId(revisionId).Execute()
get object timeline detail
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
revisionId := "revisionId_example" // string | revision id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CommentAPI.AnswerApiV1ActivityTimelineDetailGet(context.Background()).RevisionId(revisionId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CommentAPI.AnswerApiV1ActivityTimelineDetailGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1ActivityTimelineDetailGet`: AnswerApiV1ActivityTimelineGet200Response
fmt.Fprintf(os.Stdout, "Response from `CommentAPI.AnswerApiV1ActivityTimelineDetailGet`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1ActivityTimelineDetailGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| revisionId | string | revision id |
Return type
AnswerApiV1ActivityTimelineGet200Response
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AnswerApiV1ActivityTimelineGet
AnswerApiV1ActivityTimelineGet200Response AnswerApiV1ActivityTimelineGet(ctx).ObjectId(objectId).TagSlugName(tagSlugName).ObjectType(objectType).ShowVote(showVote).Execute()
get object timeline
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
objectId := "objectId_example" // string | object id (optional)
tagSlugName := "tagSlugName_example" // string | tag slug name (optional)
objectType := "objectType_example" // string | object type (optional)
showVote := true // bool | is show vote (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CommentAPI.AnswerApiV1ActivityTimelineGet(context.Background()).ObjectId(objectId).TagSlugName(tagSlugName).ObjectType(objectType).ShowVote(showVote).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CommentAPI.AnswerApiV1ActivityTimelineGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1ActivityTimelineGet`: AnswerApiV1ActivityTimelineGet200Response
fmt.Fprintf(os.Stdout, "Response from `CommentAPI.AnswerApiV1ActivityTimelineGet`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1ActivityTimelineGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| objectId | string | object id | |
| tagSlugName | string | tag slug name | |
| objectType | string | object type | |
| showVote | bool | is show vote |
Return type
AnswerApiV1ActivityTimelineGet200Response
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AnswerApiV1CommentDelete
HandlerRespBody AnswerApiV1CommentDelete(ctx).Data(data).Execute()
remove comment
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
data := *openapiclient.NewSchemaRemoveCommentReq("CommentId_example") // SchemaRemoveCommentReq | comment
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CommentAPI.AnswerApiV1CommentDelete(context.Background()).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CommentAPI.AnswerApiV1CommentDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1CommentDelete`: HandlerRespBody
fmt.Fprintf(os.Stdout, "Response from `CommentAPI.AnswerApiV1CommentDelete`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1CommentDeleteRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| data | SchemaRemoveCommentReq | comment |
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]
AnswerApiV1CommentGet
AnswerApiV1CommentGet200Response AnswerApiV1CommentGet(ctx).Id(id).Execute()
get comment by id
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
id := "id_example" // string | id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CommentAPI.AnswerApiV1CommentGet(context.Background()).Id(id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CommentAPI.AnswerApiV1CommentGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1CommentGet`: AnswerApiV1CommentGet200Response
fmt.Fprintf(os.Stdout, "Response from `CommentAPI.AnswerApiV1CommentGet`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1CommentGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| id | string | id |
Return type
AnswerApiV1CommentGet200Response
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AnswerApiV1CommentPageGet
AnswerApiV1CommentGet200Response AnswerApiV1CommentPageGet(ctx).ObjectId(objectId).Page(page).PageSize(pageSize).QueryCond(queryCond).Execute()
get comment page
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
objectId := "objectId_example" // string | object id
page := int32(56) // int32 | page (optional)
pageSize := int32(56) // int32 | page size (optional)
queryCond := "queryCond_example" // string | query condition (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CommentAPI.AnswerApiV1CommentPageGet(context.Background()).ObjectId(objectId).Page(page).PageSize(pageSize).QueryCond(queryCond).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CommentAPI.AnswerApiV1CommentPageGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1CommentPageGet`: AnswerApiV1CommentGet200Response
fmt.Fprintf(os.Stdout, "Response from `CommentAPI.AnswerApiV1CommentPageGet`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1CommentPageGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| objectId | string | object id | |
| page | int32 | page | |
| pageSize | int32 | page size | |
| queryCond | string | query condition |
Return type
AnswerApiV1CommentGet200Response
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AnswerApiV1CommentPost
AnswerApiV1CommentPost200Response AnswerApiV1CommentPost(ctx).Data(data).Execute()
add comment
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
data := *openapiclient.NewSchemaAddCommentReq("ObjectId_example", "OriginalText_example") // SchemaAddCommentReq | comment
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CommentAPI.AnswerApiV1CommentPost(context.Background()).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CommentAPI.AnswerApiV1CommentPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1CommentPost`: AnswerApiV1CommentPost200Response
fmt.Fprintf(os.Stdout, "Response from `CommentAPI.AnswerApiV1CommentPost`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1CommentPostRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| data | SchemaAddCommentReq | comment |
Return type
AnswerApiV1CommentPost200Response
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]
AnswerApiV1CommentPut
HandlerRespBody AnswerApiV1CommentPut(ctx).Data(data).Execute()
update comment
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "git.ncc.cx/package/openapi-go-answer"
)
func main() {
data := *openapiclient.NewSchemaUpdateCommentReq("CommentId_example", "OriginalText_example") // SchemaUpdateCommentReq | comment
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CommentAPI.AnswerApiV1CommentPut(context.Background()).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CommentAPI.AnswerApiV1CommentPut``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1CommentPut`: HandlerRespBody
fmt.Fprintf(os.Stdout, "Response from `CommentAPI.AnswerApiV1CommentPut`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1CommentPutRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| data | SchemaUpdateCommentReq | comment |
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]
AnswerApiV1PersonalCommentPageGet
AnswerApiV1PersonalCommentPageGet200Response AnswerApiV1PersonalCommentPageGet(ctx).Page(page).PageSize(pageSize).Username(username).Execute()
user personal comment list
Example
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)
username := "username_example" // string | username (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CommentAPI.AnswerApiV1PersonalCommentPageGet(context.Background()).Page(page).PageSize(pageSize).Username(username).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CommentAPI.AnswerApiV1PersonalCommentPageGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AnswerApiV1PersonalCommentPageGet`: AnswerApiV1PersonalCommentPageGet200Response
fmt.Fprintf(os.Stdout, "Response from `CommentAPI.AnswerApiV1PersonalCommentPageGet`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiAnswerApiV1PersonalCommentPageGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| page | int32 | page | |
| pageSize | int32 | page size | |
| username | string | username |
Return type
AnswerApiV1PersonalCommentPageGet200Response
Authorization
No authorization required
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]