
語言 🇹🇼 繁體中文
快速上手
文件
彙總
稽核記錄
從評論封鎖
檢查封鎖的評論
評論
網域設定
電子郵件範本
事件日誌
動態貼文
檢舉評論
標籤
管理員
通知計數
通知
頁面
待處理 Webhook 事件
問題設定
問題結果
問題結果彙總
SSO 使用者
訂閱
租戶每日使用量
租戶方案
租戶使用者
租戶
上傳圖片
使用者徽章進度
使用者徽章
使用者通知
使用者在席狀態
使用者搜尋
使用者
投票
FastComments Rust SDK
這是 FastComments 的官方 Rust SDK。
FastComments API 的官方 Rust SDK
儲存庫
函式庫內容 
FastComments Rust SDK 由數個模組組成:
Client Module - 自動生成的 FastComments REST API 用戶端
- 針對所有 API 模型的完整型別定義
- 同時包含已驗證的 (
DefaultApi) 與公開的 (PublicApi) 端點 - 使用 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),
}
}
使用 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 Unauthorized Errors
如果在使用需要認證的 API 時收到 401 錯誤:
- 檢查您的 API 金鑰:確保您正在使用來自 FastComments 儀表板的正確 API 金鑰
- 驗證租戶 ID:確保租戶 ID 與您的帳戶相符
- API 金鑰格式:API 金鑰應該在 Configuration 中傳遞:
let mut config = Configuration::new();
config.api_key = Some(ApiKey {
prefix: None,
key: "YOUR_API_KEY".to_string(),
});
SSO Token Issues
如果 SSO 令牌無法運作:
- 於生產環境使用安全模式:在生產環境中始終使用
FastCommentsSSO::new_secure()並搭配您的 API 金鑰 - 僅限伺服端:在您的伺服器上產生 SSO 令牌,切勿將 API 金鑰洩露給客戶端
- 檢查使用者資料:確保所有必要欄位(id, email, username)都已提供
Async Runtime Errors
SDK 使用 tokio 執行非同步操作。請確保:
Add tokio to your dependencies:
[dependencies] tokio = { version = "1", features = ["full"] }Use the tokio runtime:
#[tokio::main] async fn main() { // Your async code here }
注意事項 
廣播 ID
你會看到在某些 API 呼叫中應該傳遞 broadcastId。當你接收到事件時,會回傳這個 ID,因此如果你打算在用戶端以樂觀方式套用變更,就知道要忽略該事件
(你大概會想這麼做,因為這能提供最佳體驗)。請在此傳入一個 UUID。該 ID 應足夠唯一,以免在同一瀏覽器會話中出現兩次。
彙總 
透過分組(若提供 groupBy)並套用多個運算來彙總文件。支援不同的運算(例如 sum、countDistinct、avg 等)。
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| aggregation_request | models::AggregationRequest | 是 | |
| parent_tenant_id | String | 否 | |
| include_stats | bool | 否 |
回應
取得稽核記錄 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| limit | f64 | 否 | |
| skip | f64 | 否 | |
| order | models::SortDir | 否 | |
| after | f64 | 否 | |
| before | f64 | 否 |
回應
從公開評論封鎖 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 是 | |
| public_block_from_comment_params | models::PublicBlockFromCommentParams | 是 | |
| sso | String | 否 |
回應
回傳: BlockFromCommentPublic200Response
解除公開評論封鎖 
參數
| 名稱 | 型別 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 是 | |
| public_block_from_comment_params | models::PublicBlockFromCommentParams | 是 | |
| sso | String | 否 |
回應
回傳: UnBlockCommentPublic200Response
檢查被封鎖的評論 
參數
| 名稱 | 型別 | 是否必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_ids | String | 是 | |
| sso | String | 否 |
回應
回傳:CheckedCommentsForBlocked200Response
封鎖評論中的使用者 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| block_from_comment_params | models::BlockFromCommentParams | 是 | |
| user_id | String | 否 | |
| anon_user_id | String | 否 |
回應
回傳:BlockFromCommentPublic200Response
建立公開評論 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| url_id | String | 是 | |
| broadcast_id | String | 是 | |
| comment_data | models::CommentData | 是 | |
| session_id | String | 否 | |
| sso | String | 否 |
回應
回傳: CreateCommentPublic200Response
刪除公開評論 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 是 | |
| broadcast_id | String | 是 | |
| edit_key | String | 否 | |
| sso | String | 否 |
回應
回傳: DeleteCommentPublic200Response
刪除評論投票 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 是 | |
| vote_id | String | 是 | |
| url_id | String | 是 | |
| broadcast_id | String | 是 | |
| edit_key | String | 否 | |
| sso | String | 否 |
回應
回傳: DeleteCommentVote200Response
取得評論投票使用者名稱 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 是 | |
| dir | i32 | 是 | |
| sso | String | 否 |
回應
回傳:GetCommentVoteUserNames200Response
取得評論列表 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| 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 | 否 |
回應
取得公開評論 
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 | 否 |
回應
儲存評論 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| create_comment_params | models::CreateCommentParams | 是 | |
| is_live | bool | 否 | |
| do_spam_check | bool | 否 | |
| send_emails | bool | 否 | |
| populate_notifications | bool | 否 |
回應
批次儲存評論 
參數
| 名稱 | 類型 | 必需 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| create_comment_params | Vecmodels::CreateCommentParams | 是 | |
| is_live | bool | 否 | |
| do_spam_check | bool | 否 | |
| send_emails | bool | 否 | |
| populate_notifications | bool | 否 |
回傳
回傳: Vec<models::SaveComment200Response>
設定評論內容 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 是 | |
| broadcast_id | String | 是 | |
| comment_text_update_request | models::CommentTextUpdateRequest | 是 | |
| edit_key | String | 否 | |
| sso | String | 否 |
回應
解除評論中使用者封鎖 
參數
| Name | Type | 必要 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| un_block_from_comment_params | models::UnBlockFromCommentParams | 是 | |
| user_id | String | 否 | |
| anon_user_id | String | 否 |
回應
回傳: UnBlockCommentPublic200Response
更新評論 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| body | models::PickApiCommentPeriodUpdatableCommentFields | 是 | |
| context_user_id | String | 否 | |
| do_spam_check | bool | 否 | |
| is_live | bool | 否 |
回應
回傳:FlagCommentPublic200Response
對評論投票 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 是 | |
| url_id | String | 是 | |
| broadcast_id | String | 是 | |
| vote_body_params | models::VoteBodyParams | 是 | |
| session_id | String | 否 | |
| sso | String | 否 |
回應
新增網域設定 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| add_domain_config_params | models::AddDomainConfigParams | 是 |
回應
部分更新網域設定 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| domain_to_update | String | 是 | |
| patch_domain_config_params | models::PatchDomainConfigParams | 是 |
回應
取代網域設定 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | 是 | |
| domain_to_update | String | 是 | |
| update_domain_config_params | models::UpdateDomainConfigParams | 是 |
回應
回傳: GetDomainConfig200Response
建立電子郵件範本 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| create_email_template_body | models::CreateEmailTemplateBody | 是 |
回應
回傳: CreateEmailTemplate200Response
範例

刪除電子郵件範本 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
回應
回傳: FlagCommentPublic200Response
範例

刪除電子郵件範本渲染錯誤 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| error_id | String | Yes |
回應
回傳: FlagCommentPublic200Response
範例

取得電子郵件範本 
參數
| 名稱 | 類型 | 是否必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
回應
回傳: GetEmailTemplate200Response
範例

取得電子郵件範本定義 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 |
回應
回傳: GetEmailTemplateDefinitions200Response
範例

取得電子郵件範本渲染錯誤 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| skip | f64 | 否 |
回應
回傳: GetEmailTemplateRenderErrors200Response
範例

取得電子郵件範本列表 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| skip | f64 | 否 |
回應
回傳: GetEmailTemplates200Response
範例

渲染電子郵件範本 
參數
| Name | Type | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| render_email_template_body | models::RenderEmailTemplateBody | 是 | |
| locale | String | 否 |
回應
回傳:RenderEmailTemplate200Response
範例

更新電子郵件範本 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| update_email_template_body | models::UpdateEmailTemplateBody | 是 |
回應
回傳: FlagCommentPublic200Response
範例

取得事件日誌 
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 | 是 | |
| create_feed_post_params | models::CreateFeedPostParams | 是 | |
| broadcast_id | String | 否 | |
| sso | String | 否 |
回應
取得動態貼文 
req tenantId afterId
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| after_id | String | 否 | |
| limit | i32 | 否 | |
| tags | Vec |
否 |
回應
取得公開動態貼文 
req tenantId afterId
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| after_id | String | 否 | |
| limit | i32 | 否 | |
| tags | Vec |
否 | |
| sso | String | 否 | |
| is_crawler | bool | 否 | |
| include_user_info | bool | 否 |
回應
對公開動態貼文回應 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| post_id | String | 是 | |
| react_body_params | models::ReactBodyParams | 是 | |
| is_undo | bool | 否 | |
| broadcast_id | String | 否 | |
| sso | String | 否 |
回應
更新動態貼文 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| feed_post | models::FeedPost | 是 |
回應
回傳:FlagCommentPublic200Response
更新公開動態貼文 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| post_id | String | 是 | |
| update_feed_post_params | models::UpdateFeedPostParams | 是 | |
| broadcast_id | String | 否 | |
| sso | String | 否 |
回應
回傳: CreateFeedPostPublic200Response
公開檢舉評論 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 是 | |
| is_flagged | bool | 是 | |
| sso | String | 否 |
回應
回傳: FlagCommentPublic200Response
新增標籤 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | 否 | |
| create_hash_tag_body | models::CreateHashTagBody | 否 |
回應
範例

批次新增標籤 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 否 | |
| bulk_create_hash_tags_body | models::BulkCreateHashTagsBody | 否 |
回應
回傳: AddHashTagsBulk200Response
範例

刪除標籤 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tag | String | 是 | |
| tenant_id | String | 否 | |
| delete_hash_tag_request | models::DeleteHashTagRequest | 否 |
回應
回傳:FlagCommentPublic200Response
範例

取得標籤 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| page | f64 | 否 |
回應
範例

部分更新標籤 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tag | String | 是 | |
| tenant_id | String | 否 | |
| update_hash_tag_body | models::UpdateHashTagBody | 否 |
回應
範例

建立管理員 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| create_moderator_body | models::CreateModeratorBody | 是 |
回應
回傳: CreateModerator200Response
範例

刪除管理員 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| send_email | String | 否 |
回應
回傳: FlagCommentPublic200Response
範例

取得管理員 
參數
| 名稱 | 型別 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
回應
範例

取得管理員列表 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| skip | f64 | 否 |
回應
範例

發送邀請 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| from_name | String | 是 |
回應
回傳:FlagCommentPublic200Response
範例

更新管理員 
參數
| 名稱 | 型別 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| update_moderator_body | models::UpdateModeratorBody | 是 |
回應
回傳: FlagCommentPublic200Response
範例

刪除通知計數 
參數
| 名稱 | 類型 | 必需 | 說明 |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
回應
回傳: FlagCommentPublic200Response
範例

取得快取通知計數 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
回應
回傳: GetCachedNotificationCount200Response
範例

取得通知計數 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | 是 | |
| user_id | String | 否 | |
| url_id | String | 否 | |
| from_comment_id | String | 否 | |
| viewed | bool | 否 |
回應
回傳:GetNotificationCount200Response
範例

取得通知 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | 是 | |
| user_id | String | 否 | |
| url_id | String | 否 | |
| from_comment_id | String | 否 | |
| viewed | bool | 否 | |
| skip | f64 | 否 |
回應
回傳: GetNotifications200Response
範例

更新通知 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| update_notification_body | models::UpdateNotificationBody | 是 | |
| user_id | String | 否 |
回應
回傳: FlagCommentPublic200Response
範例

部分更新頁面 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| update_api_page_data | models::UpdateApiPageData | 是 |
回應
刪除待處理的 Webhook 事件 
參數
| 名稱 | 類型 | 必需 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
回應
回傳: FlagCommentPublic200Response
範例

取得待處理 Webhook 事件計數 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 否 | |
| external_id | String | 否 | |
| event_type | String | 否 | |
| domain | String | 否 | |
| attempt_count_gt | f64 | 否 |
回應
回傳: GetPendingWebhookEventCount200Response
範例

取得待處理 Webhook 事件 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 否 | |
| external_id | String | 否 | |
| event_type | String | 否 | |
| domain | String | 否 | |
| attempt_count_gt | f64 | 否 | |
| skip | f64 | 否 |
回應
回傳: GetPendingWebhookEvents200Response
範例

建立問題設定 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | 是 | |
| create_question_config_body | models::CreateQuestionConfigBody | 是 |
回應
回傳: CreateQuestionConfig200Response
範例

刪除問題設定 
參數
| 名稱 | Type | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
回應
回傳: FlagCommentPublic200Response
範例

取得問題設定 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
回應
回傳:GetQuestionConfig200Response
範例

取得問題設定列表 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| skip | f64 | 否 |
回應
回傳: GetQuestionConfigs200Response
範例

更新問題設定 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| update_question_config_body | models::UpdateQuestionConfigBody | 是 |
回應
回傳: FlagCommentPublic200Response
範例

建立問題結果 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| create_question_result_body | models::CreateQuestionResultBody | 是 |
回應
回傳: CreateQuestionResult200Response
範例

刪除問題結果 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
回傳
回傳: FlagCommentPublic200Response
範例

取得問題結果 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
回應
回傳: GetQuestionResult200Response
範例

取得問題結果列表 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | 是 | |
| url_id | String | 否 | |
| user_id | String | 否 | |
| start_date | String | 否 | |
| question_id | String | 否 | |
| question_ids | String | 否 | |
| skip | f64 | 否 |
回應
回傳: GetQuestionResults200Response
範例

更新問題結果 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| update_question_result_body | models::UpdateQuestionResultBody | 是 |
回應
回傳: FlagCommentPublic200Response
範例

彙總問題結果 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| question_id | String | 否 | |
| question_ids | Vec |
否 | |
| url_id | String | 否 | |
| time_bucket | models::AggregateTimeBucket | 否 | |
| start_date | String | 否 | |
| force_recalculate | bool | 否 |
回應
回傳: AggregateQuestionResults200Response
批次彙總問題結果 
參數
| Name | Type | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| bulk_aggregate_question_results_request | models::BulkAggregateQuestionResultsRequest | 是 | |
| force_recalculate | bool | 否 |
回應
回傳: BulkAggregateQuestionResults200Response
將評論與問題結果合併 
參數
| Name | Type | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| question_id | String | 否 | |
| question_ids | Vec |
否 | |
| url_id | String | 否 | |
| start_date | String | 否 | |
| force_recalculate | bool | 否 | |
| min_value | f64 | 否 | |
| max_value | f64 | 否 | |
| limit | f64 | 否 |
回應
回傳: CombineCommentsWithQuestionResults200Response
新增 SSO 使用者 
參數
| 名稱 | 類型 | 必要 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| create_apisso_user_data | models::CreateApissoUserData | 是 |
回應
刪除 SSO 使用者 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| delete_comments | bool | 否 | |
| comment_delete_mode | String | 否 |
回應
部分更新 SSO 使用者 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| update_apisso_user_data | models::UpdateApissoUserData | 是 | |
| update_comments | bool | 否 |
回應
取代 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
取得租戶每日使用量 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | 是 | |
| year_number | f64 | 否 | |
| month_number | f64 | 否 | |
| day_number | f64 | 否 | |
| skip | f64 | 否 |
回應
回傳: GetTenantDailyUsages200Response
範例

建立租戶方案 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| create_tenant_package_body | models::CreateTenantPackageBody | 是 |
回應
回傳:CreateTenantPackage200Response
範例

刪除租戶方案 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
回應
回傳:FlagCommentPublic200Response
範例

取得租戶方案 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
回應
回傳: GetTenantPackage200Response
範例

取得租戶方案列表 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | 是 | |
| skip | f64 | 否 |
回應
回傳: GetTenantPackages200Response
範例

取代租戶方案 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| replace_tenant_package_body | models::ReplaceTenantPackageBody | Yes |
回應
回傳: FlagCommentPublic200Response
範例

更新租戶方案 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| update_tenant_package_body | models::UpdateTenantPackageBody | 是 |
回應
回傳: FlagCommentPublic200Response
範例

建立租戶使用者 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | 是 | |
| create_tenant_user_body | models::CreateTenantUserBody | 是 |
回應
回傳: CreateTenantUser200Response
範例

刪除租戶使用者 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| delete_comments | String | 否 | |
| comment_delete_mode | String | 否 |
回應
回傳: FlagCommentPublic200Response
範例

取得租戶使用者 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
回應
範例

取得租戶使用者列表 
參數
| 名稱 | 型別 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| skip | f64 | 否 |
回應
範例

取代租戶使用者 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| replace_tenant_user_body | models::ReplaceTenantUserBody | 是 | |
| update_comments | String | 否 |
回應
回傳: FlagCommentPublic200Response
範例

發送登入連結 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| redirect_url | String | 否 |
回應
回傳: FlagCommentPublic200Response
範例

更新租戶使用者 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| update_tenant_user_body | models::UpdateTenantUserBody | 是 | |
| update_comments | String | 否 |
回應
回傳:FlagCommentPublic200Response
範例

建立租戶 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| create_tenant_body | models::CreateTenantBody | 是 |
回應
範例

刪除租戶 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| sure | String | 否 |
回應
回傳:FlagCommentPublic200Response
範例

取得租戶 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 |
回應
範例

取得租戶列表 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| meta | String | 否 | |
| skip | f64 | 否 |
回應
範例

更新租戶 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes | |
| update_tenant_body | models::UpdateTenantBody | Yes |
回應
回傳: FlagCommentPublic200Response
範例

上傳圖片 
上傳並調整影像大小
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| file | std::path::PathBuf | 是 | |
| size_preset | models::SizePreset | 否 | |
| url_id | String | 否 |
回應
建立使用者徽章 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| create_user_badge_params | models::CreateUserBadgeParams | 是 |
回應
回傳: CreateUserBadge200Response
取得使用者徽章列表 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | 是 | |
| user_id | String | 否 | |
| badge_id | String | 否 | |
| displayed_on_comments | bool | 否 | |
| limit | f64 | 否 | |
| skip | f64 | 否 |
回應
更新使用者徽章 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| update_user_badge_params | models::UpdateUserBadgeParams | 是 |
回應
回傳: UpdateUserBadge200Response
取得使用者通知 
參數
| 名稱 | 型別 | 必填 | 說明 |
|---|---|---|---|
| tenant_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 | 否 | |
| sso | String | 否 |
回應
回傳: GetUserNotifications200Response
重設使用者通知 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| after_id | String | 否 | |
| after_created_at | i64 | 否 | |
| unread_only | bool | 否 | |
| dm_only | bool | 否 | |
| no_dm | bool | 否 | |
| sso | String | 否 |
回應
回傳: ResetUserNotifications200Response
更新使用者對評論通知訂閱狀態 
啟用或停用特定評論的通知。
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| notification_id | String | 是 | |
| opted_in_or_out | String | 是 | |
| comment_id | String | 是 | |
| sso | String | 否 |
回應
更新使用者對頁面通知訂閱狀態 
為頁面啟用或停用通知。當使用者訂閱頁面時,會建立通知 針對新的頂層評論,並且也會
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | 是 | |
| url_id | String | 是 | |
| url | String | 是 | |
| page_title | String | 是 | |
| subscribed_or_unsubscribed | String | 是 | |
| sso | String | 否 |
回應
更新使用者通知狀態 
參數
| 名稱 | 型別 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| notification_id | String | 是 | |
| new_status | String | 是 | |
| sso | String | 否 |
回應
回傳: UpdateUserNotificationStatus200Response
取得使用者線上狀態 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| url_id_ws | String | 是 | |
| user_ids | String | 是 |
回應
回傳: GetUserPresenceStatuses200Response
搜尋使用者 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| url_id | String | 是 | |
| username_starts_with | String | 是 | |
| mention_group_ids | Vec |
否 | |
| sso | String | 否 |
回應
取得使用者 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | Yes | |
| id | String | Yes |
回應
範例

建立投票 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenant_id | String | 是 | |
| comment_id | String | 是 | |
| direction | String | 是 | |
| user_id | String | 否 | |
| anon_user_id | String | 否 |
回應
範例

刪除投票 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| id | String | 是 | |
| edit_key | String | 否 |
回應
回傳:DeleteCommentVote200Response
範例

取得投票 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenant_id | String | 是 | |
| url_id | String | 是 |
回應
範例

取得使用者的投票 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenant_id | String | 是 | |
| url_id | String | 是 | |
| user_id | String | 否 | |
| anon_user_id | String | 否 |
回應
回傳: GetVotesForUser200Response
範例

需要幫助嗎?
如果您在使用 Rust SDK 時遇到任何問題或有任何疑問,請:
Contributing
歡迎貢獻!請造訪 GitHub 儲存庫 以取得貢獻指南。