
语言 🇨🇳 简体中文
入门
文档
聚合
API
审计日志
基于评论封禁
检查被封禁的评论
评论
用户评论
域配置
电子邮件模板
事件日志
动态帖子
标记评论
动图
标签
审核
审核员
通知计数
通知
页面反应
页面
待处理的 Webhook 事件
问题配置
问题结果
问题结果聚合
单点登录用户
订阅
租户每日使用量
租户套餐
租户用户
租户
工单
翻译
上传图片
用户徽章进度
用户徽章
用户通知
用户在线状态
用户搜索
用户
投票
FastComments Rust SDK
这是 FastComments 的官方 Rust SDK。
FastComments API 的官方 Rust SDK
仓库
库内容 
The FastComments Rust SDK 包含若干模块:
-
Client Module - FastComments REST API 的 API 客户端
- 完整的所有 API 模型的类型定义
- 三个 API 客户端,覆盖所有 FastComments 方法:
default_api(DefaultApi) - 通过 API 密钥进行身份验证的服务器端使用方法public_api(PublicApi) - 公共的、无需 API 密钥的方法,可安全地从浏览器和移动应用调用moderation_api(ModerationApi) - 一个广泛的实时快速审核 API 套件。每个 Moderation 方法接受sso参数,并可通过 SSO 或 FastComments.com 会话 cookie 进行身份验证。
- 完整的基于 tokio 的 async/await 支持
- 详尽的 API 文档请参阅 client/README.md
-
SSO Module - 服务器端单点登录工具
- 为用户认证生成安全令牌
- 支持简易和安全两种 SSO 模式
- 基于 HMAC-SHA256 的令牌签名
-
Core Types - 共享的类型定义和工具
- 评论模型和元数据结构
- 用户和租户配置
- 常用操作的辅助函数
快速开始 
使用公共 API
use fastcomments_sdk::client::apis::configuration::Configuration;
use fastcomments_sdk::client::apis::public_api;
#[tokio::main]
async fn main() {
// 创建 API 配置
let config = Configuration::new();
// 获取页面的评论
let result = public_api::get_comments_public(
&config,
public_api::GetCommentsPublicParams {
tenant_id: "your-tenant-id".to_string(),
urlid: Some("page-url-id".to_string()),
url: None,
count_only: None,
skip: None,
limit: None,
sort_dir: None,
page: None,
sso_hash: None,
simple_sso_hash: None,
has_no_comment: None,
has_comment: None,
comment_id_filter: None,
child_ids: None,
start_date_time: None,
starts_with: None,
},
)
.await;
match result {
Ok(response) => {
println!("Found {} comments", response.comments.len());
for comment in response.comments {
println!("Comment: {:?}", comment);
}
}
Err(e) => eprintln!("Error fetching comments: {:?}", e),
}
}
使用已认证的 API
use fastcomments_sdk::client::apis::configuration::{ApiKey, Configuration};
use fastcomments_sdk::client::apis::default_api;
#[tokio::main]
async fn main() {
// 使用 API 密钥创建配置
let mut config = Configuration::new();
config.api_key = Some(ApiKey {
prefix: None,
key: "your-api-key".to_string(),
});
// 使用已认证的 API 获取评论
let result = default_api::get_comments(
&config,
default_api::GetCommentsParams {
tenant_id: "your-tenant-id".to_string(),
skip: None,
limit: None,
sort_dir: None,
urlid: Some("page-url-id".to_string()),
url: None,
is_spam: None,
user_id: None,
all_comments: None,
for_moderation: None,
parent_id: None,
is_flagged: None,
is_flagged_tag: None,
is_by_verified: None,
is_pinned: None,
asc: None,
include_imported: None,
origin: None,
tags: None,
},
)
.await;
match result {
Ok(response) => {
println!("Total comments: {}", response.count);
for comment in response.comments {
println!("Comment ID: {}, Text: {}", comment.id, comment.comment);
}
}
Err(e) => eprintln!("Error: {:?}", e),
}
}
使用审核 API
审核方法为版主仪表板提供支持。它们像已认证的 API 一样使用 API 密钥 Configuration,并且每个方法接受一个可选的 sso 令牌,以便代表通过 SSO 验证的版主进行调用。
use fastcomments_sdk::client::apis::configuration::{ApiKey, Configuration};
use fastcomments_sdk::client::apis::moderation_api;
#[tokio::main]
async fn main() {
// 使用 API 密钥创建配置
let mut config = Configuration::new();
config.api_key = Some(ApiKey {
prefix: None,
key: "your-api-key".to_string(),
});
// 统计等待审核队列中的评论
let result = moderation_api::get_count(
&config,
moderation_api::GetCountParams {
text_search: None,
by_ip_from_comment: None,
filter: None,
search_filters: None,
demo: None,
sso: None, // 传入 SSO 令牌以作为通过 SSO 验证的版主执行
},
)
.await;
match result {
Ok(response) => println!("Comments to moderate: {}", response.count),
Err(e) => eprintln!("Error: {:?}", e),
}
}
使用 SSO 进行认证
use fastcomments_sdk::sso::{
fastcomments_sso::FastCommentsSSO,
secure_sso_user_data::SecureSSOUserData,
};
fn main() {
let api_key = "your-api-key".to_string();
// 创建安全的 SSO 用户数据(仅限服务器端!)
let user_data = SecureSSOUserData::new(
"user-123".to_string(), // 用户 ID
"user@example.com".to_string(), // 邮箱
"John Doe".to_string(), // 用户名
"https://example.com/avatar.jpg".to_string(), // 头像 URL
);
// 生成 SSO 令牌
let sso = FastCommentsSSO::new_secure(api_key, &user_data).unwrap();
let token = sso.create_token().unwrap();
println!("SSO Token: {}", token);
// 将此令牌传递给前端用于认证
}
常见问题 
401 未授权错误
如果在使用需要身份验证的 API 时遇到 401 错误:
- 检查你的 API key:确保你正在使用来自 FastComments dashboard 的正确 API key
- 验证 tenant ID:确保 tenant ID 与您的帐户匹配
- API key 格式:API key 应在 Configuration 中传递:
let mut config = Configuration::new();
config.api_key = Some(ApiKey {
prefix: None,
key: "YOUR_API_KEY".to_string(),
});
SSO 令牌问题
如果 SSO 令牌 无法正常工作:
- 在生产环境中使用安全模式:始终在生产环境使用
FastCommentsSSO::new_secure()并搭配您的 API key - 仅限服务器端:在服务器上生成 SSO 令牌,切勿将您的 API key 暴露给客户端
- 检查用户数据:确保所有必需字段 (id, email, username) 已提供
异步运行时错误
该 SDK 使用 tokio 进行异步操作。请确保:
- 将 tokio 添加到您的依赖项:
[dependencies]
tokio = { version = "1", features = ["full"] }
- 使用 tokio 运行时:
#[tokio::main]
async fn main() {
// 在此处放置您的异步代码
}
注意事项 
广播 ID
你会看到在某些 API 调用中需要传入 broadcastId。当你接收到事件时,会返回这个 ID,因此如果你计划在客户端乐观地应用更改,就可以据此忽略该事件
(你很可能会想这样做,因为它能提供最佳体验)。在此处传入 UUID。该 ID 应足够唯一,以免在同一浏览器会话中出现两次。
聚合 
聚合文档,通过分组(如果提供 groupBy)并应用多个操作。支持不同的操作(例如 sum、countDistinct、avg 等)。
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| aggregation_request | models::AggregationRequest | 是 | |
| parent_tenant_id | String | 否 | |
| include_stats | bool | 否 |
响应
示例

获取 API 评论 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| page | f64 | No | |
| count | f64 | No | |
| text_search | String | No | |
| by_ip_from_comment | String | No | |
| filters | String | No | |
| search_filters | String | No | |
| sorts | String | No | |
| demo | bool | No | |
| sso | String | No |
响应
返回:ModerationApiGetCommentsResponse
示例

获取 API 导出状态 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| batch_job_id | String | No | |
| sso | String | No |
响应
返回:ModerationExportStatusResponse
示例

获取 API ID 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| text_search | String | No | |
| by_ip_from_comment | String | No | |
| filters | String | No | |
| search_filters | String | No | |
| after_id | String | No | |
| demo | bool | No | |
| sso | String | No |
响应
返回: ModerationApiGetCommentIdsResponse
示例

提交 API 导出 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| text_search | String | No | |
| by_ip_from_comment | String | No | |
| filters | String | No | |
| search_filters | String | No | |
| sorts | String | No | |
| sso | String | No |
响应
示例

获取审计日志 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| limit | f64 | 否 | |
| skip | f64 | 否 | |
| order | models::SortDir | 否 | |
| after | f64 | 否 | |
| before | f64 | 否 |
响应
示例

从评论封禁 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| public_block_from_comment_params | models::PublicBlockFromCommentParams | Yes | |
| sso | String | No |
响应
返回: BlockSuccess
示例

取消封禁评论 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| public_block_from_comment_params | models::PublicBlockFromCommentParams | Yes | |
| sso | String | No |
响应
返回: UnblockSuccess
示例

检查被封禁的评论 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_ids | String | Yes | |
| sso | String | No |
响应
返回:CheckBlockedCommentsResponse
示例

基于评论封禁用户 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| block_from_comment_params | models::BlockFromCommentParams | Yes | |
| user_id | String | No | |
| anon_user_id | String | No |
响应
返回: BlockSuccess
示例

创建评论(公开) 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes | |
| broadcast_id | String | Yes | |
| comment_data | models::CommentData | Yes | |
| session_id | String | No | |
| sso | String | No |
响应
返回: SaveCommentsResponseWithPresence
示例

删除评论 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| context_user_id | String | No | |
| is_live | bool | No |
响应
示例

删除公开评论 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| broadcast_id | String | Yes | |
| edit_key | String | No | |
| sso | String | No |
响应
返回: PublicApiDeleteCommentResponse
示例

删除评论投票 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| vote_id | String | Yes | |
| url_id | String | Yes | |
| broadcast_id | String | Yes | |
| edit_key | String | No | |
| sso | String | No |
响应
示例

标记评论 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| user_id | String | No | |
| anon_user_id | String | No |
响应
示例

获取评论 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
响应
示例

获取评论文本 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 是 | |
| edit_key | String | 否 | |
| sso | String | 否 |
响应
返回:PublicApiGetCommentTextResponse
示例

获取评论投票用户名称 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 是 | |
| dir | i32 | 是 | |
| sso | String | 否 |
响应
返回:GetCommentVoteUserNamesSuccessResponse
示例

获取评论列表 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| page | i32 | 否 | |
| limit | i32 | 否 | |
| skip | i32 | 否 | |
| as_tree | bool | 否 | |
| skip_children | i32 | 否 | |
| limit_children | i32 | 否 | |
| max_tree_depth | i32 | 否 | |
| url_id | String | 否 | |
| user_id | String | 否 | |
| anon_user_id | String | 否 | |
| context_user_id | String | 否 | |
| hash_tag | String | 否 | |
| parent_id | String | 否 | |
| direction | models::SortDirections | 否 | |
| from_date | i64 | 否 | |
| to_date | i64 | 否 |
响应
示例

获取公开评论 
req tenantId urlId
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| url_id | String | 是 | |
| page | i32 | 否 | |
| direction | models::SortDirections | 否 | |
| sso | String | 否 | |
| skip | i32 | 否 | |
| skip_children | i32 | 否 | |
| limit | i32 | 否 | |
| limit_children | i32 | 否 | |
| count_children | bool | 否 | |
| fetch_page_for_comment_id | String | 否 | |
| include_config | bool | 否 | |
| count_all | bool | 否 | |
| includei10n | bool | 否 | |
| locale | String | 否 | |
| modules | String | 否 | |
| is_crawler | bool | 否 | |
| include_notification_count | bool | 否 | |
| as_tree | bool | 否 | |
| max_tree_depth | i32 | 否 | |
| use_full_translation_ids | bool | 否 | |
| parent_id | String | 否 | |
| search_text | String | 否 | |
| hash_tags | Vec | 否 | |
| user_id | String | 否 | |
| custom_config_str | String | 否 | |
| after_comment_id | String | 否 | |
| before_comment_id | String | 否 |
响应
返回: GetCommentsResponseWithPresencePublicComment
示例

锁定评论 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 是 | |
| broadcast_id | String | 是 | |
| sso | String | 否 |
响应
返回: ApiEmptyResponse
示例

置顶评论 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| broadcast_id | String | Yes | |
| sso | String | No |
响应
返回: ChangeCommentPinStatusResponse
示例

保存评论 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_comment_params | models::CreateCommentParams | Yes | |
| is_live | bool | No | |
| do_spam_check | bool | No | |
| send_emails | bool | No | |
| populate_notifications | bool | No |
响应
示例

批量保存评论 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_comment_params | Vecmodels::CreateCommentParams | Yes | |
| is_live | bool | No | |
| do_spam_check | bool | No | |
| send_emails | bool | No | |
| populate_notifications | bool | No |
响应
返回: Vec<models::SaveCommentsBulkResponse>
示例

设置评论文本 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| broadcast_id | String | Yes | |
| comment_text_update_request | models::CommentTextUpdateRequest | Yes | |
| edit_key | String | No | |
| sso | String | No |
响应
返回:PublicApiSetCommentTextResponse
示例

取消基于评论的用户封禁 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| un_block_from_comment_params | models::UnBlockFromCommentParams | Yes | |
| user_id | String | No | |
| anon_user_id | String | No |
响应
返回: UnblockSuccess
示例

取消标记评论 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| user_id | String | No | |
| anon_user_id | String | No |
响应
示例

解锁评论 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 是 | |
| broadcast_id | String | 是 | |
| sso | String | 否 |
响应
返回: ApiEmptyResponse
示例

取消置顶评论 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 是 | |
| broadcast_id | String | 是 | |
| sso | String | 否 |
响应
返回:ChangeCommentPinStatusResponse
示例

更新评论 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| updatable_comment_params | models::UpdatableCommentParams | Yes | |
| context_user_id | String | No | |
| do_spam_check | bool | No | |
| is_live | bool | No |
响应
示例

为评论投票 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 是 | |
| url_id | String | 是 | |
| broadcast_id | String | 是 | |
| vote_body_params | models::VoteBodyParams | 是 | |
| session_id | String | 否 | |
| sso | String | 否 |
响应
返回:VoteResponse
示例

获取用户的评论 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| user_id | String | No | |
| direction | models::SortDirections | No | |
| replies_to_user_id | String | No | |
| page | f64 | No | |
| includei10n | bool | No | |
| locale | String | No | |
| is_crawler | bool | No |
响应
示例

添加域配置 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| add_domain_config_params | models::AddDomainConfigParams | 是 |
响应
示例

删除域配置 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| domain | String | 是 |
响应
示例

获取域配置 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| domain | String | 是 |
响应
示例

获取域配置列表 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 |
响应
示例

修改域配置 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| domain_to_update | String | 是 | |
| patch_domain_config_params | models::PatchDomainConfigParams | 是 |
响应
示例

替换域配置 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| domain_to_update | String | Yes | |
| update_domain_config_params | models::UpdateDomainConfigParams | Yes |
响应
示例

创建电子邮件模板 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | 是 | |
| create_email_template_body | models::CreateEmailTemplateBody | 是 |
响应
返回: CreateEmailTemplateResponse
示例

删除电子邮件模板 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
响应
返回: ApiEmptyResponse
示例

删除电子邮件模板渲染错误 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| error_id | String | Yes |
响应
示例

获取电子邮件模板 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
响应
示例

获取电子邮件模板定义 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 |
响应
返回:GetEmailTemplateDefinitionsResponse
示例

获取电子邮件模板渲染错误 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| skip | f64 | 否 |
响应
返回: GetEmailTemplateRenderErrorsResponse
示例

获取电子邮件模板列表 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| skip | f64 | No |
响应
示例

渲染电子邮件模板 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| render_email_template_body | models::RenderEmailTemplateBody | Yes | |
| locale | String | No |
响应
Returns: RenderEmailTemplateResponse
示例

更新电子邮件模板 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| update_email_template_body | models::UpdateEmailTemplateBody | 是 |
响应
返回: ApiEmptyResponse
示例

获取事件日志 
req tenantId urlId userIdWS
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| url_id | String | 是 | |
| user_id_ws | String | 是 | |
| start_time | i64 | 是 | |
| end_time | i64 | 否 |
响应
示例

获取全局事件日志 
req tenantId urlId userIdWS
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| url_id | String | 是 | |
| user_id_ws | String | 是 | |
| start_time | i64 | 是 | |
| end_time | i64 | 否 |
响应
示例

创建动态帖子 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| create_feed_post_params | models::CreateFeedPostParams | 是 | |
| broadcast_id | String | 否 | |
| is_live | bool | 否 | |
| do_spam_check | bool | 否 | |
| skip_dup_check | bool | 否 |
响应
示例

创建公开动态帖子 
参数
| 名称 | 类型 | 必需 | 说明 |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_feed_post_params | models::CreateFeedPostParams | Yes | |
| broadcast_id | String | No | |
| sso | String | No |
响应
示例

删除公开动态帖子 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| post_id | String | Yes | |
| broadcast_id | String | No | |
| sso | String | No |
响应
返回: DeleteFeedPostPublicResponse
示例

获取动态帖子 
req tenantId afterId
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| after_id | String | 否 | |
| limit | i32 | 否 | |
| tags | Vec | 否 |
响应
Returns: GetFeedPostsResponse
示例

获取公开动态帖子 
req tenantId afterId
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| after_id | String | No | |
| limit | i32 | No | |
| tags | Vec | No | |
| sso | String | No | |
| is_crawler | bool | No | |
| include_user_info | bool | No |
响应
示例

获取动态帖子统计 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| post_ids | Vec | Yes | |
| sso | String | No |
响应
示例

获取用户公开反应 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| post_ids | Vec | No | |
| sso | String | No |
响应
示例

对公开动态帖子做出反应 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| post_id | String | Yes | |
| react_body_params | models::ReactBodyParams | Yes | |
| is_undo | bool | No | |
| broadcast_id | String | No | |
| sso | String | No |
响应
Returns: ReactFeedPostResponse
示例

更新动态帖子 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| feed_post | models::FeedPost | 是 |
响应
示例

更新公开动态帖子 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| post_id | String | Yes | |
| update_feed_post_params | models::UpdateFeedPostParams | Yes | |
| broadcast_id | String | No | |
| sso | String | No |
响应
示例

标记公开评论 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 是 | |
| is_flagged | bool | 是 | |
| sso | String | 否 |
响应
示例

获取大动图 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| large_internal_url_sanitized | String | 是 |
响应
示例

搜索动图 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| search | String | 是 | |
| locale | String | 否 | |
| rating | String | 否 | |
| page | f64 | 否 |
响应
示例

获取热门动图 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| locale | String | 否 | |
| rating | String | 否 | |
| page | f64 | 否 |
响应
Returns: GetGifsTrendingResponse
示例

添加标签 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| create_hash_tag_body | models::CreateHashTagBody | 否 |
响应
示例

批量添加标签 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| bulk_create_hash_tags_body | models::BulkCreateHashTagsBody | 否 |
响应
返回: BulkCreateHashTagsResponse
示例

删除标签 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| tag | String | 是 | |
| delete_hash_tag_request_body | models::DeleteHashTagRequestBody | 否 |
响应
示例

获取标签 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| page | f64 | 否 |
响应
示例

修改标签 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| tag | String | Yes | |
| update_hash_tag_body | models::UpdateHashTagBody | No |
响应
示例

删除审核投票 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| vote_id | String | Yes | |
| broadcast_id | String | No | |
| sso | String | No |
响应
示例

获取因评论被封禁的用户 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 是 | |
| sso | String | 否 |
响应
返回: GetBannedUsersFromCommentResponse
示例

获取评论封禁状态 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| sso | String | No |
响应
返回:GetCommentBanStatusResponse
示例

获取评论子项 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| sso | String | No |
响应
返回:ModerationApiChildCommentsResponse
示例

获取计数 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| text_search | String | 否 | |
| by_ip_from_comment | String | 否 | |
| filter | String | 否 | |
| search_filters | String | 否 | |
| demo | bool | 否 | |
| sso | String | 否 |
响应
返回: ModerationApiCountCommentsResponse
示例

获取统计 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| sso | String | 否 |
响应
返回: GetBannedUsersCountResponse
示例

获取日志 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 是 | |
| sso | String | 否 |
响应
返回:ModerationApiGetLogsResponse
示例

获取手动徽章 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| sso | String | No |
响应
返回: GetTenantManualBadgesResponse
示例

获取用户的手动徽章 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| badges_user_id | String | No | |
| comment_id | String | No | |
| sso | String | No |
响应
返回: GetUserManualBadgesResponse
示例

获取审核评论 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 是 | |
| include_email | bool | 否 | |
| include_ip | bool | 否 | |
| sso | String | 否 |
响应
返回: ModerationApiCommentResponse
示例

获取审核评论文本 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| sso | String | No |
响应
示例

获取预封禁摘要 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| include_by_user_id_and_email | bool | No | |
| include_by_ip | bool | No | |
| include_by_email_domain | bool | No | |
| sso | String | No |
响应
返回: PreBanSummary
示例

获取搜索评论摘要 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| value | String | No | |
| filters | String | No | |
| search_filters | String | No | |
| sso | String | No |
响应
返回:ModerationCommentSearchResponse
示例

搜索页面 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| value | String | No | |
| sso | String | No |
响应
返回: ModerationPageSearchResponse
示例

搜索站点 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| value | String | No | |
| sso | String | No |
响应
Returns: ModerationSiteSearchResponse
示例

获取搜索建议 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| text_search | String | No | |
| sso | String | No |
响应
示例

搜索用户(审核) 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| value | String | 否 | |
| sso | String | 否 |
响应
返回:ModerationUserSearchResponse
示例

获取信任因子 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| user_id | String | 否 | |
| sso | String | 否 |
响应
返回: GetUserTrustFactorResponse
示例

获取用户封禁偏好 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| sso | String | No |
响应
返回:ApiModerateGetUserBanPreferencesResponse
示例

获取用户内部资料 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | No | |
| sso | String | No |
响应
返回:GetUserInternalProfileResponse
示例

提交调整评论投票 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| adjust_comment_votes_params | models::AdjustCommentVotesParams | Yes | |
| broadcast_id | String | No | |
| sso | String | No |
响应
示例

提交基于评论的用户封禁 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| ban_email | bool | No | |
| ban_email_domain | bool | No | |
| ban_ip | bool | No | |
| delete_all_users_comments | bool | No | |
| banned_until | String | No | |
| is_shadow_ban | bool | No | |
| update_id | String | No | |
| ban_reason | String | No | |
| sso | String | No |
响应
示例

提交撤销用户封禁 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| ban_user_undo_params | models::BanUserUndoParams | Yes | |
| sso | String | No |
响应
返回: ApiEmptyResponse
示例

提交批量预封禁摘要 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| bulk_pre_ban_params | models::BulkPreBanParams | Yes | |
| include_by_user_id_and_email | bool | No | |
| include_by_ip | bool | No | |
| include_by_email_domain | bool | No | |
| sso | String | No |
响应
示例

提交按 ID 获取评论 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comments_by_ids_params | models::CommentsByIdsParams | Yes | |
| sso | String | No |
响应
返回: ModerationApiChildCommentsResponse
示例

提交标记评论(审核) 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| broadcast_id | String | No | |
| sso | String | No |
响应
示例

提交移除评论 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| broadcast_id | String | No | |
| sso | String | No |
响应
返回: PostRemoveCommentApiResponse
示例

提交恢复已删除的评论 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 是 | |
| broadcast_id | String | 否 | |
| sso | String | 否 |
响应
示例

提交设置评论审批状态 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| approved | bool | No | |
| broadcast_id | String | No | |
| sso | String | No |
响应
返回: SetCommentApprovedResponse
示例

提交设置评论审核状态 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| reviewed | bool | No | |
| broadcast_id | String | No | |
| sso | String | No |
响应
返回: ApiEmptyResponse
示例

提交设置评论垃圾状态 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| spam | bool | No | |
| perm_not_spam | bool | No | |
| broadcast_id | String | No | |
| sso | String | No |
响应
返回: ApiEmptyResponse
示例

提交设置评论文本 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 是 | |
| set_comment_text_params | models::SetCommentTextParams | 是 | |
| broadcast_id | String | 否 | |
| sso | String | 否 |
响应
示例

提交取消标记评论 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| broadcast_id | String | No | |
| sso | String | No |
响应
示例

提交投票(审核) 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| direction | String | No | |
| broadcast_id | String | No | |
| sso | String | No |
响应
返回: VoteResponse
示例

授予徽章 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| badge_id | String | Yes | |
| user_id | String | No | |
| comment_id | String | No | |
| broadcast_id | String | No | |
| sso | String | No |
响应
示例

关闭话题 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | 是 | |
| url_id | String | 是 | |
| sso | String | 否 |
响应
返回: ApiEmptyResponse
示例

移除徽章 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| badge_id | String | 是 | |
| user_id | String | 否 | |
| comment_id | String | 否 | |
| broadcast_id | String | 否 | |
| sso | String | 否 |
响应
示例

重新打开话题 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes | |
| sso | String | No |
响应
返回: ApiEmptyResponse
示例

设置信任因子 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| user_id | String | 否 | |
| trust_factor | String | 否 | |
| sso | String | 否 |
响应
返回: SetUserTrustFactorResponse
示例

创建审核员 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_moderator_body | models::CreateModeratorBody | Yes |
响应
示例

删除审核员 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| send_email | String | No |
响应
返回: ApiEmptyResponse
示例

获取审核员 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
响应
示例

获取审核员列表 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| skip | f64 | 否 |
响应
示例

发送邀请 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| from_name | String | 是 |
响应
示例

更新审核员 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| update_moderator_body | models::UpdateModeratorBody | Yes |
响应
返回: ApiEmptyResponse
示例

删除通知计数 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
响应
示例

获取缓存的通知计数 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
响应
返回: GetCachedNotificationCountResponse
示例

获取通知计数 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| user_id | String | No | |
| url_id | String | No | |
| from_comment_id | String | No | |
| viewed | bool | No |
响应
返回: GetNotificationCountResponse
示例

获取通知列表 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| user_id | String | 否 | |
| url_id | String | 否 | |
| from_comment_id | String | 否 | |
| viewed | bool | 否 | |
| skip | f64 | 否 |
响应
示例

更新通知 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| update_notification_body | models::UpdateNotificationBody | 是 | |
| user_id | String | 否 |
响应
返回: ApiEmptyResponse
示例

创建 V1 页面反应 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes | |
| title | String | No |
响应
Returns: CreateV1PageReact
示例

创建 V2 页面反应 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes | |
| id | String | Yes | |
| title | String | No |
响应
返回: CreateV1PageReact
示例

删除 V1 页面反应 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes |
响应
Returns: CreateV1PageReact
示例

删除 V2 页面反应 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes | |
| id | String | Yes |
响应
Returns: CreateV1PageReact
示例

获取 V1 页面点赞 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes |
响应
返回: GetV1PageLikes
示例

获取 V2 页面反应用户 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| url_id | String | 是 | |
| id | String | 是 |
响应
返回:GetV2PageReactUsersResponse
示例

获取 V2 页面反应列表 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes |
响应
返回: GetV2PageReacts
示例

添加页面 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_api_page_data | models::CreateApiPageData | Yes |
响应
示例

删除页面 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
响应
示例

获取离线用户 
Past commenters on the page who are NOT currently online. Sorted by displayName.
使用页面上过去的评论者,且当前不在线。按 displayName 排序。
Use this after exhausting /users/online to render a "Members" section.
在用完 /users/online 后使用它来渲染“Members”部分。
Cursor pagination on commenterName: server walks the partial {tenantId, urlId, commenterName} index from afterName forward via $gt, no $skip cost.
在 commenterName 上进行游标分页:服务器从 afterName 向前遍历部分 {tenantId, urlId, commenterName} 索引,使用 $gt,没有 $skip 成本。
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes | |
| after_name | String | No | |
| after_user_id | String | No |
Response
Returns: PageUsersOfflineResponse
示例

获取在线用户 
当前在线的页面查看者:其 websocket 会话当前已订阅该页面的用户。返回 anonCount + totalCount(整个房间的订阅者,包括我们未枚举的匿名查看者)。
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes | |
| after_name | String | No | |
| after_user_id | String | No |
响应
示例

通过 URL ID 获取页面 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| url_id | String | 是 |
响应
示例

获取页面列表 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 |
响应
示例

获取公开页面 
List pages for a tenant. Used by the FChat desktop client to populate its room list.
Requires enableFChat to be true on the resolved custom config for each page.
Pages that require SSO are filtered against the requesting user's group access.
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| cursor | String | No | |
| limit | i32 | No | |
| q | String | No | |
| sort_by | models::PagesSortBy | No | |
| has_comments | bool | No |
响应
Returns: GetPublicPagesResponse
示例

获取用户信息 
租户的批量用户信息。根据 userIds,返回 User / SSOUser 的显示信息。评论部件使用此接口为通过存在事件刚出现的用户提供丰富信息。没有页面上下文:隐私统一强制执行(私人资料会被遮蔽)。
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| ids | String | Yes |
响应
示例

修改页面 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| update_api_page_data | models::UpdateApiPageData | 是 |
响应
示例

删除待处理的 Webhook 事件 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
响应
示例

获取待处理的 Webhook 事件计数 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | No | |
| external_id | String | No | |
| event_type | String | No | |
| domain | String | No | |
| attempt_count_gt | f64 | No |
响应
返回: GetPendingWebhookEventCountResponse
示例

获取待处理的 Webhook 事件 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | No | |
| external_id | String | No | |
| event_type | String | No | |
| domain | String | No | |
| attempt_count_gt | f64 | No | |
| skip | f64 | No |
响应
返回:GetPendingWebhookEventsResponse
示例

创建问题配置 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| create_question_config_body | models::CreateQuestionConfigBody | 是 |
响应
返回: CreateQuestionConfigResponse
示例

删除问题配置 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
响应
返回: ApiEmptyResponse
示例

获取问题配置 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
响应
示例

获取问题配置列表 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| skip | f64 | No |
响应
示例

更新问题配置 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| update_question_config_body | models::UpdateQuestionConfigBody | 是 |
响应
示例

创建问题结果 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| create_question_result_body | models::CreateQuestionResultBody | 是 |
响应
返回:CreateQuestionResultResponse
示例

删除问题结果 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
响应
示例

获取问题结果 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
响应
示例

获取问题结果列表 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | No | |
| user_id | String | No | |
| start_date | String | No | |
| question_id | String | No | |
| question_ids | String | No | |
| skip | f64 | No |
响应
示例

更新问题结果 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| update_question_result_body | models::UpdateQuestionResultBody | Yes |
响应
Returns: ApiEmptyResponse
示例

聚合问题结果 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| question_id | String | 否 | |
| question_ids | Vec | 否 | |
| url_id | String | 否 | |
| time_bucket | models::AggregateTimeBucket | 否 | |
| start_date | chrono::DateTimechrono::FixedOffset | 否 | |
| force_recalculate | bool | 否 |
响应
返回: AggregateQuestionResultsResponse
示例

批量聚合问题结果 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| bulk_aggregate_question_results_request | models::BulkAggregateQuestionResultsRequest | Yes | |
| force_recalculate | bool | No |
响应
返回: BulkAggregateQuestionResultsResponse
示例

将评论与问题结果合并 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| question_id | String | 否 | |
| question_ids | Vec | 否 | |
| url_id | String | 否 | |
| start_date | chrono::DateTimechrono::FixedOffset | 否 | |
| force_recalculate | bool | 否 | |
| min_value | f64 | 否 | |
| max_value | f64 | 否 | |
| limit | f64 | 否 |
响应
返回:CombineQuestionResultsWithCommentsResponse
示例

添加单点登录用户 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_apisso_user_data | models::CreateApissoUserData | Yes |
响应
示例

删除单点登录用户 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| delete_comments | bool | No | |
| comment_delete_mode | String | No |
响应
示例

通过电子邮件获取 SSO 用户 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| String | Yes |
响应
返回:GetSsoUserByEmailApiResponse
示例

通过 ID 获取 SSO 用户 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
响应
示例

获取 SSO 用户列表 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| skip | i32 | No |
响应
示例

修改 SSO 用户 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| update_apisso_user_data | models::UpdateApissoUserData | Yes | |
| update_comments | bool | No |
响应
示例

替换 SSO 用户 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| update_apisso_user_data | models::UpdateApissoUserData | 是 | |
| update_comments | bool | 否 |
响应
示例

创建订阅 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| create_api_user_subscription_data | models::CreateApiUserSubscriptionData | 是 |
响应
返回:CreateSubscriptionApiResponse
示例

删除订阅 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| user_id | String | No |
响应
返回: DeleteSubscriptionApiResponse
示例

获取订阅列表 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| user_id | String | 否 |
响应
返回: GetSubscriptionsApiResponse
示例

更新订阅 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| update_api_user_subscription_data | models::UpdateApiUserSubscriptionData | Yes | |
| user_id | String | No |
响应
返回:UpdateSubscriptionApiResponse
示例

获取租户每日使用量 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| year_number | f64 | 否 | |
| month_number | f64 | 否 | |
| day_number | f64 | 否 | |
| skip | f64 | 否 |
响应
返回: GetTenantDailyUsagesResponse
示例

创建租户套餐 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| create_tenant_package_body | models::CreateTenantPackageBody | 是 |
响应
返回:CreateTenantPackageResponse
示例

删除租户套餐 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
响应
返回: ApiEmptyResponse
示例

获取租户套餐 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
响应
示例

获取租户套餐列表 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| skip | f64 | 否 |
响应
示例

替换租户套餐 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| replace_tenant_package_body | models::ReplaceTenantPackageBody | 是 |
响应
返回: ApiEmptyResponse
示例

更新租户套餐 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| update_tenant_package_body | models::UpdateTenantPackageBody | Yes |
响应
返回: ApiEmptyResponse
示例

创建租户用户 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_tenant_user_body | models::CreateTenantUserBody | Yes |
响应
示例

删除租户用户 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| delete_comments | String | No | |
| comment_delete_mode | String | No |
响应
返回: ApiEmptyResponse
示例

获取租户用户 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
响应
示例

获取租户用户列表 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| skip | f64 | No |
响应
示例

替换租户用户 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| replace_tenant_user_body | models::ReplaceTenantUserBody | 是 | |
| update_comments | String | 否 |
响应
示例

发送登录链接 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| redirect_url | String | No |
响应
返回: ApiEmptyResponse
示例

更新租户用户 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| update_tenant_user_body | models::UpdateTenantUserBody | 是 | |
| update_comments | String | 否 |
响应
返回: ApiEmptyResponse
示例

创建租户 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_tenant_body | models::CreateTenantBody | Yes |
响应
示例

删除租户 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| sure | String | No |
响应
返回: ApiEmptyResponse
示例

获取租户 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
响应
示例

获取租户列表 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| meta | String | 否 | |
| skip | f64 | 否 |
响应
示例

更新租户 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| update_tenant_body | models::UpdateTenantBody | 是 |
响应
示例

更改工单状态 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| user_id | String | Yes | |
| id | String | Yes | |
| change_ticket_state_body | models::ChangeTicketStateBody | Yes |
响应
示例

创建工单 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| user_id | String | 是 | |
| create_ticket_body | models::CreateTicketBody | 是 |
响应
示例

获取工单 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| user_id | String | 否 |
响应
示例

获取工单列表 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| user_id | String | No | |
| state | f64 | No | |
| skip | f64 | No | |
| limit | f64 | No |
响应
示例

获取翻译 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| namespace | String | 是 | |
| component | String | 是 | |
| locale | String | 否 | |
| use_full_translation_ids | bool | 否 |
响应
示例

上传图片 
上传并调整图像大小
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| file | std::path::PathBuf | Yes | |
| size_preset | models::SizePreset | No | |
| url_id | String | No |
响应
示例

通过 ID 获取用户徽章进度 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
响应
返回: ApiGetUserBadgeProgressResponse
示例

通过用户 ID 获取用户徽章进度 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| user_id | String | Yes |
响应
返回:ApiGetUserBadgeProgressResponse
示例

获取用户徽章进度列表 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| user_id | String | 否 | |
| limit | f64 | 否 | |
| skip | f64 | 否 |
响应
返回: ApiGetUserBadgeProgressListResponse
示例

创建用户徽章 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_user_badge_params | models::CreateUserBadgeParams | Yes |
响应
返回: ApiCreateUserBadgeResponse
示例

删除用户徽章 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
响应
示例

获取用户徽章 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
响应
示例

获取用户徽章列表 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| user_id | String | 否 | |
| badge_id | String | 否 | |
| displayed_on_comments | bool | 否 | |
| limit | f64 | 否 | |
| skip | f64 | 否 |
响应
示例

更新用户徽章 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| update_user_badge_params | models::UpdateUserBadgeParams | Yes |
响应
示例

获取用户通知计数 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| sso | String | 否 |
响应
返回:GetUserNotificationCountResponse
示例

获取用户通知 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| url_id | String | 否 | |
| page_size | i32 | 否 | |
| after_id | String | 否 | |
| include_context | bool | 否 | |
| after_created_at | i64 | 否 | |
| unread_only | bool | 否 | |
| dm_only | bool | 否 | |
| no_dm | bool | 否 | |
| include_translations | bool | 否 | |
| include_tenant_notifications | bool | 否 | |
| sso | String | 否 |
响应
示例

重置用户通知计数 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| sso | String | 否 |
响应
返回:ResetUserNotificationsResponse
示例

重置用户通知 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| after_id | String | 否 | |
| after_created_at | i64 | 否 | |
| unread_only | bool | 否 | |
| dm_only | bool | 否 | |
| no_dm | bool | 否 | |
| s3 | String | 否 |
响应
返回:ResetUserNotificationsResponse
示例

更新用户评论订阅状态 
为特定评论启用或禁用通知。
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| notification_id | String | Yes | |
| opted_in_or_out | String | Yes | |
| comment_id | String | Yes | |
| sso | String | No |
响应
返回: UpdateUserNotificationCommentSubscriptionStatusResponse
示例

更新用户页面订阅状态 
Enable or disable notifications for a page. When users are subscribed to a page, notifications are created for new root comments, and also
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| url_id | String | 是 | |
| url | String | 是 | |
| page_title | String | 是 | |
| subscribed_or_unsubscribed | String | 是 | |
| sso | String | 否 |
响应
返回: UpdateUserNotificationPageSubscriptionStatusResponse
示例

更新用户通知状态 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| notification_id | String | 是 | |
| new_status | String | 是 | |
| sso | String | 否 |
响应
返回: UpdateUserNotificationStatusResponse
示例

获取用户在线状态 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id_ws | String | Yes | |
| user_ids | String | Yes |
响应
返回:GetUserPresenceStatusesResponse
示例

搜索用户 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes | |
| username_starts_with | String | No | |
| mention_group_ids | Vec | No | |
| sso | String | No | |
| search_section | String | No |
响应
示例

获取用户 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
响应
返回: GetUserResponse
示例

创建投票 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| direction | String | Yes | |
| user_id | String | No | |
| anon_user_id | String | No |
响应
返回:VoteResponse
示例

删除投票 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| edit_key | String | No |
响应
示例

获取投票 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes |
响应
返回: GetVotesResponse
示例

获取用户的投票 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes | |
| user_id | String | No | |
| anon_user_id | String | No |
响应
示例

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