
语言 🇨🇳 简体中文
文档
入门
聚合
API
审计日志
评论阻止
检查被阻止的评论
评论
用户评论
域配置
电子邮件模板
事件日志
动态帖子
标记评论
动图
标签
审核
版主
通知计数
通知
页面互动
页面
待处理Webhook事件
问题配置
问题结果
问题结果聚合
单点登录用户
订阅
租户每日使用
租户套餐
租户用户
租户
工单
翻译
上传图片
用户徽章进度
用户徽章
用户通知
用户在线状态
用户搜索
用户
投票
FastComments Rust SDK
这是 FastComments 的官方 Rust SDK。
FastComments API 的官方 Rust SDK
仓库
AI 编码代理 
给你的编码代理提供 FastComments 所需的上下文——小部件、配置、Secure SSO、REST API 和 SDK:
npx skills add fastcomments/skills
兼容 Claude Code、Codex、Cursor、Copilot、Gemini,以及所有其他由 skills CLI 支持的代理。
Library Contents 
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 - 共享的类型定义和工具
- 评论模型和元数据结构
- 用户和租户配置
- 常用操作的辅助函数
Quick Start 
使用公共 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);
// 将此令牌传递给前端用于认证
}
Common Issues 
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() {
// 在此处放置您的异步代码
}
Notes 
广播 ID
你会看到在某些 API 调用中需要传入 broadcastId。当你接收到事件时,会返回这个 ID,因此如果你计划在客户端乐观地应用更改,就可以据此忽略该事件
(你很可能会想这样做,因为它能提供最佳体验)。在此处传入 UUID。该 ID 应足够唯一,以免在同一浏览器会话中出现两次。
聚合 
聚合文档,通过分组(如果提供 groupBy)并应用多个操作。支持不同的操作(例如 sum、countDistinct、avg 等)。
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| aggregation_request | models::AggregationRequest | 是 | |
| parent_tenant_id | String | 否 | |
| include_stats | bool | 否 |
响应
示例

get_api_comments 
参数
| 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
示例

get_api_export_status 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| batch_job_id | String | No | |
| sso | String | No |
响应
返回:ModerationExportStatusResponse
示例

get_api_ids 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| 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
示例

post_api_export 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| 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 |
响应
示例

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

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

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

checked_comments_for_blocked 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_ids | String | Yes | |
| sso | String | No |
响应
返回:CheckBlockedCommentsResponse
示例

block_user_from_comment 
参数
| 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
示例

create_comment_public 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| 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
示例

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

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

delete_comment_vote 
参数
| 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 |
响应
示例

flag_comment 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| user_id | String | No | |
| anon_user_id | String | No |
响应
示例

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

get_comment_text 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 是 | |
| edit_key | String | 否 | |
| sso | String | 否 |
响应
返回:PublicApiGetCommentTextResponse
示例

get_comment_vote_user_names 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 是 | |
| dir | i32 | 是 | |
| sso | String | 否 |
响应
返回:GetCommentVoteUserNamesSuccessResponse
示例

get_comments 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| 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 | 否 |
响应
示例

get_comments_public 
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
示例

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

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

save_comment 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| 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 |
响应
示例

save_comments_bulk 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| 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>
示例

set_comment_text 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| 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
示例

un_block_user_from_comment 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| 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
示例

un_flag_comment 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| user_id | String | No | |
| anon_user_id | String | No |
响应
示例

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

un_pin_comment 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 是 | |
| broadcast_id | String | 是 | |
| sso | String | 否 |
响应
返回:ChangeCommentPinStatusResponse
示例

update_comment 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| 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 |
响应
示例

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

get_comments_for_user 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| 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 |
响应
示例

add_domain_config 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| add_domain_config_params | models::AddDomainConfigParams | 是 |
响应
示例

delete_domain_config 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| domain | String | 是 |
响应
示例

get_domain_config 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| domain | String | 是 |
响应
示例

get_domain_configs 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 |
响应
示例

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

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

create_email_template 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | 是 | |
| create_email_template_body | models::CreateEmailTemplateBody | 是 |
响应
返回: CreateEmailTemplateResponse
示例

delete_email_template 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
响应
返回: ApiEmptyResponse
示例

delete_email_template_render_error 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| error_id | String | Yes |
响应
示例

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

get_email_template_definitions 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 |
响应
返回:GetEmailTemplateDefinitionsResponse
示例

get_email_template_render_errors 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| skip | f64 | 否 |
响应
返回: GetEmailTemplateRenderErrorsResponse
示例

get_email_templates 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| skip | f64 | No |
响应
示例

render_email_template 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| render_email_template_body | models::RenderEmailTemplateBody | Yes | |
| locale | String | No |
响应
Returns: RenderEmailTemplateResponse
示例

update_email_template 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| update_email_template_body | models::UpdateEmailTemplateBody | 是 |
响应
返回: ApiEmptyResponse
示例

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

get_global_event_log 
req tenantId urlId userIdWS
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| url_id | String | 是 | |
| user_id_ws | String | 是 | |
| start_time | i64 | 是 | |
| end_time | i64 | 否 |
响应
示例

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

create_feed_post_public 
参数
| 名称 | 类型 | 必需 | 说明 |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_feed_post_params | models::CreateFeedPostParams | Yes | |
| broadcast_id | String | No | |
| sso | String | No |
响应
示例

delete_feed_post_public 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| post_id | String | Yes | |
| broadcast_id | String | No | |
| sso | String | No |
响应
返回: DeleteFeedPostPublicResponse
示例

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

get_feed_posts_public 
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 |
响应
示例

get_feed_posts_stats 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| post_ids | Vec | Yes | |
| sso | String | No |
响应
示例

get_user_reacts_public 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| post_ids | Vec | No | |
| sso | String | No |
响应
示例

react_feed_post_public 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| 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
示例

update_feed_post 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| feed_post | models::FeedPost | 是 |
响应
示例

update_feed_post_public 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| post_id | String | Yes | |
| update_feed_post_params | models::UpdateFeedPostParams | Yes | |
| broadcast_id | String | No | |
| sso | String | No |
响应
示例

flag_comment_public 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 是 | |
| is_flagged | bool | 是 | |
| sso | String | 否 |
响应
示例

get_gif_large 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| large_internal_url_sanitized | String | 是 |
响应
示例

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

get_gifs_trending 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| locale | String | 否 | |
| rating | String | 否 | |
| page | f64 | 否 |
响应
Returns: GetGifsTrendingResponse
示例

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

add_hash_tags_bulk 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| bulk_create_hash_tags_body | models::BulkCreateHashTagsBody | 否 |
响应
返回: BulkCreateHashTagsResponse
示例

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

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

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

delete_moderation_vote 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| vote_id | String | Yes | |
| broadcast_id | String | No | |
| sso | String | No |
响应
示例

get_ban_users_from_comment 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 是 | |
| sso | String | 否 |
响应
返回: GetBannedUsersFromCommentResponse
示例

get_comment_ban_status 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| sso | String | No |
响应
返回:GetCommentBanStatusResponse
示例

get_comment_children 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| sso | String | No |
响应
返回:ModerationApiChildCommentsResponse
示例

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

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

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

get_manual_badges 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| sso | String | No |
响应
返回: GetTenantManualBadgesResponse
示例

get_manual_badges_for_user 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| badges_user_id | String | No | |
| comment_id | String | No | |
| sso | String | No |
响应
返回: GetUserManualBadgesResponse
示例

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

get_moderation_comment_text 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| sso | String | No |
响应
示例

get_pre_ban_summary 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| 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
示例

get_search_comments_summary 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| value | String | No | |
| filters | String | No | |
| search_filters | String | No | |
| sso | String | No |
响应
返回:ModerationCommentSearchResponse
示例

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

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

get_search_suggest 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| text_search | String | No | |
| sso | String | No |
响应
示例

get_search_users 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| value | String | 否 | |
| sso | String | 否 |
响应
返回:ModerationUserSearchResponse
示例

get_trust_factor 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| user_id | String | 否 | |
| sso | String | 否 |
响应
返回: GetUserTrustFactorResponse
示例

get_user_ban_preference 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| sso | String | No |
响应
返回:ApiModerateGetUserBanPreferencesResponse
示例

get_user_internal_profile 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | No | |
| sso | String | No |
响应
返回:GetUserInternalProfileResponse
示例

post_adjust_comment_votes 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| adjust_comment_votes_params | models::AdjustCommentVotesParams | Yes | |
| broadcast_id | String | No | |
| sso | String | No |
响应
示例

post_ban_user_from_comment 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| 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 |
响应
示例

post_ban_user_undo 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| ban_user_undo_params | models::BanUserUndoParams | Yes | |
| sso | String | No |
响应
返回: ApiEmptyResponse
示例

post_bulk_pre_ban_summary 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| 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 |
响应
示例

post_comments_by_ids 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comments_by_ids_params | models::CommentsByIdsParams | Yes | |
| sso | String | No |
响应
返回: ModerationApiChildCommentsResponse
示例

post_flag_comment 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| broadcast_id | String | No | |
| sso | String | No |
响应
示例

post_remove_comment 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| broadcast_id | String | No | |
| sso | String | No |
响应
返回: PostRemoveCommentApiResponse
示例

post_restore_deleted_comment 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 是 | |
| broadcast_id | String | 否 | |
| sso | String | 否 |
响应
示例

post_set_comment_approval_status 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| approved | bool | No | |
| broadcast_id | String | No | |
| sso | String | No |
响应
返回: SetCommentApprovedResponse
示例

post_set_comment_review_status 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| reviewed | bool | No | |
| broadcast_id | String | No | |
| sso | String | No |
响应
返回: ApiEmptyResponse
示例

post_set_comment_spam_status 
参数
| 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
示例

post_set_comment_text 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 是 | |
| set_comment_text_params | models::SetCommentTextParams | 是 | |
| broadcast_id | String | 否 | |
| sso | String | 否 |
响应
示例

post_un_flag_comment 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| broadcast_id | String | No | |
| sso | String | No |
响应
示例

post_vote 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| comment_id | String | Yes | |
| direction | String | No | |
| broadcast_id | String | No | |
| sso | String | No |
响应
返回: VoteResponse
示例

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

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

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

put_reopen_thread 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes | |
| sso | String | No |
响应
返回: ApiEmptyResponse
示例

set_trust_factor 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| user_id | String | 否 | |
| trust_factor | String | 否 | |
| sso | String | 否 |
响应
返回: SetUserTrustFactorResponse
示例

create_moderator 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_moderator_body | models::CreateModeratorBody | Yes |
响应
示例

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

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

get_moderators 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| skip | f64 | 否 |
响应
示例

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

update_moderator 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| update_moderator_body | models::UpdateModeratorBody | Yes |
响应
返回: ApiEmptyResponse
示例

delete_notification_count 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
响应
示例

get_cached_notification_count 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
响应
返回: GetCachedNotificationCountResponse
示例

get_notification_count 
参数
| 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
示例

get_notifications 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| user_id | String | 否 | |
| url_id | String | 否 | |
| from_comment_id | String | 否 | |
| viewed | bool | 否 | |
| skip | f64 | 否 |
响应
示例

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

create_v1_page_react 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes | |
| title | String | No |
响应
Returns: CreateV1PageReact
示例

create_v2_page_react 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes | |
| id | String | Yes | |
| title | String | No |
响应
返回: CreateV1PageReact
示例

delete_v1_page_react 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes |
响应
Returns: CreateV1PageReact
示例

delete_v2_page_react 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes | |
| id | String | Yes |
响应
Returns: CreateV1PageReact
示例

get_v1_page_likes 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes |
响应
返回: GetV1PageLikes
示例

get_v2_page_react_users 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| url_id | String | 是 | |
| id | String | 是 |
响应
返回:GetV2PageReactUsersResponse
示例

get_v2_page_reacts 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes |
响应
返回: GetV2PageReacts
示例

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

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

get_offline_users 
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
示例

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

get_page_by_urlid 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| url_id | String | 是 |
响应
示例

get_pages 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 |
响应
示例

get_pages_public 
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
示例

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

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

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

get_pending_webhook_event_count 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| 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
示例

get_pending_webhook_events 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| 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
示例

create_question_config 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| create_question_config_body | models::CreateQuestionConfigBody | 是 |
响应
返回: CreateQuestionConfigResponse
示例

delete_question_config 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
响应
返回: ApiEmptyResponse
示例

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

get_question_configs 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| skip | f64 | No |
响应
示例

update_question_config 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| update_question_config_body | models::UpdateQuestionConfigBody | 是 |
响应
示例

create_question_result 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| create_question_result_body | models::CreateQuestionResultBody | 是 |
响应
返回:CreateQuestionResultResponse
示例

delete_question_result 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
响应
示例

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

get_question_results 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| 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 |
响应
示例

update_question_result 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| update_question_result_body | models::UpdateQuestionResultBody | Yes |
响应
Returns: ApiEmptyResponse
示例

aggregate_question_results 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| 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
示例

bulk_aggregate_question_results 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| bulk_aggregate_question_results_request | models::BulkAggregateQuestionResultsRequest | Yes | |
| force_recalculate | bool | No |
响应
返回: BulkAggregateQuestionResultsResponse
示例

combine_comments_with_question_results 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| 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
示例

add_sso_user 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_apisso_user_data | models::CreateApissoUserData | Yes |
响应
示例

delete_sso_user 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| delete_comments | bool | No | |
| comment_delete_mode | String | No |
响应
示例

get_sso_user_by_email 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| String | Yes |
响应
返回:GetSsoUserByEmailApiResponse
示例

get_sso_user_by_id 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
响应
示例

get_sso_users 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| skip | i32 | No |
响应
示例

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

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

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

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

get_subscriptions 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| user_id | String | 否 |
响应
返回: GetSubscriptionsApiResponse
示例

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

get_tenant_daily_usages 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| year_number | f64 | 否 | |
| month_number | f64 | 否 | |
| day_number | f64 | 否 | |
| skip | f64 | 否 |
响应
返回: GetTenantDailyUsagesResponse
示例

create_tenant_package 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| create_tenant_package_body | models::CreateTenantPackageBody | 是 |
响应
返回:CreateTenantPackageResponse
示例

delete_tenant_package 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
响应
返回: ApiEmptyResponse
示例

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

get_tenant_packages 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| skip | f64 | 否 |
响应
示例

replace_tenant_package 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| replace_tenant_package_body | models::ReplaceTenantPackageBody | 是 |
响应
返回: ApiEmptyResponse
示例

update_tenant_package 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| update_tenant_package_body | models::UpdateTenantPackageBody | Yes |
响应
返回: ApiEmptyResponse
示例

create_tenant_user 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_tenant_user_body | models::CreateTenantUserBody | Yes |
响应
示例

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

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

get_tenant_users 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| skip | f64 | No |
响应
示例

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

send_login_link 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| redirect_url | String | No |
响应
返回: ApiEmptyResponse
示例

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

create_tenant 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_tenant_body | models::CreateTenantBody | Yes |
响应
示例

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

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

get_tenants 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| meta | String | 否 | |
| skip | f64 | 否 |
响应
示例

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

change_ticket_state 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| user_id | String | Yes | |
| id | String | Yes | |
| change_ticket_state_body | models::ChangeTicketStateBody | Yes |
响应
示例

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

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

get_tickets 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| user_id | String | No | |
| state | f64 | No | |
| skip | f64 | No | |
| limit | f64 | No |
响应
示例

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

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

get_user_badge_progress_by_id 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
响应
返回: ApiGetUserBadgeProgressResponse
示例

get_user_badge_progress_by_user_id 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| user_id | String | Yes |
响应
返回:ApiGetUserBadgeProgressResponse
示例

get_user_badge_progress_list 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| user_id | String | 否 | |
| limit | f64 | 否 | |
| skip | f64 | 否 |
响应
返回: ApiGetUserBadgeProgressListResponse
示例

create_user_badge 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| create_user_badge_params | models::CreateUserBadgeParams | Yes |
响应
返回: ApiCreateUserBadgeResponse
示例

delete_user_badge 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
响应
示例

get_user_badge 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
响应
示例

get_user_badges 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| user_id | String | 否 | |
| badge_id | String | 否 | |
| displayed_on_comments | bool | 否 | |
| limit | f64 | 否 | |
| skip | f64 | 否 |
响应
示例

update_user_badge 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| update_user_badge_params | models::UpdateUserBadgeParams | Yes |
响应
示例

get_user_notification_count 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| sso | String | 否 |
响应
返回:GetUserNotificationCountResponse
示例

get_user_notifications 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| 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 | 否 |
响应
示例

reset_user_notification_count 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| sso | String | 否 |
响应
返回:ResetUserNotificationsResponse
示例

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

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

update_user_notification_page_subscription_status 
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
示例

update_user_notification_status 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| notification_id | String | 是 | |
| new_status | String | 是 | |
| sso | String | 否 |
响应
返回: UpdateUserNotificationStatusResponse
示例

get_user_presence_statuses 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id_ws | String | Yes | |
| user_ids | String | Yes |
响应
返回:GetUserPresenceStatusesResponse
示例

search_users 
参数
| 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|
| 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 |
响应
示例

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

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

delete_vote 
参数
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| edit_key | String | No |
响应
示例

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

get_votes_for_user 
参数
| 名称 | 类型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | Yes | |
| url_id | String | Yes | |
| user_id | String | No | |
| anon_user_id | String | No |
响应
示例

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