
语言 🇨🇳 简体中文
入门
用法
聚合
审计日志
从评论屏蔽
检查被屏蔽的评论
评论
域配置
电子邮件模板
事件日志
动态帖子
举报评论
话题标签
版主
通知计数
通知
页面
挂起的 Webhook 事件
问题配置
问题结果
问题结果聚合
SSO 用户
订阅
租户每日使用
租户套餐
租户用户
租户
上传图片
用户徽章进度
用户徽章
用户通知
用户在线状态
用户搜索
用户
投票
FastComments Go SDK
这是 FastComments 的官方 Go SDK。
FastComments API 的官方 Go SDK
仓库
安装 
go get github.com/fastcomments/fastcomments-go
使用 API 客户端
Public API(无需身份验证)
PublicAPI 允许在不进行身份验证的情况下访问公共端点:
package main
import (
"context"
"fmt"
"github.com/fastcomments/fastcomments-go/client"
)
func main() {
config := client.NewConfiguration()
apiClient := client.NewAPIClient(config)
// 使用 PublicAPI 获取评论
response, httpResp, err := apiClient.PublicAPI.GetCommentsPublic(
context.Background(),
"your-tenant-id",
).UrlId("your-page-url-id").Execute()
if err != nil {
panic(err)
}
fmt.Printf("Status: %d\n", httpResp.StatusCode)
fmt.Printf("Comments: %+v\n", response)
}
Default API(需要 API 密钥)
DefaultAPI 需要使用您的 API 密钥进行身份验证:
package main
import (
"context"
"fmt"
"github.com/fastcomments/fastcomments-go/client"
)
func main() {
config := client.NewConfiguration()
apiClient := client.NewAPIClient(config)
// 使用 API 密钥创建经过身份验证的上下文
auth := context.WithValue(
context.Background(),
client.ContextAPIKeys,
map[string]client.APIKey{
"api_key": {Key: "your-api-key-here"},
},
)
// 使用已验证的 DefaultAPI 获取评论
response, httpResp, err := apiClient.DefaultAPI.GetComments(auth).
TenantId("your-tenant-id").
UrlId("your-page-url-id").
Execute()
if err != nil {
panic(err)
}
fmt.Printf("Status: %d\n", httpResp.StatusCode)
fmt.Printf("Comments: %+v\n", response)
}
用法 
简单 SSO
package main
import (
"context"
"fmt"
"github.com/fastcomments/fastcomments-go/client"
"github.com/fastcomments/fastcomments-go/sso"
)
func main() {
// 创建简单 SSO 令牌
user := &sso.SimpleSSOUserData{
UserID: "user-123",
Email: "user@example.com",
Avatar: "https://example.com/avatar.jpg",
}
ssoInstance := sso.NewSimple(user)
token, err := ssoInstance.CreateToken()
if err != nil {
panic(err)
}
fmt.Println("SSO Token:", token)
// 使用 SSO 令牌进行已验证的 API 调用
config := client.NewConfiguration()
apiClient := client.NewAPIClient(config)
response, httpResp, err := apiClient.PublicAPI.GetCommentsPublic(
context.Background(),
"your-tenant-id",
).UrlId("your-page-url-id").Sso(token).Execute()
if err != nil {
panic(err)
}
fmt.Printf("Status: %d\n", httpResp.StatusCode)
fmt.Printf("Comments: %+v\n", response)
}
安全 SSO
package main
import (
"context"
"fmt"
"github.com/fastcomments/fastcomments-go/client"
"github.com/fastcomments/fastcomments-go/sso"
)
func main() {
// 创建安全 SSO 令牌
user := &sso.SecureSSOUserData{
UserID: "user-123",
Email: "user@example.com",
Username: "johndoe",
Avatar: "https://example.com/avatar.jpg",
}
apiKey := "your-api-key"
ssoInstance, err := sso.NewSecure(apiKey, user)
if err != nil {
panic(err)
}
token, err := ssoInstance.CreateToken()
if err != nil {
panic(err)
}
fmt.Println("Secure SSO Token:", token)
// 使用 SSO 令牌进行已验证的 API 调用
config := client.NewConfiguration()
apiClient := client.NewAPIClient(config)
response, httpResp, err := apiClient.PublicAPI.GetCommentsPublic(
context.Background(),
"your-tenant-id",
).UrlId("your-page-url-id").Sso(token).Execute()
if err != nil {
panic(err)
}
fmt.Printf("Status: %d\n", httpResp.StatusCode)
fmt.Printf("Comments: %+v\n", response)
}
聚合 
按分组(如果提供了 groupBy)并应用多个操作来聚合文档。支持不同的操作(例如 sum、countDistinct、avg 等)。
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| parentTenantId | string | query | 否 | |
| includeStats | boolean | query | 否 |
响应
示例

获取审计日志 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| limit | number | query | 否 | |
| skip | number | query | 否 | |
| order | string | query | 否 | |
| after | number | query | 否 | |
| before | number | query | 否 |
响应
示例

在公开评论中屏蔽 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| commentId | string | path | 是 | |
| sso | string | query | 否 |
响应
返回:BlockFromCommentPublic200Response
示例

在公开评论中取消屏蔽 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | 查询 | 是 | |
| commentId | string | 路径 | 是 | |
| sso | string | 查询 | 否 |
响应
返回: UnBlockCommentPublic200Response
示例

检查被屏蔽的评论 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| commentIds | string | query | 是 | 以逗号分隔的评论 ID 列表。 |
| sso | string | query | 否 |
响应
返回: CheckedCommentsForBlocked200Response
示例

从评论屏蔽用户 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | 查询 | 是 | |
| id | string | 路径 | 是 | |
| userId | string | 查询 | 否 | |
| anonUserId | string | 查询 | 否 |
响应
返回: BlockFromCommentPublic200Response
示例

创建公开评论 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| urlId | string | query | 是 | |
| broadcastId | string | query | 是 | |
| sessionId | string | query | 否 | |
| sso | string | query | 否 |
Response
返回:CreateCommentPublic200Response
示例

删除评论 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | 查询 | 是 | |
| id | string | 路径 | 是 | |
| contextUserId | string | 查询 | 否 | |
| isLive | boolean | 查询 | 否 |
响应
示例

删除公开评论 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | path | Yes | |
| commentId | string | path | Yes | |
| broadcastId | string | query | Yes | |
| editKey | string | query | No | |
| sso | string | query | No |
响应
返回: DeleteCommentPublic200Response
示例

删除评论投票 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | 路径 | 是 | |
| commentId | string | 路径 | 是 | |
| voteId | string | 路径 | 是 | |
| urlId | string | 查询 | 是 | |
| broadcastId | string | 查询 | 是 | |
| editKey | string | 查询 | 否 | |
| sso | string | 查询 | 否 |
响应
返回: DeleteCommentVote200Response
示例

举报评论 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| userId | string | query | 否 | |
| anonUserId | string | query | 否 |
响应
示例

获取评论 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | 查询 | 是 | |
| id | string | 路径 | 是 |
响应
示例

获取评论列表 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| page | integer | query | 否 | |
| limit | integer | query | 否 | |
| skip | integer | query | 否 | |
| asTree | boolean | query | 否 | |
| skipChildren | integer | query | 否 | |
| limitChildren | integer | query | 否 | |
| maxTreeDepth | integer | query | 否 | |
| urlId | string | query | 否 | |
| userId | string | query | 否 | |
| anonUserId | string | query | 否 | |
| contextUserId | string | query | 否 | |
| hashTag | string | query | 否 | |
| parentId | string | query | 否 | |
| direction | string | query | 否 |
响应
示例

获取公开评论 
必需 tenantId urlId
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| urlId | string | query | 是 | |
| page | integer | query | 否 | |
| direction | string | query | 否 | |
| sso | string | query | 否 | |
| skip | integer | query | 否 | |
| skipChildren | integer | query | 否 | |
| limit | integer | query | 否 | |
| limitChildren | integer | query | 否 | |
| countChildren | boolean | query | 否 | |
| fetchPageForCommentId | string | query | 否 | |
| includeConfig | boolean | query | 否 | |
| countAll | boolean | query | 否 | |
| includei10n | boolean | query | 否 | |
| locale | string | query | 否 | |
| modules | string | query | 否 | |
| isCrawler | boolean | query | 否 | |
| includeNotificationCount | boolean | query | 否 | |
| asTree | boolean | query | 否 | |
| maxTreeDepth | integer | query | 否 | |
| useFullTranslationIds | boolean | query | 否 | |
| parentId | string | query | 否 | |
| searchText | string | query | 否 | |
| hashTags | array | query | 否 | |
| userId | string | query | 否 | |
| customConfigStr | string | query | 否 | |
| afterCommentId | string | query | 否 | |
| beforeCommentId | string | query | 否 |
响应
返回: GetCommentsPublic200Response
示例

获取评论文本 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | 路径 | 是 | |
| commentId | string | 路径 | 是 | |
| editKey | string | 查询 | 否 | |
| sso | string | 查询 | 否 |
响应
示例

获取评论投票用户名称 
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| commentId | string | path | 是 | |
| dir | integer | query | 是 | |
| sso | string | query | 否 |
响应
返回: GetCommentVoteUserNames200Response
示例

锁定评论 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | path | Yes | |
| commentId | string | path | Yes | |
| broadcastId | string | query | Yes | |
| sso | string | query | No |
响应
示例

置顶评论 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| commentId | string | path | 是 | |
| broadcastId | string | query | 是 | |
| sso | string | query | 否 |
响应
示例

保存评论 
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| isLive | boolean | query | 否 | |
| doSpamCheck | boolean | query | 否 | |
| sendEmails | boolean | query | 否 | |
| populateNotifications | boolean | query | 否 |
响应
示例

批量保存评论 
参数
| 名称 | 类型 | Location | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| isLive | boolean | query | 否 | |
| doSpamCheck | boolean | query | 否 | |
| sendEmails | boolean | query | 否 | |
| populateNotifications | boolean | query | 否 |
响应
返回: []SaveComment200Response
示例

设置评论文本 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | 路径 | 是 | |
| commentId | string | 路径 | 是 | |
| broadcastId | string | 查询 | 是 | |
| editKey | string | 查询 | 否 | |
| sso | string | 查询 | 否 |
响应
示例

从评论取消屏蔽用户 
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| userId | string | query | 否 | |
| anonUserId | string | query | 否 |
响应
返回: UnBlockCommentPublic200Response
示例

取消举报评论 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| userId | string | query | 否 | |
| anonUserId | string | query | 否 |
响应
示例

解锁评论 
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| commentId | string | path | 是 | |
| broadcastId | string | query | 是 | |
| sso | string | query | 否 |
响应
示例

取消置顶评论 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | path | Yes | |
| commentId | string | path | Yes | |
| broadcastId | string | query | Yes | |
| sso | string | query | No |
响应
示例

更新评论 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| contextUserId | string | query | 否 | |
| doSpamCheck | boolean | query | 否 | |
| isLive | boolean | query | 否 |
响应
返回: FlagCommentPublic200Response
示例

给评论投票 
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| commentId | string | path | 是 | |
| urlId | string | query | 是 | |
| broadcastId | string | query | 是 | |
| sessionId | string | query | 否 | |
| sso | string | query | 否 |
响应
示例

添加域配置 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 |
响应
返回: AddDomainConfig200Response
示例

删除域配置 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | Yes | |
| domain | string | path | Yes |
响应
返回: DeleteDomainConfig200Response
示例

获取域配置 
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| domain | string | path | 是 |
响应
返回: GetDomainConfig200Response
示例

获取域配置列表 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 |
响应
返回: GetDomainConfigs200Response
示例

部分更新域配置 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| domainToUpdate | string | path | 是 |
响应
返回: GetDomainConfig200Response
示例

替换域配置 
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| domainToUpdate | string | path | 是 |
响应
返回: GetDomainConfig200Response
示例

创建电子邮件模板 
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 |
响应
返回: CreateEmailTemplate200Response
示例

删除电子邮件模板 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
响应
返回: FlagCommentPublic200Response
示例

删除邮件模板渲染错误 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | 查询 | 是 | |
| id | string | 路径 | 是 | |
| errorId | string | 路径 | 是 |
响应
返回: FlagCommentPublic200Response
示例

获取电子邮件模板 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
响应
返回: GetEmailTemplate200Response
示例

获取电子邮件模板定义 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 |
响应
返回: GetEmailTemplateDefinitions200Response
示例

获取邮件模板渲染错误 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| skip | number | query | 否 |
响应
返回: GetEmailTemplateRenderErrors200Response
示例

获取邮件模板列表 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| skip | number | query | 否 |
响应
返回: GetEmailTemplates200Response
示例

渲染邮件模板 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| locale | string | query | 否 |
响应
返回: RenderEmailTemplate200Response
示例

更新电子邮件模板 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
响应
返回: FlagCommentPublic200Response
示例

获取事件日志 
req tenantId urlId userIdWS
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| urlId | string | query | 是 | |
| userIdWS | string | query | 是 | |
| startTime | integer | query | 是 | |
| endTime | integer | query | 是 |
响应
示例

获取全局事件日志 
req tenantId urlId userIdWS
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| urlId | string | query | 是 | |
| userIdWS | string | query | 是 | |
| startTime | integer | query | 是 | |
| endTime | integer | query | 是 |
响应
示例

创建动态帖子 
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| broadcastId | string | query | 否 | |
| isLive | boolean | query | 否 | |
| doSpamCheck | boolean | query | 否 | |
| skipDupCheck | boolean | query | 否 |
响应
示例

创建公开动态帖子 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | path | Yes | |
| broadcastId | string | query | No | |
| sso | string | query | No |
响应
返回: CreateFeedPostPublic200Response
示例

删除公开动态帖子 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| postId | string | path | 是 | |
| broadcastId | string | query | 否 | |
| sso | string | query | 否 |
响应
返回: DeleteFeedPostPublic200Response
示例

获取动态帖子 
req tenantId afterId
Parameters
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | Yes | |
| afterId | string | query | No | |
| limit | integer | query | No | |
| tags | array | query | No |
Response
Example

获取公开动态帖子 
req tenantId afterId
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| afterId | string | query | 否 | |
| limit | integer | query | 否 | |
| tags | array | query | 否 | |
| sso | string | query | 否 | |
| isCrawler | boolean | query | 否 | |
| includeUserInfo | boolean | query | 否 |
响应
返回:GetFeedPostsPublic200Response
示例

获取动态帖子统计 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| postIds | array | query | 是 | |
| sso | string | query | 否 |
响应
返回: GetFeedPostsStats200Response
示例

获取用户公开反应 
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| postIds | array | query | 否 | |
| sso | string | query | 否 |
响应
返回: GetUserReactsPublic200Response
示例

对公开动态帖子做出反应 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | path | Yes | |
| postId | string | path | Yes | |
| isUndo | boolean | query | No | |
| broadcastId | string | query | No | |
| sso | string | query | No |
响应
返回:ReactFeedPostPublic200Response
示例

更新动态帖子 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
响应
返回: FlagCommentPublic200Response
示例

更新公开动态帖子 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| postId | string | path | 是 | |
| broadcastId | string | query | 否 | |
| sso | string | query | 否 |
响应
返回: CreateFeedPostPublic200Response
示例

举报公开评论 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| commentId | string | path | 是 | |
| isFlagged | boolean | query | 是 | |
| sso | string | query | 否 |
响应
返回:FlagCommentPublic200Response
示例

添加话题标签 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 否 |
响应
示例

批量添加标签 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 否 |
响应
返回: AddHashTagsBulk200Response
示例

删除标签 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tag | string | path | 是 | |
| tenantId | string | query | 否 |
响应
返回: FlagCommentPublic200Response
示例

获取标签列表 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| page | number | query | 否 |
响应
示例

部分更新标签 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tag | string | path | 是 | |
| tenantId | string | query | 否 |
响应
示例

创建版主 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 |
响应
返回: CreateModerator200Response
示例

删除版主 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| sendEmail | string | query | 否 |
响应
返回: FlagCommentPublic200Response
示例

获取版主 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
响应
示例

获取版主列表 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| skip | number | query | 否 |
响应
示例

发送邀请 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| fromName | string | query | 是 |
响应
返回: FlagCommentPublic200Response
示例

更新版主 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
响应
返回: FlagCommentPublic200Response
示例

删除通知计数 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
响应
返回:FlagCommentPublic200Response
示例

获取缓存的通知计数 
参数
| 名称 | 类型 | 位置 | 必需 | 说明 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
响应
返回: GetCachedNotificationCount200Response
示例

获取通知计数 
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| userId | string | query | 否 | |
| urlId | string | query | 否 | |
| fromCommentId | string | query | 否 | |
| viewed | boolean | query | 否 | |
| type | string | query | 否 |
响应
返回: GetNotificationCount200Response
示例

获取通知列表 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| userId | string | query | 否 | |
| urlId | string | query | 否 | |
| fromCommentId | string | query | 否 | |
| viewed | boolean | query | 否 | |
| type | string | query | 否 | |
| skip | number | query | 否 |
响应
返回: GetNotifications200Response
示例

更新通知 
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| userId | string | query | 否 |
响应
返回:FlagCommentPublic200Response
示例

添加页面 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 |
响应
示例

删除页面 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
响应
示例

通过 URLId 获取页面 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| urlId | string | query | 是 |
响应
示例

获取页面列表 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 |
响应
示例

部分更新页面 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
响应
示例

删除挂起的 Webhook 事件 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
响应
返回:FlagCommentPublic200Response
示例

获取挂起的 Webhook 事件数量 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| commentId | string | query | 否 | |
| externalId | string | query | 否 | |
| eventType | string | query | 否 | |
| type | string | query | 否 | |
| domain | string | query | 否 | |
| attemptCountGT | number | query | 否 |
响应
返回: GetPendingWebhookEventCount200Response
示例

获取挂起的 Webhook 事件列表 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| commentId | string | query | 否 | |
| externalId | string | query | 否 | |
| eventType | string | query | 否 | |
| type | string | query | 否 | |
| domain | string | query | 否 | |
| attemptCountGT | number | query | 否 | |
| skip | number | query | 否 |
响应
返回: GetPendingWebhookEvents200Response
示例

创建问题配置 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 |
响应
返回: CreateQuestionConfig200Response
示例

删除问题配置 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | Yes | |
| id | string | path | Yes |
响应
返回: FlagCommentPublic200Response
示例

获取问题配置 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | 查询 | 是 | |
| id | string | 路径 | 是 |
响应
返回:GetQuestionConfig200Response
示例

获取问题配置列表 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| skip | number | query | 否 |
响应
返回:GetQuestionConfigs200Response
示例

更新问题配置 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | Yes | |
| id | string | path | Yes |
响应
返回: FlagCommentPublic200Response
示例

创建问题结果 
参数
| 名称 | 类型 | 位置 | 是否必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 |
响应
返回:CreateQuestionResult200Response
示例

删除问题结果 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | Yes | |
| id | string | path | Yes |
响应
返回: FlagCommentPublic200Response
示例

获取问题结果 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
响应
返回: GetQuestionResult200Response
示例

获取问题结果列表 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| urlId | string | query | 否 | |
| userId | string | query | 否 | |
| startDate | string | query | 否 | |
| questionId | string | query | 否 | |
| questionIds | string | query | 否 | |
| skip | number | query | 否 |
响应
返回: GetQuestionResults200Response
示例

更新问题结果 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
响应
返回: FlagCommentPublic200Response
示例

聚合问题结果 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| questionId | string | query | 否 | |
| questionIds | array | query | 否 | |
| urlId | string | query | 否 | |
| timeBucket | string | query | 否 | |
| startDate | string | query | 否 | |
| forceRecalculate | boolean | query | 否 |
响应
返回: AggregateQuestionResults200Response
示例

批量聚合问题结果 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| forceRecalculate | boolean | query | 否 |
响应
返回: BulkAggregateQuestionResults200Response
示例

将评论与问题结果合并 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| questionId | string | query | 否 | |
| questionIds | array | query | 否 | |
| urlId | string | query | 否 | |
| startDate | string | query | 否 | |
| forceRecalculate | boolean | query | 否 | |
| minValue | number | query | 否 | |
| maxValue | number | query | 否 | |
| limit | number | query | 否 |
响应
返回: CombineCommentsWithQuestionResults200Response
示例

添加 SSO 用户 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 |
Response
示例

删除 SSO 用户 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| deleteComments | boolean | query | 否 | |
| commentDeleteMode | string | query | 否 |
响应
示例

通过邮箱获取 SSO 用户 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| string | path | 是 |
响应
返回: GetSSOUserByEmailAPIResponse
示例

通过 ID 获取 SSO 用户 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
响应
示例

获取 SSO 用户列表 
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| skip | integer | query | 否 |
响应
示例

部分更新 SSO 用户 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| updateComments | boolean | query | 否 |
响应
示例

替换 SSO 用户 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| updateComments | boolean | query | 否 |
Response
示例

创建订阅 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | Yes |
响应
返回: CreateSubscriptionAPIResponse
示例

删除订阅 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| userId | string | query | 否 |
响应
返回: DeleteSubscriptionAPIResponse
示例

获取订阅列表 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | 查询 | 是 | |
| userId | string | 查询 | 否 |
响应
返回: GetSubscriptionsAPIResponse
示例

获取租户每日使用情况 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| yearNumber | number | query | 否 | |
| monthNumber | number | query | 否 | |
| dayNumber | number | query | 否 | |
| skip | number | query | 否 |
响应
返回: GetTenantDailyUsages200Response
示例

创建租户套餐 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 |
响应
返回: CreateTenantPackage200Response
示例

删除租户套餐 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
响应
返回: FlagCommentPublic200Response
示例

获取租户套餐 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
响应
返回: GetTenantPackage200Response
示例

获取租户套餐列表 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| skip | number | query | 否 |
响应
返回: GetTenantPackages200Response
示例

替换租户套餐 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
响应
返回:FlagCommentPublic200Response
示例

更新租户套餐 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
响应
返回:FlagCommentPublic200Response
示例

创建租户用户 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 |
响应
返回: CreateTenantUser200Response
示例

删除租户用户 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| deleteComments | string | query | 否 | |
| commentDeleteMode | string | query | 否 |
响应
返回: FlagCommentPublic200Response
示例

获取租户用户 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
响应
示例

获取租户用户列表 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| skip | number | query | 否 |
响应
示例

替换租户用户 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| updateComments | string | query | 否 |
响应
返回:FlagCommentPublic200Response
示例

发送登录链接 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| redirectURL | string | query | 否 |
响应
返回: FlagCommentPublic200Response
示例

更新租户用户 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| updateComments | string | query | 否 |
响应
返回: FlagCommentPublic200Response
示例

创建租户 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 |
响应
示例

删除租户 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | 查询 | 是 | |
| id | string | 路径 | 是 | |
| sure | string | 查询 | 否 |
响应
返回: FlagCommentPublic200Response
示例

获取租户 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
响应
示例

获取租户列表 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| meta | string | query | 否 | |
| skip | number | query | 否 |
响应
示例

更新租户 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | Yes | |
| id | string | path | Yes |
响应
返回:FlagCommentPublic200Response
示例

上传图片 
上传并调整图像尺寸
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | path | Yes | |
| sizePreset | string | query | No | 尺寸预设: "Default" (1000x1000px) 或 "CrossPlatform" (为流行设备创建尺寸) |
| urlId | string | query | No | 上传发生所在的页面 id,用于配置 |
响应
示例

通过 ID 获取用户徽章进度 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
响应
返回: GetUserBadgeProgressById200Response
示例

通过用户 ID 获取用户徽章进度 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| userId | string | path | 是 |
响应
返回: GetUserBadgeProgressById200Response
示例

获取用户徽章进度列表 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| userId | string | query | 否 | |
| limit | number | query | 否 | |
| skip | number | query | 否 |
响应
返回:GetUserBadgeProgressList200Response
示例

创建用户徽章 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | Yes |
响应
返回: CreateUserBadge200Response
示例

删除用户徽章 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
响应
返回: UpdateUserBadge200Response
示例

获取用户徽章 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
响应
示例

获取用户徽章列表 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| userId | string | query | 否 | |
| badgeId | string | query | 否 | |
| type | number | query | 否 | |
| displayedOnComments | boolean | query | 否 | |
| limit | number | query | 否 | |
| skip | number | query | 否 |
响应
示例

更新用户徽章 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
响应
返回: UpdateUserBadge200Response
示例

获取用户通知计数 
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| sso | string | query | 否 |
响应
返回: GetUserNotificationCount200Response
示例

获取用户通知 
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| pageSize | integer | query | 否 | |
| afterId | string | query | 否 | |
| includeContext | boolean | query | 否 | |
| afterCreatedAt | integer | query | 否 | |
| unreadOnly | boolean | query | 否 | |
| dmOnly | boolean | query | 否 | |
| noDm | boolean | query | 否 | |
| includeTranslations | boolean | query | 否 | |
| sso | string | query | 否 |
响应
返回: GetUserNotifications200Response
示例

重置用户通知计数 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| sso | string | query | 否 |
响应
返回: ResetUserNotifications200Response
示例

重置用户通知 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| afterId | string | query | 否 | |
| afterCreatedAt | integer | query | 否 | |
| unreadOnly | boolean | query | 否 | |
| dmOnly | boolean | query | 否 | |
| noDm | boolean | query | 否 | |
| sso | string | query | 否 |
响应
返回: ResetUserNotifications200Response
示例

更新用户评论订阅状态 
为特定评论启用或禁用通知。
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| notificationId | string | path | 是 | |
| optedInOrOut | string | path | 是 | |
| commentId | string | query | 是 | |
| sso | string | query | 否 |
响应
返回: UpdateUserNotificationStatus200Response
示例

更新用户页面订阅状态 
启用或禁用页面的通知。当用户订阅页面时,系统会为新的根评论创建通知,并且还会
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| urlId | string | query | 是 | |
| url | string | query | 是 | |
| pageTitle | string | query | 是 | |
| subscribedOrUnsubscribed | string | path | 是 | |
| sso | string | query | 否 |
响应
返回: UpdateUserNotificationStatus200Response
示例

更新用户通知状态 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| notificationId | string | path | 是 | |
| newStatus | string | path | 是 | |
| sso | string | query | 否 |
响应
返回: UpdateUserNotificationStatus200Response
示例

获取用户在线状态 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | Yes | |
| urlIdWS | string | query | Yes | |
| userIds | string | query | Yes |
响应
返回: GetUserPresenceStatuses200Response
示例

搜索用户 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| urlId | string | query | 是 | |
| usernameStartsWith | string | query | 是 | |
| mentionGroupIds | array | query | 否 | |
| sso | string | query | 否 |
响应
示例

获取用户 
参数
| 名称 | 类型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
响应
示例

创建投票 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| commentId | string | query | 是 | |
| direction | string | query | 是 | |
| userId | string | query | 否 | |
| anonUserId | string | query | 否 |
响应
示例

删除投票 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| editKey | string | query | 否 |
响应
返回: DeleteCommentVote200Response
示例

获取投票列表 
参数
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | Yes | |
| urlId | string | query | Yes |
返回
示例

获取用户的投票 
参数
| 名称 | 类型 | 位置 | 必需 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| urlId | string | query | 是 | |
| userId | string | query | 否 | |
| anonUserId | string | query | 否 |
响应
返回: GetVotesForUser200Response
示例

需要帮助?
如果您在使用 Go SDK 时遇到任何问题或有疑问,请:
贡献
欢迎贡献!请访问 GitHub 仓库 以查看贡献指南。