561 lines
16 KiB
Markdown
561 lines
16 KiB
Markdown
# \CommentApi
|
|
|
|
All URIs are relative to *http://localhost*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**AnswerApiV1ActivityTimelineDetailGet**](CommentApi.md#AnswerApiV1ActivityTimelineDetailGet) | **Get** /answer/api/v1/activity/timeline/detail | get object timeline detail
|
|
[**AnswerApiV1ActivityTimelineGet**](CommentApi.md#AnswerApiV1ActivityTimelineGet) | **Get** /answer/api/v1/activity/timeline | get object timeline
|
|
[**AnswerApiV1CommentDelete**](CommentApi.md#AnswerApiV1CommentDelete) | **Delete** /answer/api/v1/comment | remove comment
|
|
[**AnswerApiV1CommentGet**](CommentApi.md#AnswerApiV1CommentGet) | **Get** /answer/api/v1/comment | get comment by id
|
|
[**AnswerApiV1CommentPageGet**](CommentApi.md#AnswerApiV1CommentPageGet) | **Get** /answer/api/v1/comment/page | get comment page
|
|
[**AnswerApiV1CommentPost**](CommentApi.md#AnswerApiV1CommentPost) | **Post** /answer/api/v1/comment | add comment
|
|
[**AnswerApiV1CommentPut**](CommentApi.md#AnswerApiV1CommentPut) | **Put** /answer/api/v1/comment | update comment
|
|
[**AnswerApiV1PersonalCommentPageGet**](CommentApi.md#AnswerApiV1PersonalCommentPageGet) | **Get** /answer/api/v1/personal/comment/page | user personal comment list
|
|
|
|
|
|
|
|
## AnswerApiV1ActivityTimelineDetailGet
|
|
|
|
> AnswerApiV1ActivityTimelineGet200Response AnswerApiV1ActivityTimelineDetailGet(ctx).RevisionId(revisionId).Execute()
|
|
|
|
get object timeline detail
|
|
|
|
|
|
|
|
### Example
|
|
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
|
|
)
|
|
|
|
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**](AnswerApiV1ActivityTimelineGet200Response.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)
|
|
|
|
|
|
## AnswerApiV1ActivityTimelineGet
|
|
|
|
> AnswerApiV1ActivityTimelineGet200Response AnswerApiV1ActivityTimelineGet(ctx).ObjectId(objectId).TagSlugName(tagSlugName).ObjectType(objectType).ShowVote(showVote).Execute()
|
|
|
|
get object timeline
|
|
|
|
|
|
|
|
### Example
|
|
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
|
|
)
|
|
|
|
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**](AnswerApiV1ActivityTimelineGet200Response.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)
|
|
|
|
|
|
## AnswerApiV1CommentDelete
|
|
|
|
> HandlerRespBody AnswerApiV1CommentDelete(ctx).Data(data).Execute()
|
|
|
|
remove comment
|
|
|
|
|
|
|
|
### Example
|
|
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
|
|
)
|
|
|
|
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**](SchemaRemoveCommentReq.md) | comment |
|
|
|
|
### 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)
|
|
|
|
|
|
## AnswerApiV1CommentGet
|
|
|
|
> AnswerApiV1CommentGet200Response AnswerApiV1CommentGet(ctx).Id(id).Execute()
|
|
|
|
get comment by id
|
|
|
|
|
|
|
|
### Example
|
|
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
|
|
)
|
|
|
|
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**](AnswerApiV1CommentGet200Response.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)
|
|
|
|
|
|
## AnswerApiV1CommentPageGet
|
|
|
|
> AnswerApiV1CommentGet200Response AnswerApiV1CommentPageGet(ctx).ObjectId(objectId).Page(page).PageSize(pageSize).QueryCond(queryCond).Execute()
|
|
|
|
get comment page
|
|
|
|
|
|
|
|
### Example
|
|
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
|
|
)
|
|
|
|
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**](AnswerApiV1CommentGet200Response.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)
|
|
|
|
|
|
## AnswerApiV1CommentPost
|
|
|
|
> AnswerApiV1CommentPost200Response AnswerApiV1CommentPost(ctx).Data(data).Execute()
|
|
|
|
add comment
|
|
|
|
|
|
|
|
### Example
|
|
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
|
|
)
|
|
|
|
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**](SchemaAddCommentReq.md) | comment |
|
|
|
|
### Return type
|
|
|
|
[**AnswerApiV1CommentPost200Response**](AnswerApiV1CommentPost200Response.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)
|
|
|
|
|
|
## AnswerApiV1CommentPut
|
|
|
|
> HandlerRespBody AnswerApiV1CommentPut(ctx).Data(data).Execute()
|
|
|
|
update comment
|
|
|
|
|
|
|
|
### Example
|
|
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
|
|
)
|
|
|
|
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**](SchemaUpdateCommentReq.md) | comment |
|
|
|
|
### 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)
|
|
|
|
|
|
## AnswerApiV1PersonalCommentPageGet
|
|
|
|
> AnswerApiV1PersonalCommentPageGet200Response AnswerApiV1PersonalCommentPageGet(ctx).Page(page).PageSize(pageSize).Username(username).Execute()
|
|
|
|
user personal comment list
|
|
|
|
|
|
|
|
### Example
|
|
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
"os"
|
|
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
|
|
)
|
|
|
|
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**](AnswerApiV1PersonalCommentPageGet200Response.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)
|
|
|