
语言 🇨🇳 简体中文
文档
入门
API 参考
使用
聚合
审计日志
从评论屏蔽
检查被屏蔽的评论
评论
域配置
邮件模板
事件日志
动态帖子
举报评论
话题标签
版主
通知计数
通知
页面
待处理的 Webhook 事件
问题配置
问题结果
问题结果聚合
SSO 用户
订阅
租户每日用量
租户套餐
租户用户
租户
上传图片
用户徽章进度
用户徽章
用户通知
用户在线状态
用户搜索
用户
投票
FastComments Nim SDK
这是 FastComments 的官方 Nim SDK。
FastComments API 的官方 Nim SDK
仓库
安装 
使用 Nimble
nimble install fastcomments
从源码构建
nimble build
库内容
此库包含生成的 API 客户端和 SSO 实用程序,以便更方便地使用 API。
公共与受保护的 API
对于 API 客户端,有两个 API 模块,api_default 和 api_public。api_default 包含需要您的 API 密钥的方法,api_public 包含可以直接从浏览器/移动设备/等在无需身份验证的情况下调用的 API。
快速开始 
使用已认证的 APIs (DefaultAPI)
重要: 已认证的端点要求将您的 API 密钥设置为 x-api-key 请求头。
import httpclient
import fastcomments
import fastcomments/apis/api_default
import fastcomments/models/model_comment_data
let client = newHttpClient()
client.headers["x-api-key"] = "your-api-key"
# 发起已认证的 API 调用
let (response, httpResponse) = getComments(
httpClient = client,
tenantId = "your-tenant-id",
page = 0,
limit = 0,
skip = 0,
asTree = false,
skipChildren = 0,
limitChildren = 0,
maxTreeDepth = 0,
urlId = "your-url-id",
userId = "",
anonUserId = "",
contextUserId = "",
hashTag = "",
parentId = "",
direction = SortDirections.DESC
)
if response.isSome:
let resp = response.get()
if resp.comments.isSome:
echo "Found ", resp.comments.get().len, " comments"
使用公共 APIs (PublicAPI)
公共端点不需要认证:
import httpclient
import fastcomments
import fastcomments/apis/api_public
let client = newHttpClient()
# 发起公共 API 调用
let (response, httpResponse) = getCommentsPublic(
httpClient = client,
tenantId = "your-tenant-id",
urlId = "your-url-id",
page = 0,
direction = SortDirections.DESC,
sso = "",
skip = 0,
skipChildren = 0,
limit = 0,
limitChildren = 0,
countChildren = false,
fetchPageForCommentId = "",
includeConfig = false,
countAll = false,
includei10n = false,
locale = "",
modules = "",
isCrawler = false,
includeNotificationCount = false,
asTree = false,
maxTreeDepth = 0,
useFullTranslationIds = false,
parentId = "",
searchText = "",
hashTags = @[],
userId = "",
customConfigStr = "",
afterCommentId = "",
beforeCommentId = ""
)
if response.isSome:
let resp = response.get()
if resp.comments.isSome:
echo "Found ", resp.comments.get().len, " comments"
常见问题
- 401 authentication error: 在发出 DefaultAPI 请求之前,请确保在您的 HttpClient 上设置了
x-api-key请求头:client.headers["x-api-key"] = "your-api-key" - Wrong API class: 对于服务器端的认证请求,请使用
api_default;对于客户端/公共请求,请使用api_public。
调用 API 
此 SDK 中的所有 API 方法都返回元组 (Option[ResponseType], Response)。第一个元素在成功时包含解析后的响应,第二个元素是原始的 HTTP 响应。
示例:获取评论
import httpclient
import options
import fastcomments
import fastcomments/apis/api_default
let client = newHttpClient()
client.headers["x-api-key"] = "your-api-key"
let (response, httpResponse) = getComments(
httpClient = client,
tenantId = "your-tenant-id",
page = 0,
limit = 0,
skip = 0,
asTree = false,
skipChildren = 0,
limitChildren = 0,
maxTreeDepth = 0,
urlId = "your-url-id",
userId = "",
anonUserId = "",
contextUserId = "",
hashTag = "",
parentId = "",
direction = SortDirections.DESC
)
if httpResponse.code == Http200:
if response.isSome:
let resp = response.get()
if resp.comments.isSome:
echo "Found ", resp.comments.get().len, " comments"
备注 
广播 ID
在某些 API 调用中,你会看到需要传入 broadcastId。当你接收到事件时,会返回这个 ID,这样如果你计划在客户端乐观地应用更改,就可以据此忽略该事件
(你可能会想这样做,因为它能提供最佳体验)。在此传入一个 UUID。该 ID 应足够唯一,在一次浏览器会话中不会出现两次。
SSO (单点登录)
有关 SSO 示例,请见下文。
SSO 用法 
简单 SSO
import fastcomments/sso
let user = newSimpleSSOUserData(
userId = "user-123",
email = "user@example.com",
avatar = "https://example.com/avatar.jpg"
)
let sso = newSimple(simpleUserData = user)
let token = sso.createToken()
echo "SSO Token: ", token
安全 SSO
import fastcomments/sso
let user = newSecureSSOUserData(
userId = "user-123",
email = "user@example.com",
username = "johndoe",
avatar = "https://example.com/avatar.jpg"
)
let apiKey = "your-api-key"
let sso = newSecure(apiKey = apiKey, secureUserData = user)
let token = sso.createToken()
echo "Secure SSO Token: ", token
FastComments 文档 
fastcomments 文档
API 端点文档
所有 URI 均相对于 https://fastcomments.com
| 类 | 方法 | HTTP 请求 | 描述 |
|---|---|---|---|
| DefaultApi | addDomainConfig | POST /api/v1/domain-configs | |
| DefaultApi | addPage | POST /api/v1/pages | |
| DefaultApi | addSSOUser | POST /api/v1/sso-users | |
| DefaultApi | aggregate | POST /api/v1/aggregate | 通过对文档分组(如果提供了 groupBy)并应用多个操作来聚合文档。支持不同的操作(例如 sum、countDistinct、avg 等)。 |
| DefaultApi | aggregateQuestionResults | GET /api/v1/question-results-aggregation | |
| DefaultApi | blockUserFromComment | POST /api/v1/comments/{id}/block | |
| DefaultApi | bulkAggregateQuestionResults | POST /api/v1/question-results-aggregation/bulk | |
| DefaultApi | combineCommentsWithQuestionResults | GET /api/v1/question-results-aggregation/combine/comments | |
| DefaultApi | createFeedPost | POST /api/v1/feed-posts | |
| DefaultApi | createSubscription | POST /api/v1/subscriptions | |
| DefaultApi | createUserBadge | POST /api/v1/user-badges | |
| DefaultApi | deleteComment | DELETE /api/v1/comments/{id} | |
| DefaultApi | deleteDomainConfig | DELETE /api/v1/domain-configs/{domain} | |
| DefaultApi | deletePage | DELETE /api/v1/pages/{id} | |
| DefaultApi | deleteSSOUser | DELETE /api/v1/sso-users/{id} | |
| DefaultApi | deleteSubscription | DELETE /api/v1/subscriptions/{id} | |
| DefaultApi | deleteUserBadge | DELETE /api/v1/user-badges/{id} | |
| DefaultApi | flagComment | POST /api/v1/comments/{id}/flag | |
| DefaultApi | getAuditLogs | GET /api/v1/audit-logs | |
| DefaultApi | getComment | GET /api/v1/comments/{id} | |
| DefaultApi | getComments | GET /api/v1/comments | |
| DefaultApi | getDomainConfig | GET /api/v1/domain-configs/{domain} | |
| DefaultApi | getDomainConfigs | GET /api/v1/domain-configs | |
| DefaultApi | getFeedPosts | GET /api/v1/feed-posts | 需要 tenantId afterId |
| DefaultApi | getPageByURLId | GET /api/v1/pages/by-url-id | |
| DefaultApi | getPages | GET /api/v1/pages | |
| DefaultApi | getSSOUserByEmail | GET /api/v1/sso-users/by-email/{email} | |
| DefaultApi | getSSOUserById | GET /api/v1/sso-users/by-id/{id} | |
| DefaultApi | getSSOUsers | GET /api/v1/sso-users | |
| DefaultApi | getSubscriptions | GET /api/v1/subscriptions | |
| DefaultApi | getUserBadge | GET /api/v1/user-badges/{id} | |
| DefaultApi | getUserBadgeProgressById | GET /api/v1/user-badge-progress/{id} | |
| DefaultApi | getUserBadgeProgressByUserId | GET /api/v1/user-badge-progress/user/{userId} | |
| DefaultApi | getUserBadgeProgressList | GET /api/v1/user-badge-progress | |
| DefaultApi | getUserBadges | GET /api/v1/user-badges | |
| DefaultApi | patchDomainConfig | PATCH /api/v1/domain-configs/{domainToUpdate} | |
| DefaultApi | patchPage | PATCH /api/v1/pages/{id} | |
| DefaultApi | patchSSOUser | PATCH /api/v1/sso-users/{id} | |
| DefaultApi | putDomainConfig | PUT /api/v1/domain-configs/{domainToUpdate} | |
| DefaultApi | putSSOUser | PUT /api/v1/sso-users/{id} | |
| DefaultApi | saveComment | POST /api/v1/comments | |
| DefaultApi | saveCommentsBulk | POST /api/v1/comments/bulk | |
| DefaultApi | unBlockUserFromComment | POST /api/v1/comments/{id}/un-block | |
| DefaultApi | unFlagComment | POST /api/v1/comments/{id}/un-flag | |
| DefaultApi | updateComment | PATCH /api/v1/comments/{id} | |
| DefaultApi | updateFeedPost | PATCH /api/v1/feed-posts/{id} | |
| DefaultApi | updateUserBadge | PUT /api/v1/user-badges/{id} | |
| PublicApi | blockFromCommentPublic | POST /block-from-comment/{commentId} | |
| PublicApi | checkedCommentsForBlocked | GET /check-blocked-comments | |
| PublicApi | createCommentPublic | POST /comments/{tenantId} | |
| PublicApi | createFeedPostPublic | POST /feed-posts/{tenantId} | |
| PublicApi | deleteCommentPublic | DELETE /comments/{tenantId}/{commentId} | |
| PublicApi | deleteCommentVote | DELETE /comments/{tenantId}/{commentId}/vote/{voteId} | |
| PublicApi | deleteFeedPostPublic | DELETE /feed-posts/{tenantId}/{postId} | |
| PublicApi | flagCommentPublic | POST /flag-comment/{commentId} | |
| PublicApi | getCommentText | GET /comments/{tenantId}/{commentId}/text | |
| PublicApi | getCommentVoteUserNames | GET /comments/{tenantId}/{commentId}/votes | |
| PublicApi | getCommentsPublic | GET /comments/{tenantId} | 需要 tenantId urlId |
| PublicApi | getEventLog | GET /event-log/{tenantId} | 需要 tenantId urlId userIdWS |
| PublicApi | getFeedPostsPublic | GET /feed-posts/{tenantId} | 需要 tenantId afterId |
| PublicApi | getFeedPostsStats | GET /feed-posts/{tenantId}/stats | |
| PublicApi | getGlobalEventLog | GET /event-log/global/{tenantId} | 需要 tenantId urlId userIdWS |
| PublicApi | getUserNotificationCount | GET /user-notifications/get-count | |
| PublicApi | getUserNotifications | GET /user-notifications | |
| PublicApi | getUserPresenceStatuses | GET /user-presence-status | |
| PublicApi | getUserReactsPublic | GET /feed-posts/{tenantId}/user-reacts | |
| PublicApi | lockComment | POST /comments/{tenantId}/{commentId}/lock | |
| PublicApi | pinComment | POST /comments/{tenantId}/{commentId}/pin | |
| PublicApi | reactFeedPostPublic | POST /feed-posts/{tenantId}/react/{postId} | |
| PublicApi | resetUserNotificationCount | POST /user-notifications/reset-count | |
| PublicApi | resetUserNotifications | POST /user-notifications/reset | |
| PublicApi | searchUsers | GET /user-search/{tenantId} | |
| PublicApi | setCommentText | POST /comments/{tenantId}/{commentId}/update-text | |
| PublicApi | unBlockCommentPublic | DELETE /block-from-comment/{commentId} | |
| PublicApi | unLockComment | POST /comments/{tenantId}/{commentId}/unlock | |
| PublicApi | unPinComment | POST /comments/{tenantId}/{commentId}/unpin | |
| PublicApi | updateFeedPostPublic | PUT /feed-posts/{tenantId}/{postId} | |
| PublicApi | updateUserNotificationCommentSubscriptionStatus | POST /user-notifications/{notificationId}/mark-opted/{optedInOrOut} | 为特定评论启用或禁用通知。 |
| PublicApi | updateUserNotificationPageSubscriptionStatus | POST /user-notifications/set-subscription-state/{subscribedOrUnsubscribed} | 为页面启用或禁用通知。当用户订阅页面时,会为新的根评论创建通知,并且还会 |
| PublicApi | updateUserNotificationStatus | POST /user-notifications/{notificationId}/mark/{newStatus} | |
| PublicApi | uploadImage | POST /upload-image/{tenantId} | 上传并调整图像大小 |
| PublicApi | voteComment | POST /comments/{tenantId}/{commentId}/vote |
模型文档
- APIAuditLog
- APIComment
- APICommentBase
- APICreateUserBadgeResponse
- APIEmptyResponse
- APIEmptySuccessResponse
- APIError
- APIGetCommentResponse
- APIGetCommentsResponse
- APIGetUserBadgeProgressListResponse
- APIGetUserBadgeProgressResponse
- APIGetUserBadgeResponse
- APIGetUserBadgesResponse
- APIPage
- APISSOUser
- APIStatus
- APIUserSubscription
- AddDomainConfigParams
- AddDomainConfig_200_response
- AddDomainConfig_200_response_anyOf
- AddPageAPIResponse
- AddSSOUserAPIResponse
- AggregateQuestionResultsResponse
- AggregateQuestionResults_200_response
- AggregateTimeBucket
- AggregationItem
- AggregationOpType
- AggregationOperation
- AggregationRequest
- AggregationRequest_sort
- AggregationResponse
- AggregationResponse_stats
- AggregationValue
- BlockFromCommentParams
- BlockFromCommentPublic_200_response
- BlockSuccess
- BulkAggregateQuestionItem
- BulkAggregateQuestionResultsRequest
- BulkAggregateQuestionResultsResponse
- BulkAggregateQuestionResults_200_response
- ChangeCommentPinStatusResponse
- CheckBlockedCommentsResponse
- CheckedCommentsForBlocked_200_response
- CombineCommentsWithQuestionResults_200_response
- CombineQuestionResultsWithCommentsResponse
- CommentData
- CommentHTMLRenderingMode
- CommentLogData
- CommentLogEntry
- CommentLogType
- CommentQuestionResultsRenderingType
- CommentQuestionsRequired
- CommentTextUpdateRequest
- CommentThreadDeletionMode
- CommentUserBadgeInfo
- CommentUserHashTagInfo
- CommentUserMentionInfo
- CommenterNameFormats
- CreateAPIPageData
- CreateAPISSOUserData
- CreateAPIUserSubscriptionData
- CreateCommentParams
- CreateCommentPublic_200_response
- CreateFeedPostParams
- CreateFeedPostPublic_200_response
- CreateFeedPostResponse
- CreateFeedPost_200_response
- CreateFeedPostsResponse
- CreateSubscriptionAPIResponse
- CreateUserBadgeParams
- CreateUserBadge_200_response
- CustomConfigParameters
- DeleteCommentAction
- DeleteCommentPublic_200_response
- DeleteCommentResult
- DeleteCommentVote_200_response
- DeleteComment_200_response
- DeleteDomainConfig_200_response
- DeleteFeedPostPublic_200_response
- DeleteFeedPostPublic_200_response_anyOf
- DeletePageAPIResponse
- DeleteSSOUserAPIResponse
- DeleteSubscriptionAPIResponse
- DeletedCommentResultComment
- EventLogEntry
- FComment
- FComment_meta
- FeedPost
- FeedPostLink
- FeedPostMediaItem
- FeedPostMediaItemAsset
- FeedPostStats
- FeedPostsStatsResponse
- FindCommentsByRangeItem
- FindCommentsByRangeResponse
- FlagCommentPublic_200_response
- FlagCommentResponse
- FlagComment_200_response
- GetAuditLogsResponse
- GetAuditLogs_200_response
- GetCommentText_200_response
- GetCommentVoteUserNamesSuccessResponse
- GetCommentVoteUserNames_200_response
- GetComment_200_response
- GetCommentsPublic_200_response
- GetCommentsResponseWithPresence_PublicComment_
- GetCommentsResponse_PublicComment_
- GetComments_200_response
- GetDomainConfig_200_response
- GetDomainConfigs_200_response
- GetDomainConfigs_200_response_anyOf
- GetDomainConfigs_200_response_anyOf_1
- GetEventLogResponse
- GetEventLog_200_response
- GetFeedPostsPublic_200_response
- GetFeedPostsResponse
- GetFeedPostsStats_200_response
- GetFeedPosts_200_response
- GetMyNotificationsResponse
- GetPageByURLIdAPIResponse
- GetPagesAPIResponse
- GetPublicFeedPostsResponse
- PutSSOUserAPIResponse
- QueryPredicate
- QueryPredicate_value
- QuestionDatum
- QuestionRenderingType
- QuestionResult
- QuestionResultAggregationOverall
- QuestionSubQuestionVisibility
- QuestionWhenSave
- ReactBodyParams
- ReactFeedPostPublic_200_response
- ReactFeedPostResponse
- Record_string__before_string_or_null__after_string_or_null___value
- Record_string_string_or_number__value
- RenderableUserNotification
- RepeatCommentCheckIgnoredReason
- RepeatCommentHandlingAction
- ResetUserNotificationsResponse
- ResetUserNotifications_200_response
- SORT_DIR
- SSOSecurityLevel
- SaveCommentResponse
- SaveCommentResponseOptimized
- SaveComment_200_response
- SaveCommentsResponseWithPresence
- SearchUsersResponse
- SearchUsers_200_response
- SetCommentTextResult
- SetCommentText_200_response
- SizePreset
- SortDirections
- SpamRule
- UnBlockCommentPublic_200_response
- UnBlockFromCommentParams
- UnblockSuccess
- UpdatableCommentParams
- UpdateAPIPageData
- UpdateAPISSOUserData
- UpdateDomainConfigParams
- UpdateFeedPostParams
- UpdateUserBadgeParams
- UpdateUserBadge_200_response
- UpdateUserNotificationStatus_200_response
- UploadImageResponse
- UserBadge
- UserBadgeProgress
- UserNotification
- UserNotificationWriteResponse
- UserPresenceData
- UserReactsResponse
- UserSearchResult
- UserSessionInfo
- VoteBodyParams
- VoteComment_200_response
- VoteDeleteResponse
- VoteResponse
- VoteResponseUser
- VoteStyle
授权文档
api_key
- 类型: API key
- API 密钥参数名称: x-api-key
- 位置: HTTP header
聚合 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| aggregationRequest | AggregationRequest | 否 | |
| parentTenantId | string | 否 | |
| includeStats | bool | 否 |
响应
返回:Option[AggregationResponse]
示例

获取审计日志 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| limit | float64 | 否 | |
| skip | float64 | 否 | |
| order | SORTDIR | 否 | |
| after | float64 | 否 | |
| before | float64 | 否 |
响应
返回:Option[GetAuditLogs_200_response]
示例

在公开评论中屏蔽 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| commentId | string | 是 | |
| publicBlockFromCommentParams | PublicBlockFromCommentParams | 否 | |
| sso | string | 否 |
响应
返回: Option[BlockFromCommentPublic_200_response]
示例

取消公开评论屏蔽 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| commentId | string | 是 | |
| publicBlockFromCommentParams | PublicBlockFromCommentParams | 否 | |
| sso | string | 否 |
响应
返回:Option[UnBlockCommentPublic_200_response]
示例

检查被屏蔽的评论 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| commentIds | string | 否 | |
| sso | string | 否 |
响应
返回: Option[CheckedCommentsForBlocked_200_response]
示例

从评论中屏蔽用户 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | Yes | |
| id | string | No | |
| blockFromCommentParams | BlockFromCommentParams | No | |
| userId | string | No | |
| anonUserId | string | No |
响应
返回: Option[BlockFromCommentPublic_200_response]
示例

创建公开评论 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| urlId | string | 是 | |
| broadcastId | string | 否 | |
| commentData | CommentData | 否 | |
| sessionId | string | 否 | |
| sso | string | 否 |
响应
返回: Option[CreateCommentPublic_200_response]
示例

删除评论 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| contextUserId | string | 否 | |
| isLive | bool | 否 |
响应
返回: Option[DeleteComment_200_response]
示例

删除公开评论 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| commentId | string | 是 | |
| broadcastId | string | 否 | |
| editKey | string | 否 | |
| sso | string | 否 |
响应
返回: Option[DeleteCommentPublic_200_response]
示例

删除评论投票 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| commentId | string | 是 | |
| voteId | string | 否 | |
| urlId | string | 是 | |
| broadcastId | string | 否 | |
| editKey | string | 否 | |
| sso | string | 否 |
响应
返回: Option[DeleteCommentVote_200_response]
示例

举报评论 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| userId | string | 否 | |
| anonUserId | string | 否 |
响应
返回: Option[FlagComment_200_response]
示例

获取评论 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 |
响应
返回: Option[GetComment_200_response]
示例

获取评论列表 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| page | int | 否 | |
| limit | int | 否 | |
| skip | int | 否 | |
| asTree | bool | 否 | |
| skipChildren | int | 否 | |
| limitChildren | int | 否 | |
| maxTreeDepth | int | 否 | |
| urlId | string | 是 | |
| userId | string | 否 | |
| anonUserId | string | 否 | |
| contextUserId | string | 否 | |
| hashTag | string | 否 | |
| parentId | string | 否 | |
| direction | SortDirections | 否 |
响应
返回: Option[GetComments_200_response]
示例

获取公开评论 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| urlId | string | 是 | |
| page | int | 否 | |
| direction | SortDirections | 否 | |
| sso | string | 否 | |
| skip | int | 否 | |
| skipChildren | int | 否 | |
| limit | int | 否 | |
| limitChildren | int | 否 | |
| countChildren | bool | 否 | |
| fetchPageForCommentId | string | 否 | |
| includeConfig | bool | 否 | |
| countAll | bool | 否 | |
| includei10n | bool | 否 | |
| locale | string | 否 | |
| modules | string | 否 | |
| isCrawler | bool | 否 | |
| includeNotificationCount | bool | 否 | |
| asTree | bool | 否 | |
| maxTreeDepth | int | 否 | |
| useFullTranslationIds | bool | 否 | |
| parentId | string | 否 | |
| searchText | string | 否 | |
| hashTags | seq[string] | 否 | |
| userId | string | 否 | |
| customConfigStr | string | 否 | |
| afterCommentId | string | 否 | |
| beforeCommentId | string | 否 |
响应
返回:Option[GetCommentsPublic_200_response]
示例

获取评论文本 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| commentId | string | 是 | |
| editKey | string | 否 | |
| sso | string | 否 |
响应
返回: Option[GetCommentText_200_response]
示例

获取评论投票用户名称 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| commentId | string | 是 | |
| dir | int | 否 | |
| sso | string | 否 |
响应
返回:Option[GetCommentVoteUserNames_200_response]
示例

锁定评论 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| commentId | string | 是 | |
| broadcastId | string | 否 | |
| sso | string | 否 |
响应
返回:Option[LockComment_200_response]
示例

置顶评论 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| commentId | string | 是 | |
| broadcastId | string | 否 | |
| sso | string | 否 |
响应
返回: Option[PinComment_200_response]
示例

保存评论 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| createCommentParams | CreateCommentParams | 否 | |
| isLive | bool | 否 | |
| doSpamCheck | bool | 否 | |
| sendEmails | bool | 否 | |
| populateNotifications | bool | 否 |
响应
返回:Option[SaveComment_200_response]
示例

批量保存评论 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| createCommentParams | seq[CreateCommentParams] | 否 | |
| isLive | bool | 否 | |
| doSpamCheck | bool | 否 | |
| sendEmails | bool | 否 | |
| populateNotifications | bool): (Option[seq[SaveComment_200_response]] | 否 | |
| id | string | 否 | |
| unBlockFromCommentParams | UnBlockFromCommentParams | 否 | |
| userId | string | 否 | |
| anonUserId | string | 否 |
响应
返回: Option[UnBlockCommentPublic_200_response]
示例

设置评论文本 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| commentId | string | 是 | |
| broadcastId | string | 否 | |
| commentTextUpdateRequest | CommentTextUpdateRequest | 否 | |
| editKey | string | 否 | |
| sso | string | 否 |
响应
返回: Option[SetCommentText_200_response]
示例

取消从评论中屏蔽用户 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| unBlockFromCommentParams | UnBlockFromCommentParams | 否 | |
| userId | string | 否 | |
| anonUserId | string | 否 |
响应
返回: Option[UnBlockCommentPublic_200_response]
示例

取消举报评论 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | Yes | |
| id | string | No | |
| userId | string | No | |
| anonUserId | string | No |
响应
返回: Option[FlagComment_200_response]
示例

解锁评论 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| commentId | string | 是 | |
| broadcastId | string | 否 | |
| sso | string | 否 |
响应
返回:Option[LockComment_200_response]
示例

取消置顶评论 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| commentId | string | 是 | |
| broadcastId | string | 否 | |
| sso | string | 否 |
响应
返回: Option[PinComment_200_response]
示例

更新评论 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| updatableCommentParams | UpdatableCommentParams | 否 | |
| contextUserId | string | 否 | |
| doSpamCheck | bool | 否 | |
| isLive | bool | 否 |
响应
返回:Option[FlagCommentPublic_200_response]
示例

评论投票 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| commentId | string | 是 | |
| urlId | string | 是 | |
| broadcastId | string | 否 | |
| voteBodyParams | VoteBodyParams | 否 | |
| sessionId | string | 否 | |
| sso | string | 否 |
响应
返回: Option[VoteComment_200_response]
示例

添加域配置 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| addDomainConfigParams | AddDomainConfigParams | 否 |
响应
返回: Option[AddDomainConfig_200_response]
示例

删除域配置 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| domain | string | 否 |
响应
返回: Option[DeleteDomainConfig_200_response]
示例

获取域配置 
参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| tenantId | string | 是 | |
| domain | string | 否 |
响应
返回: Option[GetDomainConfig_200_response]
示例

获取域配置列表 
参数
| Name | Type | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 |
响应
返回: Option[GetDomainConfigs_200_response]
示例

部分更新域配置 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| domainToUpdate | string | 否 | |
| patchDomainConfigParams | PatchDomainConfigParams | 否 |
响应
返回: Option[GetDomainConfig_200_response]
示例

替换域配置 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| domainToUpdate | string | 否 | |
| updateDomainConfigParams | UpdateDomainConfigParams | 否 |
响应
返回:Option[GetDomainConfig_200_response]
示例

创建邮件模板 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| createEmailTemplateBody | CreateEmailTemplateBody | 否 |
响应
返回:Option[CreateEmailTemplate_200_response]
示例

删除邮件模板 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 |
响应
返回: Option[FlagCommentPublic_200_response]
示例

删除邮件模板渲染错误 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| errorId | string | 否 |
响应
返回: Option[FlagCommentPublic_200_response]
示例

获取邮件模板 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 |
响应
返回: Option[GetEmailTemplate_200_response]
示例

获取邮件模板定义 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 |
响应
返回: Option[GetEmailTemplateDefinitions_200_response]
示例

获取邮件模板渲染错误 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| skip | float64 | 否 |
响应
返回: Option[GetEmailTemplateRenderErrors_200_response]
示例

获取邮件模板列表 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| skip | float64 | 否 |
响应
返回: Option[GetEmailTemplates_200_response]
示例

渲染邮件模板 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| renderEmailTemplateBody | RenderEmailTemplateBody | 否 | |
| locale | string | 否 |
响应
返回:Option[RenderEmailTemplate_200_response]
示例

更新邮件模板 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| updateEmailTemplateBody | UpdateEmailTemplateBody | 否 |
响应
返回: Option[FlagCommentPublic_200_response]
示例

获取事件日志 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| urlId | string | 是 | |
| userIdWS | string | 否 | |
| startTime | int64 | 否 | |
| endTime | int64 | 否 |
响应
返回: Option[GetEventLog_200_response]
示例

获取全局事件日志 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| urlId | string | 是 | |
| userIdWS | string | 否 | |
| startTime | int64 | 否 | |
| endTime | int64 | 否 |
响应
返回: Option[GetEventLog_200_response]
示例

创建动态帖子 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | Yes | |
| createFeedPostParams | CreateFeedPostParams | No | |
| broadcastId | string | No | |
| isLive | bool | No | |
| doSpamCheck | bool | No | |
| skipDupCheck | bool | No |
响应
返回: Option[CreateFeedPost_200_response]
示例

创建公开动态帖子 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| createFeedPostParams | CreateFeedPostParams | 否 | |
| broadcastId | string | 否 | |
| sso | string | 否 |
响应
返回:Option[CreateFeedPostPublic_200_response]
示例

删除公开动态帖子 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| postId | string | 否 | |
| broadcastId | string | 否 | |
| sso | string | 否 |
响应
返回: Option[DeleteFeedPostPublic_200_response]
示例

获取动态帖子 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| afterId | string | 否 | |
| limit | int | 否 | |
| tags | seq[string] | 否 |
响应
返回: Option[GetFeedPosts_200_response]
示例

获取公开动态帖子 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| afterId | string | 否 | |
| limit | int | 否 | |
| tags | seq[string] | 否 | |
| sso | string | 否 | |
| isCrawler | bool | 否 | |
| includeUserInfo | bool | 否 |
响应
返回: Option[GetFeedPostsPublic_200_response]
示例

获取动态帖子统计 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| postIds | seq[string] | 否 | |
| sso | string | 否 |
响应
返回: Option[GetFeedPostsStats_200_response]
示例

获取用户公开反应 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| postIds | seq[string] | 否 | |
| sso | string | 否 |
响应
返回: Option[GetUserReactsPublic_200_response]
示例

对公开动态帖子反应 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| postId | string | 否 | |
| reactBodyParams | ReactBodyParams | 否 | |
| isUndo | bool | 否 | |
| broadcastId | string | 否 | |
| sso | string | 否 |
响应
返回:Option[ReactFeedPostPublic_200_response]
示例

更新动态帖子 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| feedPost | FeedPost | 否 |
响应
返回: Option[FlagCommentPublic_200_response]
示例

更新公开动态帖子 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| postId | string | 否 | |
| updateFeedPostParams | UpdateFeedPostParams | 否 | |
| broadcastId | string | 否 | |
| sso | string | 否 |
响应
返回: Option[CreateFeedPostPublic_200_response]
示例

公开举报评论 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| commentId | string | 是 | |
| isFlagged | bool | 否 | |
| sso | string | 否 |
响应
返回: Option[FlagCommentPublic_200_response]
示例

添加话题标签 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| createHashTagBody | CreateHashTagBody | 否 |
响应
返回: Option[AddHashTag_200_response]
示例

批量添加话题标签 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| bulkCreateHashTagsBody | BulkCreateHashTagsBody | 否 |
响应
返回: Option[AddHashTagsBulk_200_response]
示例

删除话题标签 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tag | string | 否 | |
| tenantId | string | 是 | |
| deleteHashTagRequest | DeleteHashTagRequest | 否 |
响应
返回:Option[FlagCommentPublic_200_response]
示例

获取话题标签 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| page | float64 | 否 |
响应
返回: Option[GetHashTags_200_response]
示例

部分更新话题标签 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tag | string | 否 | |
| tenantId | string | 是 | |
| updateHashTagBody | UpdateHashTagBody | 否 |
响应
返回:Option[PatchHashTag_200_response]
示例

创建版主 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| createModeratorBody | CreateModeratorBody | 否 |
响应
返回:Option[CreateModerator_200_response]
示例

删除版主 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| sendEmail | string | 否 |
响应
返回: Option[FlagCommentPublic_200_response]
示例

获取版主 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 |
响应
返回: Option[GetModerator_200_response]
示例

获取版主列表 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| skip | float64 | 否 |
响应
返回: Option[GetModerators_200_response]
示例

更新版主 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| updateModeratorBody | UpdateModeratorBody | 否 |
响应
返回: Option[FlagCommentPublic_200_response]
示例

删除通知计数 
参数
| 名称 | 类型 | 必需 | 说明 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 |
响应
返回: Option[FlagCommentPublic_200_response]
示例

获取缓存的通知计数 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 |
响应
返回: Option[GetCachedNotificationCount_200_response]
示例

获取通知计数 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| userId | string | 否 | |
| urlId | string | 是 | |
| fromCommentId | string | 否 | |
| viewed | bool | 否 |
响应
返回: Option[GetNotificationCount_200_response]
示例

获取通知 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| userId | string | 否 | |
| urlId | string | 是 | |
| fromCommentId | string | 否 | |
| viewed | bool | 否 | |
| skip | float64 | 否 |
响应
返回: Option[GetNotifications_200_response]
示例

更新通知 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| updateNotificationBody | UpdateNotificationBody | 否 | |
| userId | string | 否 |
响应
返回: Option[FlagCommentPublic_200_response]
示例

添加页面 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| createAPIPageData | CreateAPIPageData | 否 |
响应
示例

删除页面 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 |
响应
返回: Option[DeletePageAPIResponse]
示例

通过 URL ID 获取页面 
参数
| 名称 | 类型 | 是否必需 | 说明 |
|---|---|---|---|
| tenantId | string | 是 | |
| urlId | string | 是 |
响应
返回:Option[GetPageByURLIdAPIResponse]
示例

获取页面列表 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 |
响应
返回:Option[GetPagesAPIResponse]
示例

部分更新页面 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| updateAPIPageData | UpdateAPIPageData | 否 |
响应
返回:Option[PatchPageAPIResponse]
示例

删除待处理的 Webhook 事件 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 |
响应
返回: Option[FlagCommentPublic_200_response]
示例

获取待处理的 Webhook 事件计数 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| commentId | string | 是 | |
| externalId | string | 否 | |
| eventType | string | 否 | |
| domain | string | 否 | |
| attemptCountGT | float64 | 否 |
响应
返回: Option[GetPendingWebhookEventCount_200_response]
示例

获取待处理的 Webhook 事件 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| commentId | string | 是 | |
| externalId | string | 否 | |
| eventType | string | 否 | |
| domain | string | 否 | |
| attemptCountGT | float64 | 否 | |
| skip | float64 | 否 |
响应
返回: Option[GetPendingWebhookEvents_200_response]
示例

创建问题配置 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| createQuestionConfigBody | CreateQuestionConfigBody | 否 |
响应
返回: Option[CreateQuestionConfig_200_response]
示例

删除问题配置 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 |
响应
返回: Option[FlagCommentPublic_200_response]
示例

获取问题配置 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 |
响应
返回:Option[GetQuestionConfig_200_response]
示例

获取问题配置列表 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| skip | float64 | 否 |
响应
返回: Option[GetQuestionConfigs_200_response]
示例

更新问题配置 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| updateQuestionConfigBody | UpdateQuestionConfigBody | 否 |
响应
返回: Option[FlagCommentPublic_200_response]
示例

创建问题结果 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| createQuestionResultBody | CreateQuestionResultBody | 否 |
响应
返回: Option[CreateQuestionResult_200_response]
示例

删除问题结果 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 |
响应
返回: Option[FlagCommentPublic_200_response]
示例

获取问题结果 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 |
响应
返回: Option[GetQuestionResult_200_response]
示例

获取问题结果列表 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| urlId | string | 是 | |
| userId | string | 否 | |
| startDate | string | 否 | |
| questionId | string | 否 | |
| questionIds | string | 否 | |
| skip | float64 | 否 |
响应
返回:Option[GetQuestionResults_200_response]
示例

更新问题结果 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | Yes | |
| id | string | No | |
| updateQuestionResultBody | UpdateQuestionResultBody | No |
响应
返回: Option[FlagCommentPublic_200_response]
示例

聚合问题结果 
参数
| Name | Type | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| questionId | string | 否 | |
| questionIds | seq[string] | 否 | |
| urlId | string | 是 | |
| timeBucket | AggregateTimeBucket | 否 | |
| startDate | string | 否 | |
| forceRecalculate | bool | 否 |
响应
返回: Option[AggregateQuestionResults_200_response]
示例

批量聚合问题结果 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| bulkAggregateQuestionResultsRequest | BulkAggregateQuestionResultsRequest | 否 | |
| forceRecalculate | bool | 否 |
响应
返回: Option[BulkAggregateQuestionResults_200_response]
示例

将评论与问题结果合并 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| questionId | string | 否 | |
| questionIds | seq[string] | 否 | |
| urlId | string | 是 | |
| startDate | string | 否 | |
| forceRecalculate | bool | 否 | |
| minValue | float64 | 否 | |
| maxValue | float64 | 否 | |
| limit | float64 | 否 |
响应
返回: Option[CombineCommentsWithQuestionResults_200_response]
示例

添加 SSO 用户 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| createAPISSOUserData | CreateAPISSOUserData | 否 |
响应
返回: Option[AddSSOUserAPIResponse]
示例

删除 SSO 用户 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| deleteComments | bool | 否 | |
| commentDeleteMode | string | 否 |
响应
返回:Option[DeleteSSOUserAPIResponse]
示例

通过邮箱获取 SSO 用户 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| string | 否 |
响应
返回: Option[GetSSOUserByEmailAPIResponse]
示例

通过 ID 获取 SSO 用户 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 |
响应
返回: Option[GetSSOUserByIdAPIResponse]
示例

获取 SSO 用户列表 
参数
| 名称 | 类型 | 是否必需 | 说明 |
|---|---|---|---|
| tenantId | string | 是 | |
| skip | int | 否 |
响应
返回: Option[GetSSOUsers_200_response]
示例

部分更新 SSO 用户 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| updateAPISSOUserData | UpdateAPISSOUserData | 否 | |
| updateComments | bool | 否 |
响应
返回值: Option[PatchSSOUserAPIResponse]
示例

替换 SSO 用户 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| updateAPISSOUserData | UpdateAPISSOUserData | 否 | |
| updateComments | bool | 否 |
响应
返回: Option[PutSSOUserAPIResponse]
示例

创建订阅 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| createAPIUserSubscriptionData | CreateAPIUserSubscriptionData | 否 |
响应
返回: Option[CreateSubscriptionAPIResponse]
示例

删除订阅 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| userId | string | 否 |
响应
返回: Option[DeleteSubscriptionAPIResponse]
示例

获取订阅列表 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| userId | string | 否 |
响应
返回: Option[GetSubscriptionsAPIResponse]
示例

获取租户每日用量 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| yearNumber | float64 | 否 | |
| monthNumber | float64 | 否 | |
| dayNumber | float64 | 否 | |
| skip | float64 | 否 |
响应
返回: Option[GetTenantDailyUsages_200_response]
示例

创建租户套餐 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| createTenantPackageBody | CreateTenantPackageBody | 否 |
响应
返回: Option[CreateTenantPackage_200_response]
示例

删除租户套餐 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 |
响应
返回: Option[FlagCommentPublic_200_response]
示例

获取租户套餐 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 |
响应
返回: Option[GetTenantPackage_200_response]
示例

获取租户套餐列表 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| skip | float64 | 否 |
响应
返回: Option[GetTenantPackages_200_response]
示例

替换租户套餐 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| replaceTenantPackageBody | ReplaceTenantPackageBody | 否 |
Response
返回: Option[FlagCommentPublic_200_response]
示例

更新租户套餐 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| updateTenantPackageBody | UpdateTenantPackageBody | 否 |
响应
返回: Option[FlagCommentPublic_200_response]
示例

创建租户用户 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| createTenantUserBody | CreateTenantUserBody | 否 |
响应
返回:Option[CreateTenantUser_200_response]
示例

删除租户用户 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| deleteComments | string | 否 | |
| commentDeleteMode | string | 否 |
响应
返回: Option[FlagCommentPublic_200_response]
示例

获取租户用户 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 |
响应
返回: Option[GetTenantUser_200_response]
示例

获取租户用户列表 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| skip | float64 | 否 |
响应
返回: Option[GetTenantUsers_200_response]
示例

替换租户用户 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| replaceTenantUserBody | ReplaceTenantUserBody | 否 | |
| updateComments | string | 否 |
响应
返回: Option[FlagCommentPublic_200_response]
示例

发送登录链接 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| redirectURL | string | 否 |
响应
返回: Option[FlagCommentPublic_200_response]
示例

更新租户用户 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| updateTenantUserBody | UpdateTenantUserBody | 否 | |
| updateComments | string | 否 |
响应
返回: Option[FlagCommentPublic_200_response]
示例

创建租户 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| createTenantBody | CreateTenantBody | 否 |
响应
返回: Option[CreateTenant_200_response]
示例

删除租户 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| sure | string | 否 |
响应
返回:Option[FlagCommentPublic_200_response]
示例

获取租户 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 |
响应
返回: Option[GetTenant_200_response]
示例

获取租户列表 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| meta | string | 否 | |
| skip | float64 | 否 |
响应
返回:Option[GetTenants_200_response]
示例

更新租户 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| updateTenantBody | UpdateTenantBody | 否 |
响应
返回: Option[FlagCommentPublic_200_response]
示例

上传图片 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| file | string | 否 | |
| sizePreset | SizePreset | 否 | |
| urlId | string | 是 |
响应
返回:Option[UploadImageResponse]
示例

通过 ID 获取用户徽章进度 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | No |
响应
返回: Option[GetUserBadgeProgressById_200_response]
示例

通过用户 ID 获取用户徽章进度 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| userId | string | 否 |
响应
返回:Option[GetUserBadgeProgressById_200_response]
示例

获取用户徽章进度列表 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| userId | string | 否 | |
| limit | float64 | 否 | |
| skip | float64 | 否 |
响应
返回: Option[GetUserBadgeProgressList_200_response]
示例

创建用户徽章 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| createUserBadgeParams | CreateUserBadgeParams | 否 |
响应
返回: Option[CreateUserBadge_200_response]
示例

删除用户徽章 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 |
响应
返回: Option[UpdateUserBadge_200_response]
示例

获取用户徽章 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 |
响应
返回: Option[GetUserBadge_200_response]
示例

获取用户徽章列表 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| userId | string | 否 | |
| badgeId | string | 否 | |
| displayedOnComments | bool | 否 | |
| limit | float64 | 否 | |
| skip | float64 | 否 |
响应
返回:Option[GetUserBadges_200_response]
示例

更新用户徽章 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| updateUserBadgeParams | UpdateUserBadgeParams | 否 |
响应
返回:Option[UpdateUserBadge_200_response]
示例

获取用户通知计数 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| sso | string | 否 |
响应
返回: Option[GetUserNotificationCount_200_response]
示例

获取用户通知 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| pageSize | int | 否 | |
| afterId | string | 否 | |
| includeContext | bool | 否 | |
| afterCreatedAt | int64 | 否 | |
| unreadOnly | bool | 否 | |
| dmOnly | bool | 否 | |
| noDm | bool | 否 | |
| includeTranslations | bool | 否 | |
| sso | string | 否 |
响应
返回: Option[GetUserNotifications_200_response]
示例

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

重置用户通知 
参数
| Name | Type | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| afterId | string | 否 | |
| afterCreatedAt | int64 | 否 | |
| unreadOnly | bool | 否 | |
| dmOnly | bool | 否 | |
| noDm | bool | 否 | |
| sso | string | 否 |
响应
返回: Option[ResetUserNotifications_200_response]
示例

更新用户评论订阅状态 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| notificationId | string | 否 | |
| optedInOrOut | string | 否 | |
| commentId | string | 是 | |
| sso | string | 否 |
响应
返回:Option[UpdateUserNotificationStatus_200_response]
示例

更新用户页面订阅状态 
参数
| 名称 | Type | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| urlId | string | 是 | |
| url | string | 否 | |
| pageTitle | string | 否 | |
| subscribedOrUnsubscribed | string | 否 | |
| sso | string | 否 |
响应
返回: Option[UpdateUserNotificationStatus_200_response]
示例

更新用户通知状态 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| notificationId | string | 否 | |
| newStatus | string | 否 | |
| sso | string | 否 |
响应
返回: Option[UpdateUserNotificationStatus_200_response]
示例

获取用户在线状态 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | Yes | |
| urlIdWS | string | No | |
| userIds | string | No |
响应
返回: Option[GetUserPresenceStatuses_200_response]
示例

搜索用户 
参数
| 名称 | 类型 | 必需 | 说明 |
|---|---|---|---|
| tenantId | string | 是 | |
| urlId | string | 是 | |
| usernameStartsWith | string | 否 | |
| mentionGroupIds | seq[string] | 否 | |
| sso | string | 否 |
响应
返回:Option[SearchUsers_200_response]
示例

获取用户 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 |
响应
返回: Option[GetUser_200_response]
示例

创建投票 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| commentId | string | 是 | |
| direction | string | 否 | |
| userId | string | 否 | |
| anonUserId | string | 否 |
响应
返回: Option[VoteComment_200_response]
示例

删除投票 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| editKey | string | 否 |
响应
返回: Option[DeleteCommentVote_200_response]
示例

获取投票 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| urlId | string | 是 |
响应
返回: Option[GetVotes_200_response]
示例

获取用户的投票 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | 是 | |
| urlId | string | 是 | |
| userId | string | 否 | |
| anonUserId | string | 否 |
响应
返回:Option[GetVotesForUser_200_response]
示例

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