
語言 🇹🇼 繁體中文
開始使用
文件
彙總
稽核日誌
從評論封鎖
檢查被封鎖的評論
評論
網域設定
電子郵件範本
事件日誌
動態貼文
檢舉評論
標籤
管理員
通知計數
通知
頁面
待處理的 Webhook 事件
問卷設定
問卷結果
問卷結果彙總
SSO 使用者
訂閱
租戶每日使用量
租戶方案
租戶使用者
租戶
上傳圖片
使用者徽章進度
使用者徽章
使用者通知
使用者在線狀態
使用者搜尋
使用者
投票
FastComments Python SDK
這是 FastComments 的官方 Python SDK。
FastComments API 的官方 Python SDK
儲存庫
安裝 
PyPI
pip install fastcomments
函式庫內容
此函式庫包含兩個模組:生成的 API 客戶端與核心 Python 函式庫,後者包含手寫的工具以便更容易使用 API,包括 SSO 支援。
公開與受保護的 API
對於 API 客戶端,有兩個類別,DefaultApi 和 PublicApi。DefaultApi 包含需要您的 API 金鑰 的方法,而 PublicApi 包含可以直接從瀏覽器、行動裝置等在未經驗證的情況下呼叫的 API。
快速開始 
使用已驗證的 API (DefaultApi)
重要: 您必須在 Configuration 上設定 API 金鑰,然後才能進行已驗證的請求。如果未設定,請求將以 401 錯誤失敗。
from client import ApiClient, Configuration, DefaultApi
from client.models import CreateAPISSOUserData
# Create and configure the API client
config = Configuration()
config.host = "https://fastcomments.com/api"
# REQUIRED: Set your API key (get this from your FastComments dashboard)
config.api_key = {"ApiKeyAuth": "YOUR_API_KEY_HERE"}
# Create the API instance with the configured client
api_client = ApiClient(configuration=config)
api = DefaultApi(api_client)
# Now you can make authenticated API calls
try:
# Example: Add an SSO user
user_data = CreateAPISSOUserData(
id="user-123",
email="user@example.com",
display_name="John Doe"
)
response = api.add_sso_user(
tenant_id="YOUR_TENANT_ID",
create_apisso_user_data=user_data
)
print(f"User created: {response}")
except Exception as e:
print(f"Error: {e}")
# Common errors:
# - 401: API key is missing or invalid
# - 400: Request validation failed
使用公開 API (PublicApi)
公開端點不需要驗證:
from client import ApiClient, Configuration, PublicApi
config = Configuration()
config.host = "https://fastcomments.com/api"
api_client = ApiClient(configuration=config)
public_api = PublicApi(api_client)
try:
response = public_api.get_comments_public(
tenant_id="YOUR_TENANT_ID",
url_id="page-url-id"
)
print(response)
except Exception as e:
print(f"Error: {e}")
使用 SSO(單一登入)
此 SDK 包含用於產生安全 SSO 令牌的工具:
from sso import FastCommentsSSO, SecureSSOUserData
# Create user data
user_data = SecureSSOUserData(
user_id="user-123",
email="user@example.com",
username="johndoe",
avatar="https://example.com/avatar.jpg"
)
# Create SSO instance with your API secret
sso = FastCommentsSSO.new_secure(
api_secret="YOUR_API_SECRET",
user_data=user_data
)
# Generate the SSO token
sso_token = sso.create_token()
# Use this token in your frontend or pass to API calls
print(f"SSO Token: {sso_token}")
For simple SSO (less secure, for testing):
from sso import FastCommentsSSO, SimpleSSOUserData
user_data = SimpleSSOUserData(
user_id="user-123",
email="user@example.com"
)
sso = FastCommentsSSO.new_simple(user_data)
sso_token = sso.create_token()
常見問題
- 401 "missing-api-key" error:請在建立 DefaultApi 實例之前,確認已設定
config.api_key = {"ApiKeyAuth": "YOUR_KEY"}。 - Wrong API class:對於伺服器端需驗證的請求,請使用
DefaultApi;對於用戶端/公開的請求,請使用PublicApi。 - Import errors:請確定您是從正確的模組匯入:
- API client:
from client import ... - SSO utilities:
from sso import ...
- API client:
備註 
廣播 ID
您會看到在某些 API 呼叫中需要傳入 broadcast_id。當您接收到事件時,會收到這個 ID 回傳,因此如果您打算在客戶端採用樂觀更新(您大概會想這麼做,因為它提供最佳體驗),就可以利用這個 ID 判斷是否忽略該事件。此處請傳入一個 UUID。該 ID 應足夠唯一,以免在同一個瀏覽器會話中出現兩次。
需求 
- Python >= 3.8
- urllib3 >= 1.25.3
- python-dateutil >= 2.8.2
- pydantic >= 2.0.0
- typing-extensions >= 4.0.0
彙總 
彙總文件,透過分組(若提供 groupBy)並套用多種運算。支援不同的運算(例如 sum、countDistinct、avg 等)。
參數
| 名稱 | Type | Location | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| parentTenantId | string | query | 否 | |
| includeStats | boolean | query | 否 |
回應
範例

取得稽核日誌 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| limit | number | query | 否 | |
| skip | number | query | 否 | |
| order | string | query | 否 | |
| after | number | query | 否 | |
| before | number | query | 否 |
回應
範例

公開封鎖評論來源 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | 查詢 | 是 | |
| commentId | string | 路徑 | 是 | |
| sso | string | 查詢 | 否 |
回應
回傳: BlockFromCommentPublic200Response
範例

公開解除封鎖評論 
參數
| 名稱 | 類型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | 查詢 | 是 | |
| commentId | string | 路徑 | 是 | |
| sso | string | 查詢 | 否 |
回應
回傳: UnBlockCommentPublic200Response
範例

檢查已封鎖的評論 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | Yes | |
| commentIds | string | query | Yes | 以逗號分隔的評論 ID 列表。 |
| sso | string | query | No |
回應
Returns: CheckedCommentsForBlocked200Response
範例

從評論封鎖使用者 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | Yes | |
| id | string | path | Yes | |
| userId | string | query | No | |
| anonUserId | string | query | No |
回應
回傳: BlockFromCommentPublic200Response
範例

建立公開評論 
參數
| 名稱 | Type | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| urlId | string | query | 是 | |
| broadcastId | string | query | 是 | |
| sessionId | string | query | 否 | |
| sso | string | query | 否 |
回應
回傳:CreateCommentPublic200Response
範例

刪除評論 
參數
| 名稱 | 類型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| contextUserId | string | query | 否 | |
| isLive | boolean | query | 否 |
回應
範例

刪除公開評論 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| commentId | string | path | 是 | |
| broadcastId | string | query | 是 | |
| editKey | string | query | 否 | |
| sso | string | query | 否 |
回應
回傳: DeleteCommentPublic200Response
範例

刪除評論投票 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| commentId | string | path | 是 | |
| voteId | string | path | 是 | |
| urlId | string | query | 是 | |
| broadcastId | string | query | 是 | |
| editKey | string | query | 否 | |
| sso | string | query | 否 |
回應
回傳: DeleteCommentVote200Response
範例

檢舉評論 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| userId | string | query | 否 | |
| anonUserId | string | query | 否 |
回應
範例

取得評論 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
回應
範例

取得評論內容 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| commentId | string | path | 是 | |
| editKey | string | query | 否 | |
| sso | string | query | 否 |
回應
範例

取得評論投票使用者名稱 
參數
| 名稱 | 類型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| commentId | string | path | 是 | |
| dir | integer | query | 是 | |
| sso | string | query | 否 |
回應
回傳: GetCommentVoteUserNames200Response
範例

取得評論清單 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| page | integer | query | 否 | |
| limit | integer | query | 否 | |
| skip | integer | query | 否 | |
| asTree | boolean | query | 否 | |
| skipChildren | integer | query | 否 | |
| limitChildren | integer | query | 否 | |
| maxTreeDepth | integer | query | 否 | |
| urlId | string | query | 否 | |
| userId | string | query | 否 | |
| anonUserId | string | query | 否 | |
| contextUserId | string | query | 否 | |
| hashTag | string | query | 否 | |
| parentId | string | query | 否 | |
| direction | string | query | 否 |
回應
範例

取得公開評論 
req tenantId urlId
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| urlId | string | query | 是 | |
| page | integer | query | 否 | |
| direction | string | query | 否 | |
| sso | string | query | 否 | |
| skip | integer | query | 否 | |
| skipChildren | integer | query | 否 | |
| limit | integer | query | 否 | |
| limitChildren | integer | query | 否 | |
| countChildren | boolean | query | 否 | |
| fetchPageForCommentId | string | query | 否 | |
| includeConfig | boolean | query | 否 | |
| countAll | boolean | query | 否 | |
| includei10n | boolean | query | 否 | |
| locale | string | query | 否 | |
| modules | string | query | 否 | |
| isCrawler | boolean | query | 否 | |
| includeNotificationCount | boolean | query | 否 | |
| asTree | boolean | query | 否 | |
| maxTreeDepth | integer | query | 否 | |
| useFullTranslationIds | boolean | query | 否 | |
| parentId | string | query | 否 | |
| searchText | string | query | 否 | |
| hashTags | array | query | 否 | |
| userId | string | query | 否 | |
| customConfigStr | string | query | 否 | |
| afterCommentId | string | query | 否 | |
| beforeCommentId | string | query | 否 |
回應
回傳: GetCommentsPublic200Response
範例

鎖定評論 
參數
| 名稱 | 類型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | path | Yes | |
| commentId | string | path | Yes | |
| broadcastId | string | query | Yes | |
| sso | string | query | No |
回應
範例

置頂評論 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| commentId | string | path | 是 | |
| broadcastId | string | query | 是 | |
| sso | string | query | 否 |
回應
範例

儲存評論 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| isLive | boolean | query | 否 | |
| doSpamCheck | boolean | query | 否 | |
| sendEmails | boolean | query | 否 | |
| populateNotifications | boolean | query | 否 |
回應
範例

批次儲存評論 
參數
| 名稱 | 型別 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| isLive | boolean | query | 否 | |
| doSpamCheck | boolean | query | 否 | |
| sendEmails | boolean | query | 否 | |
| populateNotifications | boolean | query | 否 |
回應
範例

設定評論內容 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| commentId | string | path | 是 | |
| broadcastId | string | query | 是 | |
| editKey | string | query | 否 | |
| sso | string | query | 否 |
回應
範例

解除從評論封鎖使用者 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| userId | string | query | 否 | |
| anonUserId | string | query | 否 |
回應
回傳:UnBlockCommentPublic200Response
範例

取消檢舉評論 
參數
| 名稱 | 類型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| userId | string | query | 否 | |
| anonUserId | string | query | 否 |
回應
範例

解除鎖定評論 
參數
| 名稱 | 類型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| commentId | string | path | 是 | |
| broadcastId | string | query | 是 | |
| sso | string | query | 否 |
回應
範例

取消置頂評論 
參數
| 名稱 | Type | Location | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| commentId | string | path | 是 | |
| broadcastId | string | query | 是 | |
| sso | string | query | 否 |
回應
範例

更新評論 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| contextUserId | string | query | 否 | |
| doSpamCheck | boolean | query | 否 | |
| isLive | boolean | query | 否 |
回應
回傳:FlagCommentPublic200Response
範例

對評論投票 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| commentId | string | path | 是 | |
| urlId | string | query | 是 | |
| broadcastId | string | query | 是 | |
| sessionId | string | query | 否 | |
| sso | string | query | 否 |
回應
範例

新增網域設定 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | 查詢 | 是 |
回應
範例

刪除網域設定 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| domain | string | path | 是 |
回應
回傳: DeleteDomainConfig200Response
範例

取得網域設定 
參數
| 名稱 | 型別 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| domain | string | path | 是 |
回應
回傳: GetDomainConfig200Response
範例

取得網域設定清單 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 |
回應
回傳: GetDomainConfigs200Response
範例

部分更新網域設定 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| domainToUpdate | string | path | 是 |
回應
回傳: GetDomainConfig200Response
範例

覆寫網域設定 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| domainToUpdate | string | path | 是 |
回應
回傳: GetDomainConfig200Response
範例

建立電子郵件範本 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 |
回應
回傳: CreateEmailTemplate200Response
範例

刪除電子郵件範本 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
回傳
回傳:FlagCommentPublic200Response
範例

刪除電子郵件範本渲染錯誤 
參數
| 名稱 | 類型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| errorId | string | path | 是 |
回應
回傳: FlagCommentPublic200Response
範例

取得電子郵件範本 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
回應
回傳: GetEmailTemplate200Response
範例

取得電子郵件範本定義 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 |
回應
回傳: GetEmailTemplateDefinitions200Response
範例

取得電子郵件範本渲染錯誤 
參數
| 名稱 | 類型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| skip | number | query | 否 |
回應
Returns: GetEmailTemplateRenderErrors200Response
範例

取得電子郵件範本清單 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| skip | number | query | 否 |
回應
回傳: GetEmailTemplates200Response
範例

渲染電子郵件範本 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| locale | string | query | 否 |
回應
回傳: RenderEmailTemplate200Response
範例

更新電子郵件範本 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | Yes | |
| id | string | path | Yes |
回應
回傳:FlagCommentPublic200Response
範例

取得事件日誌 
req tenantId urlId userIdWS
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| urlId | string | query | 是 | |
| userIdWS | string | query | 是 | |
| startTime | integer | query | 是 | |
| endTime | integer | query | 是 |
回應
範例

取得全域事件日誌 
req tenantId urlId userIdWS
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| urlId | string | query | 是 | |
| userIdWS | string | query | 是 | |
| startTime | integer | query | 是 | |
| endTime | integer | query | 是 |
回應
範例

建立動態貼文 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | Yes | |
| broadcastId | string | query | No | |
| isLive | boolean | query | No | |
| doSpamCheck | boolean | query | No | |
| skipDupCheck | boolean | query | No |
回應
範例

建立公開的動態貼文 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | path | Yes | |
| broadcastId | string | query | No | |
| sso | string | query | No |
回應
回傳: CreateFeedPostPublic200Response
範例

刪除公開動態貼文 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| postId | string | path | 是 | |
| broadcastId | string | query | 否 | |
| sso | string | query | 否 |
回應
回傳: DeleteFeedPostPublic200Response
範例

取得動態貼文 
req tenantId afterId
參數
| 名稱 | 類型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| afterId | string | query | 否 | |
| limit | integer | query | 否 | |
| tags | array | query | 否 |
回應
範例

取得公開動態貼文 
req tenantId afterId
參數
| 名稱 | 類型 | 位置 | 必要 | 描述 |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| afterId | string | query | 否 | |
| limit | integer | query | 否 | |
| tags | array | query | 否 | |
| sso | string | query | 否 | |
| isCrawler | boolean | query | 否 | |
| includeUserInfo | boolean | query | 否 |
回應
回傳: GetFeedPostsPublic200Response
範例

取得動態貼文統計 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | 路徑 | 是 | |
| postIds | array | 查詢 | 是 | |
| sso | string | 查詢 | 否 |
回應
回傳: GetFeedPostsStats200Response
範例

取得使用者公開反應 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | path | Yes | |
| postIds | array | query | No | |
| sso | string | query | No |
回應
回傳:GetUserReactsPublic200Response
範例

對公開動態貼文反應 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| postId | string | path | 是 | |
| isUndo | boolean | query | 否 | |
| broadcastId | string | query | 否 | |
| sso | string | query | 否 |
回應
回傳: ReactFeedPostPublic200Response
範例

更新動態貼文 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
回應
回傳: FlagCommentPublic200Response
範例

更新公開動態貼文 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| postId | string | path | 是 | |
| broadcastId | string | query | 否 | |
| sso | string | query | 否 |
回應
回傳: CreateFeedPostPublic200Response
範例

公開檢舉評論 
參數
| 名稱 | 類型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | Yes | |
| commentId | string | path | Yes | |
| isFlagged | boolean | query | Yes | |
| sso | string | query | No |
回應
回傳: FlagCommentPublic200Response
範例

新增標籤 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 否 |
回應
範例

批次新增標籤 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | No |
回應
回傳: AddHashTagsBulk200Response
範例

刪除標籤 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tag | string | path | 是 | |
| tenantId | string | query | 否 |
回應
回傳: FlagCommentPublic200Response
範例

取得標籤 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| page | number | query | 否 |
回應
範例

部分更新標籤 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tag | string | path | 是 | |
| tenantId | string | query | 否 |
回應
範例

建立管理員 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 |
回傳
範例

刪除管理員 
參數
| 名稱 | 類型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | Yes | |
| id | string | path | Yes | |
| sendEmail | string | query | No |
回應
回傳: FlagCommentPublic200Response
範例

取得管理員 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | Yes | |
| id | string | path | Yes |
回應
範例

取得管理員清單 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| skip | number | query | 否 |
回應
範例

發送邀請 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| fromName | string | query | 是 |
回應
回傳: FlagCommentPublic200Response
範例

更新管理員 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | 查詢 | 是 | |
| id | string | 路徑 | 是 |
回應
回傳: FlagCommentPublic200Response
範例

刪除通知計數 
參數
| 名稱 | 類型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
回應
回傳: FlagCommentPublic200Response
範例

取得快取的通知計數 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
回應
回傳: GetCachedNotificationCount200Response
範例

取得通知計數 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | Yes | |
| userId | string | query | No | |
| urlId | string | query | No | |
| fromCommentId | string | query | No | |
| viewed | boolean | query | No | |
| type | string | query | No |
回應
回傳: GetNotificationCount200Response
範例

取得通知 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| userId | string | query | 否 | |
| urlId | string | query | 否 | |
| fromCommentId | string | query | 否 | |
| viewed | boolean | query | 否 | |
| type | string | query | 否 | |
| skip | number | query | 否 |
回應
回傳:GetNotifications200Response
範例

更新通知 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| userId | string | query | 否 |
回應
回傳: FlagCommentPublic200Response
範例

新增頁面 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 |
回應
範例

刪除頁面 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | 查詢 | Yes | |
| id | string | 路徑 | Yes |
回應
範例

以 URL ID 取得頁面 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| urlId | string | query | 是 |
回應
範例

取得頁面清單 
參數
| 名稱 | 型別 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 |
回應
範例

部分更新頁面 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
回應
範例

刪除待處理的 Webhook 事件 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
回應
回傳:FlagCommentPublic200Response
範例

取得待處理的 Webhook 事件數量 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| commentId | string | query | 否 | |
| externalId | string | query | 否 | |
| eventType | string | query | 否 | |
| type | string | query | 否 | |
| domain | string | query | 否 | |
| attemptCountGT | number | query | 否 |
回應
回傳: GetPendingWebhookEventCount200Response
範例

取得待處理的 Webhook 事件 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | Yes | |
| commentId | string | query | No | |
| externalId | string | query | No | |
| eventType | string | query | No | |
| type | string | query | No | |
| domain | string | query | No | |
| attemptCountGT | number | query | No | |
| skip | number | query | No |
回應
回傳: GetPendingWebhookEvents200Response
範例

建立問卷設定 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 |
回傳
回傳: CreateQuestionConfig200Response
範例

刪除問卷設定 
參數
| 名稱 | 型別 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
回應
回傳: FlagCommentPublic200Response
範例

取得問卷設定 
參數
| 名稱 | 類型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
回應
回傳: GetQuestionConfig200Response
範例

取得問卷設定清單 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | Yes | |
| skip | number | query | No |
回應
回傳: GetQuestionConfigs200Response
範例

更新問卷設定 
參數
| 名稱 | 型別 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
回應
回傳: FlagCommentPublic200Response
範例

建立問卷結果 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 |
回應
回傳:CreateQuestionResult200Response
範例

刪除問卷結果 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | Yes | |
| id | string | path | Yes |
回應
回傳: FlagCommentPublic200Response
範例

取得問卷結果 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | Yes | |
| id | string | path | Yes |
回應
Returns: GetQuestionResult200Response
範例

取得問卷結果清單 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| urlId | string | query | 否 | |
| userId | string | query | 否 | |
| startDate | string | query | 否 | |
| questionId | string | query | 否 | |
| questionIds | string | query | 否 | |
| skip | number | query | 否 |
回應
回傳: GetQuestionResults200Response
範例

更新問卷結果 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | Yes | |
| id | string | path | Yes |
回應
回傳: FlagCommentPublic200Response
範例

彙總問卷結果 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | Yes | |
| questionId | string | query | No | |
| questionIds | array | query | No | |
| urlId | string | query | No | |
| timeBucket | string | query | No | |
| startDate | string | query | No | |
| forceRecalculate | boolean | query | No |
回應
回傳: AggregateQuestionResults200Response
範例

批次彙總問卷結果 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | Yes | |
| forceRecalculate | boolean | query | No |
回應
回傳: BulkAggregateQuestionResults200Response
範例

結合評論與問卷結果 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| questionId | string | query | 否 | |
| questionIds | array | query | 否 | |
| urlId | string | query | 否 | |
| startDate | string | query | 否 | |
| forceRecalculate | boolean | query | 否 | |
| minValue | number | query | 否 | |
| maxValue | number | query | 否 | |
| limit | number | query | 否 |
回應
回傳: CombineCommentsWithQuestionResults200Response
範例

新增 SSO 使用者 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 |
回應
範例

刪除 SSO 使用者 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | 查詢 | 是 | |
| id | string | 路徑 | 是 | |
| deleteComments | boolean | 查詢 | 否 | |
| commentDeleteMode | string | 查詢 | 否 |
回應
範例

以電子郵件取得 SSO 使用者 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| string | path | 是 |
回應
返回: GetSSOUserByEmailAPIResponse
範例

以 ID 取得 SSO 使用者 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
回應
範例

取得 SSO 使用者清單 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| skip | integer | query | 否 |
回應
範例

部分更新 SSO 使用者 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| updateComments | boolean | query | 否 |
回應
範例

覆寫 SSO 使用者 
參數
| 名稱 | 類型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| updateComments | boolean | query | 否 |
回應
範例

建立訂閱 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | Yes |
回應
回傳: CreateSubscriptionAPIResponse
範例

刪除訂閱 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| userId | string | query | 否 |
回應
回傳: DeleteSubscriptionAPIResponse
範例

取得訂閱 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| userId | string | query | 否 |
回應
回傳: GetSubscriptionsAPIResponse
範例

取得租戶每日使用量 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| yearNumber | number | query | 否 | |
| monthNumber | number | query | 否 | |
| dayNumber | number | query | 否 | |
| skip | number | query | 否 |
回應
回傳: GetTenantDailyUsages200Response
範例

建立租戶方案 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 |
回應
回傳: CreateTenantPackage200Response
範例

刪除租戶方案 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
回應
回傳: FlagCommentPublic200Response
範例

取得租戶方案 
參數
| 名稱 | 類型 | 所在位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | Yes | |
| id | string | path | Yes |
回應
回傳: GetTenantPackage200Response
範例

取得租戶方案清單 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| skip | number | query | 否 |
回應
回傳: GetTenantPackages200Response
範例

取代租戶方案 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
回應
回傳:FlagCommentPublic200Response
範例

更新租戶方案 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
回應
回傳: FlagCommentPublic200Response
範例

建立租戶使用者 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 |
回應
返回: CreateTenantUser200Response
範例

刪除租戶使用者 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| deleteComments | string | query | 否 | |
| commentDeleteMode | string | query | 否 |
回應
傳回: FlagCommentPublic200Response
範例

取得租戶使用者 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
回應
範例

取得租戶使用者清單 
參數
| 名稱 | 類型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| skip | number | query | 否 |
回應
範例

取代租戶使用者 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| updateComments | string | query | 否 |
回應
回傳:FlagCommentPublic200Response
範例

發送登入連結 
參數
| 名稱 | 類型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| redirectURL | string | query | 否 |
回應
回傳: FlagCommentPublic200Response
範例

更新租戶使用者 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| updateComments | string | query | 否 |
回應
回傳: FlagCommentPublic200Response
範例

建立租戶 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 |
回應
範例

刪除租戶 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| sure | string | query | 否 |
回應
回傳: FlagCommentPublic200Response
範例

取得租戶 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
回應
範例

取得租戶清單 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | Yes | |
| meta | string | query | No | |
| skip | number | query | No |
回應
範例

更新租戶 
參數
| 名稱 | 類型 | 位置 | 必要 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | Yes | |
| id | string | path | Yes |
回應
回傳: FlagCommentPublic200Response
範例

上傳圖片 
上傳並調整圖片大小
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | path | Yes | |
| sizePreset | string | query | No | 大小預設: "Default" (1000x1000px) 或 "CrossPlatform" (為熱門裝置建立尺寸) |
| urlId | string | query | No | 上傳發生來源的頁面 id,用於配置 |
回應
範例

以 ID 取得使用者徽章進度 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | Yes | |
| id | string | path | Yes |
回應
回傳: GetUserBadgeProgressById200Response
範例

以使用者 ID 取得徽章進度 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| userId | string | path | 是 |
回應
返回: GetUserBadgeProgressById200Response
範例

取得使用者徽章進度清單 
參數
| 名稱 | Type | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| userId | string | query | 否 | |
| limit | number | query | 否 | |
| skip | number | query | 否 |
回應
回傳:GetUserBadgeProgressList200Response
範例

建立使用者徽章 
參數
| 名稱 | 型別 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 |
回應
範例

刪除使用者徽章 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
回應
範例

取得使用者徽章 
參數
| 名稱 | 類型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
回應
範例

取得使用者徽章清單 
參數
| 名稱 | 類型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| userId | string | query | 否 | |
| badgeId | string | query | 否 | |
| type | number | query | 否 | |
| displayedOnComments | boolean | query | 否 | |
| limit | number | query | 否 | |
| skip | number | query | 否 |
回應
範例

更新使用者徽章 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
回應
回傳: UpdateUserBadge200Response
範例

取得使用者通知計數 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| sso | string | query | 否 |
回應
回傳: GetUserNotificationCount200Response
範例

取得使用者通知 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| pageSize | integer | query | 否 | |
| afterId | string | query | 否 | |
| includeContext | boolean | query | 否 | |
| afterCreatedAt | integer | query | 否 | |
| unreadOnly | boolean | query | 否 | |
| dmOnly | boolean | query | 否 | |
| noDm | boolean | query | 否 | |
| includeTranslations | boolean | query | 否 | |
| sso | string | query | 否 |
回應
回傳: GetUserNotifications200Response
範例

重設使用者通知計數 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| sso | string | query | 否 |
回應
回傳: ResetUserNotifications200Response
範例

重設使用者通知 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| afterId | string | query | 否 | |
| afterCreatedAt | integer | query | 否 | |
| unreadOnly | boolean | query | 否 | |
| dmOnly | boolean | query | 否 | |
| noDm | boolean | query | 否 | |
| sso | string | query | 否 |
回應
回傳:ResetUserNotifications200Response
範例

更新使用者評論訂閱狀態 
啟用或停用特定留言的通知。
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| notificationId | string | path | 是 | |
| optedInOrOut | string | path | 是 | |
| commentId | string | query | 是 | |
| sso | string | query | 否 |
回應
回傳: UpdateUserNotificationStatus200Response
範例

更新使用者頁面訂閱狀態 
啟用或停用頁面的通知。當使用者訂閱頁面時,會為新的根留言建立通知,並且也會
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| urlId | string | query | 是 | |
| url | string | query | 是 | |
| pageTitle | string | query | 是 | |
| subscribedOrUnsubscribed | string | path | 是 | |
| sso | string | query | 否 |
回傳
回傳: UpdateUserNotificationStatus200Response
範例

更新使用者通知狀態 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| notificationId | string | path | 是 | |
| newStatus | string | path | 是 | |
| sso | string | query | 否 |
回應
回傳: UpdateUserNotificationStatus200Response
範例

取得使用者在線狀態 
參數
| 名稱 | 類型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| urlIdWS | string | query | 是 | |
| userIds | string | query | 是 |
回應
回傳: GetUserPresenceStatuses200Response
範例

搜尋使用者 
參數
| 名稱 | 類型 | 位置 | 必需 | 說明 |
|---|---|---|---|---|
| tenantId | string | path | 是 | |
| urlId | string | query | 是 | |
| usernameStartsWith | string | query | 是 | |
| mentionGroupIds | array | query | 否 | |
| sso | string | query | 否 |
回應
範例

取得使用者 
參數
| 名稱 | 類型 | 位置 | 必填 | 說明 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 |
回應
範例

建立投票 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| commentId | string | query | 是 | |
| direction | string | query | 是 | |
| userId | string | query | 否 | |
| anonUserId | string | query | 否 |
回應
範例

刪除投票 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| id | string | path | 是 | |
| editKey | string | query | 否 |
回應
回傳: DeleteCommentVote200Response
範例

取得投票 
參數
| Name | Type | Location | Required | Description |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| urlId | string | query | 是 |
回應
範例

取得使用者的投票 
參數
| 名稱 | 類型 | 位置 | 必填 | 描述 |
|---|---|---|---|---|
| tenantId | string | query | 是 | |
| urlId | string | query | 是 | |
| userId | string | query | 否 | |
| anonUserId | string | query | 否 |
回應
回傳: GetVotesForUser200Response
範例

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