
語言 🇹🇼 繁體中文
文件
快速上手
API 參考
使用方式
彙總
稽核日誌
驗證
封鎖評論
檢查封鎖評論
評論
使用者的評論
網域設定
電子郵件範本
事件日誌
動態貼文
檢舉評論
動圖
標籤
審核
管理員
通知計數
通知
頁面反應
頁面
待處理的 Webhook 事件
問卷設定
問卷結果
問卷結果彙總
SSO 使用者
訂閱
租戶每日使用量
租戶方案
租戶使用者
租戶
工單
翻譯
上傳圖片
使用者徽章進度
使用者徽章
使用者通知
使用者在線狀態
使用者搜尋
使用者
投票
FastComments Nim 開發套件
這是 FastComments 的官方 Nim SDK。
FastComments API 的官方 Nim SDK
儲存庫
安裝 
使用 Nimble
nimble install fastcomments
從原始碼建構
nimble build
程式庫內容
此程式庫包含生成的 API 客戶端及 SSO 工具,可讓使用 API 更加便利。
公開與受保護的 API
對於 API 客戶端,有三個 API 模組,api_default、api_public 與 api_moderation。api_default 包含需要您的 API 金鑰的方法,api_public 包含可直接從瀏覽器/行動裝置等無需驗證即可呼叫的 API。api_moderation 模組則提供給管理員儀表板使用的方法。
api_moderation 模組提供廣泛的即時與快速審核 API。每個 api_moderation 方法都接受 sso 參數,並可透過 SSO 或 FastComments.com 的會話 Cookie 進行驗證。
快速開始 
使用已驗證的 API(DefaultAPI)
重要:已驗證的端點需要將您的 API 金鑰設定為 x-api-key 標頭。
import httpclient
import fastcomments
import fastcomments/apis/api_default
import fastcomments/models/model_comment_data
let client = newHttpClient()
client.headers["x-api-key"] = "your-api-key"
# Make authenticated API calls.
# Required parameters (and the request body) are positional; optional
# parameters are passed via the operation's options object.
let (response, httpResponse) = getComments(
httpClient = client,
tenantId = "your-tenant-id",
options = GetCommentsOptions(
urlId: "your-url-id",
direction: SortDirections.DESC
)
)
if response.isSome:
let resp = response.get()
if resp.comments.isSome:
echo "Found ", resp.comments.get().len, " comments"
使用公共 API(PublicAPI)
公共端點不需要驗證:
import httpclient
import fastcomments
import fastcomments/apis/api_public
let client = newHttpClient()
# Make public API calls.
# tenantId and urlId are required (positional); everything else is optional.
let (response, httpResponse) = getCommentsPublic(
httpClient = client,
tenantId = "your-tenant-id",
urlId = "your-url-id",
options = GetCommentsPublicOptions(
direction: SortDirections.DESC
)
)
if response.isSome:
let resp = response.get()
if resp.comments.isSome:
echo "Found ", resp.comments.get().len, " comments"
使用審核 API(ModerationAPI)
審核端點為審核者儀表板提供功能,並以執行中的審核者的 SSO 令牌進行驗證:
import httpclient
import fastcomments
import fastcomments/apis/api_moderation
let client = newHttpClient()
# List comments in the moderation dashboard.
# This operation has no required parameters, so everything is optional.
let (response, httpResponse) = getApiComments(
httpClient = client,
options = GetApiCommentsOptions(
count: 30,
tenantId: "your-tenant-id",
sso: "your-sso-token"
)
)
if response.isSome:
let resp = response.get()
echo "Found ", resp.comments.len, " comments"
常見問題
- 401 認證錯誤:確保在發送 DefaultAPI 請求之前,在 HttpClient 上設置
x-api-key標頭:client.headers["x-api-key"] = "your-api-key" - 錯誤的 API 類別:對於伺服器端已驗證的請求使用
api_default,對於客戶端/公共請求使用api_public,以及對於審核者儀表板請求使用api_moderation。
發出 API 呼叫 
All API methods in this SDK return tuples of (Option[ResponseType], Response). The first element contains the parsed response if successful, and the second element is the raw HTTP response.
Required parameters and the request body are passed positionally. The remaining optional parameters are collected into a single Api<Operation>Options object, which is the last argument. Operations with no optional parameters take no options object.
範例:取得評論
import httpclient
import options
import fastcomments
import fastcomments/apis/api_default
let client = newHttpClient()
client.headers["x-api-key"] = "your-api-key"
let (response, httpResponse) = getComments(
httpClient = client,
tenantId = "your-tenant-id",
options = GetCommentsOptions(
urlId: "your-url-id",
direction: SortDirections.DESC
)
)
if httpResponse.code == Http200:
if response.isSome:
let resp = response.get()
if resp.comments.isSome:
echo "Found ", resp.comments.get().len, " comments"
備註 
廣播 ID
你會看到在某些 API 呼叫中需要傳入一個 broadcastId。當你接收到事件時,你會拿回這個 ID,因此如果你打算在用戶端採用樂觀更新(在用戶端樂觀地套用變更),你就可以據此忽略該事件(你可能會想這樣做,因為它提供了最佳的使用體驗)。在這裡傳入一個 UUID。這個 ID 應該夠獨特,以免在同一個瀏覽器會話中出現兩次。
SSO (單一登入)
關於 SSO 的範例,請見下方。
SSO 使用方式 
簡易 SSO
import fastcomments/sso
let user = newSimpleSSOUserData(
userId = "user-123",
email = "user@example.com",
avatar = "https://example.com/avatar.jpg"
)
let sso = newSimple(simpleUserData = user)
let token = sso.createToken()
echo "SSO Token: ", token
安全 SSO
import fastcomments/sso
let user = newSecureSSOUserData(
userId = "user-123",
email = "user@example.com",
username = "johndoe",
avatar = "https://example.com/avatar.jpg"
)
let apiKey = "your-api-key"
let sso = newSecure(apiKey = apiKey, secureUserData = user)
let token = sso.createToken()
echo "Secure SSO Token: ", token
fastcomments 文件 
API 端點文件
所有 URI 均相對於 https://fastcomments.com
| 類別 | 方法 | HTTP 請求 | 描述 |
|---|---|---|---|
| DefaultApi | addDomainConfig | POST /api/v1/domain-configs | |
| DefaultApi | addHashTag | POST /api/v1/hash-tags | |
| DefaultApi | addHashTagsBulk | POST /api/v1/hash-tags/bulk | |
| DefaultApi | addPage | POST /api/v1/pages | |
| DefaultApi | addSSOUser | POST /api/v1/sso-users | |
| DefaultApi | aggregate | POST /api/v1/aggregate | 聚合文件,透過分組(如果提供 groupBy)並套用多種運算。支援不同的運算(例如 sum、countDistinct、avg 等)。 |
| DefaultApi | aggregateQuestionResults | GET /api/v1/question-results-aggregation | |
| DefaultApi | blockUserFromComment | POST /api/v1/comments/{id}/block | |
| DefaultApi | bulkAggregateQuestionResults | POST /api/v1/question-results-aggregation/bulk | |
| DefaultApi | changeTicketState | PATCH /api/v1/tickets/{id}/state | |
| DefaultApi | combineCommentsWithQuestionResults | GET /api/v1/question-results-aggregation/combine/comments | |
| DefaultApi | createEmailTemplate | POST /api/v1/email-templates | |
| DefaultApi | createFeedPost | POST /api/v1/feed-posts | |
| DefaultApi | createModerator | POST /api/v1/moderators | |
| DefaultApi | createQuestionConfig | POST /api/v1/question-configs | |
| DefaultApi | createQuestionResult | POST /api/v1/question-results | |
| DefaultApi | createSubscription | POST /api/v1/subscriptions | |
| DefaultApi | createTenant | POST /api/v1/tenants | |
| DefaultApi | createTenantPackage | POST /api/v1/tenant-packages | |
| DefaultApi | createTenantUser | POST /api/v1/tenant-users | |
| DefaultApi | createTicket | POST /api/v1/tickets | |
| DefaultApi | createUserBadge | POST /api/v1/user-badges | |
| DefaultApi | createVote | POST /api/v1/votes | |
| DefaultApi | deleteComment | DELETE /api/v1/comments/{id} | |
| DefaultApi | deleteDomainConfig | DELETE /api/v1/domain-configs/{domain} | |
| DefaultApi | deleteEmailTemplate | DELETE /api/v1/email-templates/{id} | |
| DefaultApi | deleteEmailTemplateRenderError | DELETE /api/v1/email-templates/{id}/render-errors/{errorId} | |
| DefaultApi | deleteHashTag | DELETE /api/v1/hash-tags/{tag} | |
| DefaultApi | deleteModerator | DELETE /api/v1/moderators/{id} | |
| DefaultApi | deleteNotificationCount | DELETE /api/v1/notification-count/{id} | |
| DefaultApi | deletePage | DELETE /api/v1/pages/{id} | |
| DefaultApi | deletePendingWebhookEvent | DELETE /api/v1/pending-webhook-events/{id} | |
| DefaultApi | deleteQuestionConfig | DELETE /api/v1/question-configs/{id} | |
| DefaultApi | deleteQuestionResult | DELETE /api/v1/question-results/{id} | |
| DefaultApi | deleteSSOUser | DELETE /api/v1/sso-users/{id} | |
| DefaultApi | deleteSubscription | DELETE /api/v1/subscriptions/{id} | |
| DefaultApi | deleteTenant | DELETE /api/v1/tenants/{id} | |
| DefaultApi | deleteTenantPackage | DELETE /api/v1/tenant-packages/{id} | |
| DefaultApi | deleteTenantUser | DELETE /api/v1/tenant-users/{id} | |
| DefaultApi | deleteUserBadge | DELETE /api/v1/user-badges/{id} | |
| DefaultApi | deleteVote | DELETE /api/v1/votes/{id} | |
| DefaultApi | flagComment | POST /api/v1/comments/{id}/flag | |
| DefaultApi | getAuditLogs | GET /api/v1/audit-logs | |
| DefaultApi | getCachedNotificationCount | GET /api/v1/notification-count/{id} | |
| DefaultApi | getComment | GET /api/v1/comments/{id} | |
| DefaultApi | getComments | GET /api/v1/comments | |
| DefaultApi | getDomainConfig | GET /api/v1/domain-configs/{domain} | |
| DefaultApi | getDomainConfigs | GET /api/v1/domain-configs | |
| DefaultApi | getEmailTemplate | GET /api/v1/email-templates/{id} | |
| DefaultApi | getEmailTemplateDefinitions | GET /api/v1/email-templates/definitions | |
| DefaultApi | getEmailTemplateRenderErrors | GET /api/v1/email-templates/{id}/render-errors | |
| DefaultApi | getEmailTemplates | GET /api/v1/email-templates | |
| DefaultApi | getFeedPosts | GET /api/v1/feed-posts | req tenantId afterId |
| DefaultApi | getHashTags | GET /api/v1/hash-tags | |
| DefaultApi | getModerator | GET /api/v1/moderators/{id} | |
| DefaultApi | getModerators | GET /api/v1/moderators | |
| DefaultApi | getNotificationCount | GET /api/v1/notifications/count | |
| DefaultApi | getNotifications | GET /api/v1/notifications | |
| DefaultApi | getPageByURLId | GET /api/v1/pages/by-url-id | |
| DefaultApi | getPages | GET /api/v1/pages | |
| DefaultApi | getPendingWebhookEventCount | GET /api/v1/pending-webhook-events/count | |
| DefaultApi | getPendingWebhookEvents | GET /api/v1/pending-webhook-events | |
| DefaultApi | getQuestionConfig | GET /api/v1/question-configs/{id} | |
| DefaultApi | getQuestionConfigs | GET /api/v1/question-configs | |
| DefaultApi | getQuestionResult | GET /api/v1/question-results/{id} | |
| DefaultApi | getQuestionResults | GET /api/v1/question-results | |
| DefaultApi | getSSOUserByEmail | GET /api/v1/sso-users/by-email/{email} | |
| DefaultApi | getSSOUserById | GET /api/v1/sso-users/by-id/{id} | |
| DefaultApi | getSSOUsers | GET /api/v1/sso-users | |
| DefaultApi | getSubscriptions | GET /api/v1/subscriptions | |
| DefaultApi | getTenant | GET /api/v1/tenants/{id} | |
| DefaultApi | getTenantDailyUsages | GET /api/v1/tenant-daily-usage | |
| DefaultApi | getTenantPackage | GET /api/v1/tenant-packages/{id} | |
| DefaultApi | getTenantPackages | GET /api/v1/tenant-packages | |
| DefaultApi | getTenantUser | GET /api/v1/tenant-users/{id} | |
| DefaultApi | getTenantUsers | GET /api/v1/tenant-users | |
| DefaultApi | getTenants | GET /api/v1/tenants | |
| DefaultApi | getTicket | GET /api/v1/tickets/{id} | |
| DefaultApi | getTickets | GET /api/v1/tickets | |
| DefaultApi | getUser | GET /api/v1/users/{id} | |
| DefaultApi | getUserBadge | GET /api/v1/user-badges/{id} | |
| DefaultApi | getUserBadgeProgressById | GET /api/v1/user-badge-progress/{id} | |
| DefaultApi | getUserBadgeProgressByUserId | GET /api/v1/user-badge-progress/user/{userId} | |
| DefaultApi | getUserBadgeProgressList | GET /api/v1/user-badge-progress | |
| DefaultApi | getUserBadges | GET /api/v1/user-badges | |
| DefaultApi | getVotes | GET /api/v1/votes | |
| DefaultApi | getVotesForUser | GET /api/v1/votes/for-user | |
| DefaultApi | patchDomainConfig | PATCH /api/v1/domain-configs/{domainToUpdate} | |
| DefaultApi | patchHashTag | PATCH /api/v1/hash-tags/{tag} | |
| DefaultApi | patchPage | PATCH /api/v1/pages/{id} | |
| DefaultApi | patchSSOUser | PATCH /api/v1/sso-users/{id} | |
| DefaultApi | putDomainConfig | PUT /api/v1/domain-configs/{domainToUpdate} | |
| DefaultApi | putSSOUser | PUT /api/v1/sso-users/{id} | |
| DefaultApi | renderEmailTemplate | POST /api/v1/email-templates/render | |
| DefaultApi | replaceTenantPackage | PUT /api/v1/tenant-packages/{id} | |
| DefaultApi | replaceTenantUser | PUT /api/v1/tenant-users/{id} | |
| DefaultApi | saveComment | POST /api/v1/comments | |
| DefaultApi | saveCommentsBulk | POST /api/v1/comments/bulk | |
| DefaultApi | sendInvite | POST /api/v1/moderators/{id}/send-invite | |
| DefaultApi | sendLoginLink | POST /api/v1/tenant-users/{id}/send-login-link | |
| DefaultApi | unBlockUserFromComment | POST /api/v1/comments/{id}/un-block | |
| DefaultApi | unFlagComment | POST /api/v1/comments/{id}/un-flag | |
| DefaultApi | updateComment | PATCH /api/v1/comments/{id} | |
| DefaultApi | updateEmailTemplate | PATCH /api/v1/email-templates/{id} | |
| DefaultApi | updateFeedPost | PATCH /api/v1/feed-posts/{id} | |
| DefaultApi | updateModerator | PATCH /api/v1/moderators/{id} | |
| DefaultApi | updateNotification | PATCH /api/v1/notifications/{id} | |
| DefaultApi | updateQuestionConfig | PATCH /api/v1/question-configs/{id} | |
| DefaultApi | updateQuestionResult | PATCH /api/v1/question-results/{id} | |
| DefaultApi | updateSubscription | PATCH /api/v1/subscriptions/{id} | |
| DefaultApi | updateTenant | PATCH /api/v1/tenants/{id} | |
| DefaultApi | updateTenantPackage | PATCH /api/v1/tenant-packages/{id} | |
| DefaultApi | updateTenantUser | PATCH /api/v1/tenant-users/{id} | |
| DefaultApi | updateUserBadge | PUT /api/v1/user-badges/{id} | |
| ModerationApi | deleteModerationVote | DELETE /auth/my-account/moderate-comments/mod_api/vote/{commentId}/{voteId} | |
| ModerationApi | getApiComments | GET /auth/my-account/moderate-comments/mod_api/api/comments | |
| ModerationApi | getApiExportStatus | GET /auth/my-account/moderate-comments/mod_api/api/export/status | |
| ModerationApi | getApiIds | GET /auth/my-account/moderate-comments/mod_api/api/ids | |
| ModerationApi | getBanUsersFromComment | GET /auth/my-account/moderate-comments/mod_api/ban-users/from-comment/{commentId} | |
| ModerationApi | getCommentBanStatus | GET /auth/my-account/moderate-comments/mod_api/get-comment-ban-status/{commentId} | |
| ModerationApi | getCommentChildren | GET /auth/my-account/moderate-comments/mod_api/comment-children/{commentId} | |
| ModerationApi | getCount | GET /auth/my-account/moderate-comments/mod_api/count | |
| ModerationApi | getCounts | GET /auth/my-account/moderate-comments/banned-users/mod_api/counts | |
| ModerationApi | getLogs | GET /auth/my-account/moderate-comments/mod_api/logs/{commentId} | |
| ModerationApi | getManualBadges | GET /auth/my-account/moderate-comments/mod_api/get-manual-badges | |
| ModerationApi | getManualBadgesForUser | GET /auth/my-account/moderate-comments/mod_api/get-manual-badges-for-user | |
| ModerationApi | getModerationComment | GET /auth/my-account/moderate-comments/mod_api/comment/{commentId} | |
| ModerationApi | getModerationCommentText | GET /auth/my-account/moderate-comments/mod_api/get-comment-text/{commentId} | |
| ModerationApi | getPreBanSummary | GET /auth/my-account/moderate-comments/mod_api/pre-ban-summary/{commentId} | |
| ModerationApi | getSearchCommentsSummary | GET /auth/my-account/moderate-comments/mod_api/search/comments/summary | |
| ModerationApi | getSearchPages | GET /auth/my-account/moderate-comments/mod_api/search/pages | |
| ModerationApi | getSearchSites | GET /auth/my-account/moderate-comments/mod_api/search/sites | |
| ModerationApi | getSearchSuggest | GET /auth/my-account/moderate-comments/mod_api/search/suggest | |
| ModerationApi | getSearchUsers | GET /auth/my-account/moderate-comments/mod_api/search/users | |
| ModerationApi | getTrustFactor | GET /auth/my-account/moderate-comments/mod_api/get-trust-factor | |
| ModerationApi | getUserBanPreference | GET /auth/my-account/moderate-comments/mod_api/user-ban-preference | |
| ModerationApi | getUserInternalProfile | GET /auth/my-account/moderate-comments/mod_api/get-user-internal-profile | |
| ModerationApi | postAdjustCommentVotes | POST /auth/my-account/moderate-comments/mod_api/adjust-comment-votes/{commentId} | |
| ModerationApi | postApiExport | POST /auth/my-account/moderate-comments/mod_api/api/export | |
| ModerationApi | postBanUserFromComment | POST /auth/my-account/moderate-comments/mod_api/ban-user/from-comment/{commentId} | |
| ModerationApi | postBanUserUndo | POST /auth/my-account/moderate-comments/mod_api/ban-user/undo | |
| ModerationApi | postBulkPreBanSummary | POST /auth/my-account/moderate-comments/mod_api/bulk-pre-ban-summary | |
| ModerationApi | postCommentsByIds | POST /auth/my-account/moderate-comments/mod_api/comments-by-ids | |
| ModerationApi | postFlagComment | POST /auth/my-account/moderate-comments/mod_api/flag-comment/{commentId} | |
| ModerationApi | postRemoveComment | POST /auth/my-account/moderate-comments/mod_api/remove-comment/{commentId} | |
| ModerationApi | postRestoreDeletedComment | POST /auth/my-account/moderate-comments/mod_api/restore-deleted-comment/{commentId} | |
| ModerationApi | postSetCommentApprovalStatus | POST /auth/my-account/moderate-comments/mod_api/set-comment-approval-status/{commentId} | |
| ModerationApi | postSetCommentReviewStatus | POST /auth/my-account/moderate-comments/mod_api/set-comment-review-status/{commentId} | |
| ModerationApi | postSetCommentSpamStatus | POST /auth/my-account/moderate-comments/mod_api/set-comment-spam-status/{commentId} | |
| ModerationApi | postSetCommentText | POST /auth/my-account/moderate-comments/mod_api/set-comment-text/{commentId} | |
| ModerationApi | postUnFlagComment | POST /auth/my-account/moderate-comments/mod_api/un-flag-comment/{commentId} | |
| ModerationApi | postVote | POST /auth/my-account/moderate-comments/mod_api/vote/{commentId} | |
| ModerationApi | putAwardBadge | PUT /auth/my-account/moderate-comments/mod_api/award-badge | |
| ModerationApi | putCloseThread | PUT /auth/my-account/moderate-comments/mod_api/close-thread | |
| ModerationApi | putRemoveBadge | PUT /auth/my-account/moderate-comments/mod_api/remove-badge | |
| ModerationApi | putReopenThread | PUT /auth/my-account/moderate-comments/mod_api/reopen-thread | |
| ModerationApi | setTrustFactor | PUT /auth/my-account/moderate-comments/mod_api/set-trust-factor | |
| PublicApi | blockFromCommentPublic | POST /block-from-comment/{commentId} | |
| PublicApi | checkedCommentsForBlocked | GET /check-blocked-comments | |
| PublicApi | createCommentPublic | POST /comments/{tenantId} | |
| PublicApi | createFeedPostPublic | POST /feed-posts/{tenantId} | |
| PublicApi | createV1PageReact | POST /page-reacts/v1/likes/{tenantId} | |
| PublicApi | createV2PageReact | POST /page-reacts/v2/{tenantId} | |
| PublicApi | deleteCommentPublic | DELETE /comments/{tenantId}/{commentId} | |
| PublicApi | deleteCommentVote | DELETE /comments/{tenantId}/{commentId}/vote/{voteId} | |
| PublicApi | deleteFeedPostPublic | DELETE /feed-posts/{tenantId}/{postId} | |
| PublicApi | deleteV1PageReact | DELETE /page-reacts/v1/likes/{tenantId} | |
| PublicApi | deleteV2PageReact | DELETE /page-reacts/v2/{tenantId} | |
| PublicApi | flagCommentPublic | POST /flag-comment/{commentId} | |
| PublicApi | getCommentText | GET /comments/{tenantId}/{commentId}/text | |
| PublicApi | getCommentVoteUserNames | GET /comments/{tenantId}/{commentId}/votes | |
| PublicApi | getCommentsForUser | GET /comments-for-user | |
| PublicApi | getCommentsPublic | GET /comments/{tenantId} | req tenantId urlId |
| PublicApi | getEventLog | GET /event-log/{tenantId} | req tenantId urlId userIdWS |
| PublicApi | getFeedPostsPublic | GET /feed-posts/{tenantId} | req tenantId afterId |
| PublicApi | getFeedPostsStats | GET /feed-posts/{tenantId}/stats | |
| PublicApi | getGifLarge | GET /gifs/get-large/{tenantId} | |
| PublicApi | getGifsSearch | GET /gifs/search/{tenantId} | |
| PublicApi | getGifsTrending | GET /gifs/trending/{tenantId} | |
| PublicApi | getGlobalEventLog | GET /event-log/global/{tenantId} | req tenantId urlId userIdWS |
| PublicApi | getOfflineUsers | GET /pages/{tenantId}/users/offline | 過去在此頁面留言的使用者且目前未在線。依 displayName 排序。在使用完 /users/online 後使用,以呈現「Members」區段。對 commenterName 採用游標分頁:伺服器從 afterName 之後以 $gt 方式遍歷部分 {tenantId, urlId, commenterName} 索引,無 $skip 成本。 |
| PublicApi | getOnlineUsers | GET /pages/{tenantId}/users/online | 目前在線觀看頁面的使用者:其 websocket 連線目前已訂閱該頁面。回傳 anonCount + totalCount(整個房間的訂閱者,包括未列舉的匿名觀看者)。 |
| PublicApi | getPagesPublic | GET /pages/{tenantId} | 列出租戶的頁面。供 FChat 桌面客戶端填充房間清單使用。每個頁面的解析自訂設定須將 enableFChat 設為 true。需要 SSO 的頁面會根據請求使用者的群組存取權限進行過濾。 |
| PublicApi | getTranslations | GET /translations/{namespace}/{component} | |
| PublicApi | getUserNotificationCount | GET /user-notifications/get-count | |
| PublicApi | getUserNotifications | GET /user-notifications | |
| PublicApi | getUserPresenceStatuses | GET /user-presence-status | |
| PublicApi | getUserReactsPublic | GET /feed-posts/{tenantId}/user-reacts | |
| PublicApi | getUsersInfo | GET /pages/{tenantId}/users/info | 大量使用者資訊,給予 tenant。根據 userIds 回傳 User / SSOUser 的顯示資訊。供評論小工具在使用者透過 presence 事件剛出現時豐富使用者資訊。未傳入頁面上下文:隱私統一強制(私密個人檔案會被遮蔽)。 |
| PublicApi | getV1PageLikes | GET /page-reacts/v1/likes/{tenantId} | |
| PublicApi | getV2PageReactUsers | GET /page-reacts/v2/{tenantId}/list | |
| PublicApi | getV2PageReacts | GET /page-reacts/v2/{tenantId} | |
| PublicApi | lockComment | POST /comments/{tenantId}/{commentId}/lock | |
| PublicApi | logoutPublic | PUT /auth/logout | |
| PublicApi | pinComment | POST /comments/{tenantId}/{commentId}/pin | |
| PublicApi | reactFeedPostPublic | POST /feed-posts/{tenantId}/react/{postId} | |
| PublicApi | resetUserNotificationCount | POST /user-notifications/reset-count | |
| PublicApi | resetUserNotifications | POST /user-notifications/reset | |
| PublicApi | searchUsers | GET /user-search/{tenantId} | |
| PublicApi | setCommentText | POST /comments/{tenantId}/{commentId}/update-text | |
| PublicApi | unBlockCommentPublic | DELETE /block-from-comment/{commentId} | |
| PublicApi | unLockComment | POST /comments/{tenantId}/{commentId}/unlock | |
| PublicApi | unPinComment | POST /comments/{tenantId}/{commentId}/unpin | |
| PublicApi | updateFeedPostPublic | PUT /feed-posts/{tenantId}/{postId} | |
| PublicApi | updateUserNotificationCommentSubscriptionStatus | POST /user-notifications/{notificationId}/mark-opted/{optedInOrOut} | 啟用或停用特定留言的通知。 |
| PublicApi | updateUserNotificationPageSubscriptionStatus | POST /user-notifications/set-subscription-state/{subscribedOrUnsubscribed} | 啟用或停用頁面的通知。當使用者訂閱頁面時,會為新的根留言產生通知,且... |
| PublicApi | updateUserNotificationStatus | POST /user-notifications/{notificationId}/mark/{newStatus} | |
| PublicApi | uploadImage | POST /upload-image/{tenantId} | 上傳並調整圖片大小 |
| PublicApi | voteComment | POST /comments/{tenantId}/{commentId}/vote |
模型文件
- APIAuditLog
- APIBanUserChangeLog
- APIBanUserChangedValues
- APIBannedUser
- APIBannedUserWithMultiMatchInfo
- APIComment
- APICommentBase
- APICommentBase_meta
- APICommentCommonBannedUser
- APICreateUserBadgeResponse
- APIDomainConfiguration
- APIEmptyResponse
- APIEmptySuccessResponse
- APIError
- APIGetCommentResponse
- APIGetCommentsResponse
- APIGetUserBadgeProgressListResponse
- APIGetUserBadgeProgressResponse
- APIGetUserBadgeResponse
- APIGetUserBadgesResponse
- APIModerateGetUserBanPreferencesResponse
- APIModerateUserBanPreferences
- APIPage
- APISSOUser
- APISaveCommentResponse
- APIStatus
- APITenant
- APITenantDailyUsage
- APITicket
- APITicketDetail
- APITicketFile
- APIUserSubscription
- AddDomainConfigParams
- AddDomainConfigResponse
- AddDomainConfigResponse_anyOf
- AddPageAPIResponse
- AddSSOUserAPIResponse
- AdjustCommentVotesParams
- AdjustVotesResponse
- AggregateQuestionResultsResponse
- AggregateResponse
- AggregateTimeBucket
- AggregationAPIError
- AggregationItem
- AggregationOpType
- AggregationOperation
- AggregationRequest
- AggregationRequest_sort
- AggregationResponse
- AggregationResponse_stats
- AggregationValue
- AwardUserBadgeResponse
- BanUserFromCommentResult
- [BanUserUndoParams](https://github.com/FastComments/fastcomments-nim/blob/master/docs/Models/BanUser
彙總 
Aggregates documents by grouping them (if groupBy is provided) and applying multiple operations. Different operations (e.g. sum, countDistinct, avg, etc.) are supported.
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| aggregationRequest | AggregationRequest | 否 | |
| options | AggregateOptions | 否 |
回應
範例

取得稽核日誌 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenantId | string | Yes | |
| options | GetAuditLogsOptions | No |
回應
返回:Option[GetAuditLogsResponse]
範例

公開登出 
回應
範例

從評論封鎖 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | Yes | |
| commentId | string | Yes | |
| publicBlockFromCommentParams | PublicBlockFromCommentParams | No | |
| sso | string = "" | No |
回應
Returns: Option[BlockSuccess]
範例

取消封鎖評論 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenantId | string | 是 | |
| commentId | string | 是 | |
| publicBlockFromCommentParams | PublicBlockFromCommentParams | 否 | |
| sso | string = "" | 否 |
回應
範例

檢查被封鎖的評論 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenantId | string | Yes | |
| commentIds | string | No | |
| sso | string = "" | No |
回應
返回: Option[CheckBlockedCommentsResponse]
範例

從評論封鎖使用者 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenantId | string | Yes | |
| id | string | No | |
| blockFromCommentParams | BlockFromCommentParams | No | |
| options | BlockUserFromCommentOptions | No |
回應
範例

建立公開評論 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenantId | string | Yes | |
| urlId | string | Yes | |
| broadcastId | string | No | |
| commentData | CommentData | No | |
| options | CreateCommentPublicOptions | No |
回應
回傳:Option[SaveCommentsResponseWithPresence]
範例

刪除評論 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| options | DeleteCommentOptions | 否 |
回應
返回:Option[DeleteCommentResult]
範例

刪除公開評論 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenantId | string | 是 | |
| commentId | string | 是 | |
| broadcastId | string | 否 | |
| options | DeleteCommentPublicOptions | 否 |
回應
回傳:Option[PublicAPIDeleteCommentResponse]
範例

刪除評論投票 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | Yes | |
| commentId | string | Yes | |
| voteId | string | No | |
| urlId | string | Yes | |
| broadcastId | string | No | |
| options | DeleteCommentVoteOptions | No |
回應
範例

檢舉評論 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| options | FlagCommentOptions | 否 |
回應
回傳:Option[FlagCommentResponse]
範例

取得評論 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 |
回應
返回:Option[APIGetCommentResponse]
範例

取得評論列表 
參數
| 名稱 | 類型 | 必需 | 說明 |
|---|---|---|---|
| tenantId | string | 是 | |
| options | GetCommentsOptions | 否 |
回應
返回:Option[APIGetCommentsResponse]
範例

取得公開評論列表 
req tenantId urlId
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenantId | string | 是 | |
| urlId | string | 是 | |
| options | GetCommentsPublicOptions | 否 |
回應
返回:Option[GetCommentsResponseWithPresencePublicComment]
範例

取得評論文字 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenantId | string | 是 | |
| commentId | string | 是 | |
| options | GetCommentTextOptions | 否 |
回應
返回:Option[PublicAPIGetCommentTextResponse]
範例

取得評論投票者名稱 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenantId | string | Yes | |
| commentId | string | Yes | |
| dir | int | No | |
| sso | string = "" | No |
回應
返回:Option[GetCommentVoteUserNamesSuccessResponse]
範例

鎖定評論 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenantId | string | Yes | |
| commentId | string | Yes | |
| broadcastId | string | No | |
| sso | string = "" | No |
回應
範例

置頂評論 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| commentId | string | 是 | |
| broadcastId | string | 否 | |
| sso | string = "" | 否 |
回應
返回:Option[ChangeCommentPinStatusResponse]
範例

儲存評論 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenantId | string | 是 | |
| createCommentParams | CreateCommentParams | 否 | |
| options | SaveCommentOptions | 否 |
回應
Returns: Option[APISaveCommentResponse]
範例

批次儲存評論 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | Yes | |
| createCommentParams | seq[CreateCommentParams] | No | |
| options | SaveCommentsBulkOptions): (Option[seq[SaveCommentsBulkResponse]] | No | |
| id | string | No | |
| fromName | string | No |
回應
範例

設定評論文字 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenantId | string | 是 | |
| commentId | string | 是 | |
| broadcastId | string | 否 | |
| commentTextUpdateRequest | CommentTextUpdateRequest | 否 | |
| options | SetCommentTextOptions | 否 |
回應
Returns: Option[PublicAPISetCommentTextResponse]
範例

取消從評論封鎖使用者 
參數
| 名稱 | 型別 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| unBlockFromCommentParams | UnBlockFromCommentParams | 否 | |
| options | UnBlockUserFromCommentOptions | 否 |
回應
範例

取消檢舉評論 
參數
| 名稱 | 類型 | 必要 | 描述 |
|---|---|---|---|
| tenantId | string | Yes | |
| id | string | No | |
| options | UnFlagCommentOptions | No |
回應
返回:Option[FlagCommentResponse]
範例

解除鎖定評論 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenantId | string | 是 | |
| commentId | string | 是 | |
| broadcastId | string | 否 | |
| sso | string = "" | 否 |
回應
範例

取消置頂評論 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | Yes | |
| commentId | string | Yes | |
| broadcastId | string | No | |
| sso | string = "" | No |
回應
Returns: Option[ChangeCommentPinStatusResponse]
範例

更新評論 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| updatableCommentParams | UpdatableCommentParams | 否 | |
| options | UpdateCommentOptions | 否 |
回應
範例

對評論投票 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenantId | string | 是 | |
| commentId | string | 是 | |
| urlId | string | 是 | |
| broadcastId | string | 否 | |
| voteBodyParams | VoteBodyParams | 否 | |
| options | VoteCommentOptions | 否 |
回應
範例

取得使用者的評論 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| options | GetCommentsForUserOptions | No |
回應
回傳: Option[GetCommentsForUserResponse]
範例

新增網域設定 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | Yes | |
| addDomainConfigParams | AddDomainConfigParams | No |
回應
返回: Option[AddDomainConfigResponse]
範例

刪除網域設定 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| domain | string | 否 |
回應
返回: Option[DeleteDomainConfigResponse]
範例

取得網域設定 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| domain | string | 否 |
回應
返回: Option[GetDomainConfigResponse]
範例

取得所有網域設定 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenantId | string | Yes |
回應
返回:Option[GetDomainConfigsResponse]
範例

部分更新網域設定 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenantId | string | Yes | |
| domainToUpdate | string | No | |
| patchDomainConfigParams | PatchDomainConfigParams | No |
回應
返回:Option[PatchDomainConfigResponse]
範例

取代網域設定 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | Yes | |
| domainToUpdate | string | No | |
| updateDomainConfigParams | UpdateDomainConfigParams | No |
回應
Returns: Option[PutDomainConfigResponse]
範例

建立電子郵件範本 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | Yes | |
| createEmailTemplateBody | CreateEmailTemplateBody | No |
回應
回傳: Option[CreateEmailTemplateResponse]
範例

刪除電子郵件範本 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenantId | string | Yes | |
| id | string | No |
回應
示例

刪除電子郵件範本渲染錯誤 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | Yes | |
| id | string | No | |
| errorId | string | No |
回應
範例

取得電子郵件範本 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | Yes | |
| id | string | No |
回應
Returns: Option[GetEmailTemplateResponse]
範例

取得電子郵件範本定義 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenantId | string | 是 |
回應
返回: Option[GetEmailTemplateDefinitionsResponse]
範例

取得電子郵件範本渲染錯誤 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| skip | float64 | 否 |
回應
回傳: Option[GetEmailTemplateRenderErrorsResponse]
範例

取得電子郵件範本列表 
參數
| Name | Type | Required | Description |
|---|---|---|---|
| tenantId | string | Yes | |
| skip | float64 | No |
回應
返回: Option[GetEmailTemplatesResponse]
範例

渲染電子郵件範本 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenantId | string | 是 | |
| renderEmailTemplateBody | RenderEmailTemplateBody | 否 | |
| locale | string = "" | 否 |
回應
返回:Option[RenderEmailTemplateResponse]
範例

更新電子郵件範本 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| id | string | 否 | |
| updateEmailTemplateBody | UpdateEmailTemplateBody | 否 |
回應
範例

取得事件日誌 
req tenantId urlId userIdWS
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenantId | string | Yes | |
| urlId | string | Yes | |
| userIdWS | string | No | |
| startTime | int64 | No | |
| endTime | int64 | No |
回應
回傳: Option[GetEventLogResponse]
範例

取得全域事件日誌 
req tenantId urlId userIdWS
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenantId | string | 是 | |
| urlId | string | 是 | |
| userIdWS | string | 否 | |
| startTime | int64 | 否 | |
| endTime | int64 | 否 |
回應
返回:Option[GetEventLogResponse]
範例

建立動態貼文 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | 是 | |
| createFeedPostParams | CreateFeedPostParams | 否 | |
| options | CreateFeedPostOptions | 否 |
回應
返回:Option[CreateFeedPostsResponse]
範例

建立公開動態貼文 
參數
| 名稱 | 類型 | 必填 | 描述 |
|---|---|---|---|
| tenantId | string | Yes | |
| createFeedPostParams | CreateFeedPostParams | No | |
| options | CreateFeedPostPublicOptions | No |
回應
返回:Option[CreateFeedPostResponse]
範例

刪除公開動態貼文 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenantId | string | 是 | |
| postId | string | 否 | |
| options | DeleteFeedPostPublicOptions | 否 |
回應
返回: Option[DeleteFeedPostPublicResponse]
範例

取得動態貼文 
req tenantId afterId
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenantId | string | 是 | |
| options | GetFeedPostsOptions | 否 |
回應
返回:Option[GetFeedPostsResponse]
範例

取得公開動態貼文 
請求 tenantId afterId
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenantId | string | 是 | |
| options | GetFeedPostsPublicOptions | 否 |
回應
Returns: Option[PublicFeedPostsResponse]
範例

取得動態貼文統計 
參數
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| tenantId | string | 是 | |
| postIds | seq[string] | 否 | |
| sso | string = "" | 否 |
回應
Returns: Option[FeedPostsStatsResponse]
範例
