
Jezik 🇭🇷 Hrvatski
Dokumentacija
Početak rada
Referenca API-ja
Upotreba
Agregacija
Revizijski zapisi
Autentikacija
Blokiranje komentara
Provjera blokiranih komentara
Komentari
Komentari za korisnika
Konfiguracije domene
Predlošci e-pošte
Dnevnik događaja
Objave u feedu
Označavanje komentara
GIF-ovi
Hashtagovi
Moderacija
Moderatori
Broj obavijesti
Obavijesti
Reakcije stranice
Stranice
Webhook događaji na čekanju
Konfiguracije pitanja
Rezultati pitanja
Agregacija rezultata pitanja
SSO korisnici
Pretplate
Dnevna uporaba najmoprimca
Paketi najmoprimca
Korisnici najmoprimca
Najmoprimci
Ulaznice
Prijevodi
Učitaj sliku
Napredak značke korisnika
Značke korisnika
Korisničke obavijesti
Status prisutnosti korisnika
Pretraga korisnika
Korisnici
Glasovi
FastComments Nim SDK
Ovo je službeni Nim SDK za FastComments.
Službeni Nim SDK za FastComments API
Repozitorij
Instalacija 
Korištenje Nimble
nimble install fastcomments
Izgradnja iz izvornog koda
nimble build
Sadržaj knjižnice
Ova knjižnica sadrži generiranog API klijenta i SSO alate koji olakšavaju rad s API‑jem.
Javne vs. zaštićene API‑je
Za API klijenta postoje tri API modula, api_default, api_public i api_moderation. api_default sadrži metode koje zahtijevaju vaš API ključ, a api_public sadrži API pozive koji se mogu izravno izvršiti iz preglednika/mobilnog uređaja itd. bez autentifikacije. Modul api_moderation sadrži metode za nadzornu nadzornu ploču.
Modul api_moderation pruža opsežan skup API‑ja za brzu i neposrednu moderaciju. Svaka metoda api_moderation prihvaća parametar sso i može se autentificirati putem SSO‑a ili kolačića sesije FastComments.com.
Brzi početak 
Korištenje autentificiranih API‑ja (DefaultAPI)
Važno: Autentificirani krajnji točke zahtijevaju da vaš API ključ bude postavljen kao zaglavlje 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"
# Napravite autentificirane API pozive.
# Potrebni parametri (i tijelo zahtjeva) su pozicijski; opcionalni
# parametri se prosljeđuju putem objekta opcija operacije.
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"
Korištenje javnih API‑ja (PublicAPI)
Javne krajnje točke ne zahtijevaju autentifikaciju:
import httpclient
import fastcomments
import fastcomments/apis/api_public
let client = newHttpClient()
# Napravite javne API pozive.
# tenantId i urlId su zahtjevani (pozicijski); sve ostalo je opcionalno.
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"
Korištenje moderacijskih API‑ja (ModerationAPI)
Moderacijske krajnje točke napajaju moderacijsku nadzornu ploču i autentificirane su SSO tokenom za djelujućeg moderatora:
import httpclient
import fastcomments
import fastcomments/apis/api_moderation
let client = newHttpClient()
# Popis komentara u moderacijskoj nadzornoj ploči.
# Ova operacija nema obavezne parametre, pa je sve opcionalno.
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"
Uobičajeni problemi
- 401 greška autentifikacije: Provjerite jeste li postavili zaglavlje
x-api-keyna vaš HttpClient prije slanja DefaultAPI zahtjeva:client.headers["x-api-key"] = "your-api-key" - Pogrešna API klasa: Koristite
api_defaultza server‑side autentificirane zahtjeve,api_publicza client‑side/javne zahtjeve iapi_moderationza zahtjeve moderacijske nadzorne ploče.
Izvođenje API poziva 
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.
Primjer: Dohvaćanje komentara
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"
Bilješke 
Broadcast ID-ovi
Vidjet ćete da trebate proslijediti broadcastId u nekim API pozivima. Kada primite događaje, vratit će vam se ovaj ID, pa ćete znati zanemariti događaj ako planirate optimistično primijeniti promjene na klijentu (što ćete vjerojatno htjeti učiniti jer pruža najbolje iskustvo). Ovdje proslijedite UUID. ID bi trebao biti dovoljno jedinstven da se ne pojavi dvaput u istoj sesiji preglednika.
SSO (Jedinstvena prijava)
Za primjere SSO-a, pogledajte dolje.
Korištenje SSO-a 
Jednostavni 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
Sigurni 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
Dokumentacija za fastcomments 
Dokumentacija za API krajnje točke
All URIs are relative to https://fastcomments.com
| Class | Method | HTTP request | Description |
|---|---|---|---|
| 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 | Agregira dokumente grupiranjem (ako je naveden groupBy) i primjenom višestrukih operacija. Podržane su različite operacije (npr. sum, countDistinct, avg, itd.). |
| 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 | Prethodni komentatori na stranici koji NISU trenutno online. Sortirano po displayName. Koristite ovo nakon iscrpljivanja /users/online za prikaz odjeljka „Članovi“. Paginacija po ime komentatora: poslužitelj prolazi kroz parcijalni indeks {tenantId, urlId, commenterName} od afterName naprijed putem $gt, bez $skip troška. |
| PublicApi | getOnlineUsers | GET /pages/{tenantId}/users/online | Trenutno online gledatelji stranice: ljudi čija websocket sesija trenutno pretplaćena na stranicu. Vraća anonCount + totalCount (pretplatnici cijele sobe, uključujući anonimne gledatelje koje ne nabrajamo). |
| PublicApi | getPagesPublic | GET /pages/{tenantId} | Popis stranica za najmodavca. Koristi se u FChat desktop klijentu za popunjavanje popisa soba. Potrebno je da enableFChat bude true u razriješenoj prilagođenoj konfiguraciji za svaku stranicu. Stranice koje zahtijevaju SSO filtrirane su prema grupnom pristupu korisnika koji zahtijeva. |
| 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 | Skupni podaci o korisnicima za najmodavca. Dajući userIds, vraća prikazne informacije iz User / SSOUser. Koristi se u widgetu komentara za obogaćivanje korisnika koji su upravo pojavljeni putem događaja prisutnosti. Nema kontekst stranice: privatnost se jednako primjenjuje (privatni profili maskirani su). |
| 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} | Omogući ili onemogući obavijesti za određeni komentar. |
| PublicApi | updateUserNotificationPageSubscriptionStatus | POST /user-notifications/set-subscription-state/{subscribedOrUnsubscribed} | Omogući ili onemogući obavijesti za stranicu. Kad su korisnici pretplaćeni na stranicu, stvaraju se obavijesti za nove korijenske komentare, i također |
| PublicApi | updateUserNotificationStatus | POST /user-notifications/{notificationId}/mark/{newStatus} | |
| PublicApi | uploadImage | POST /upload-image/{tenantId} | Prenesi i promijeni veličinu slike |
| PublicApi | voteComment | POST /comments/{tenantId}/{commentId}/vote |
Dokumentacija za modele
- 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
- BannedUserMatch
- BannedUserMatchType
- BannedUserMatch_matchedOnValue
- BillingInfo
- BlockFromCommentParams
- BlockSuccess
- BuildModerationFilterParams
- BuildModerationFilterResponse
- BulkAggregateQuestionItem
- BulkAggregateQuestionResultsRequest
- BulkAggregateQuestionResultsResponse
- BulkCreateHashTagsBody
- BulkCreateHashTagsBody_tags_inner
- BulkCreateHashTagsResponse
- BulkCreateHashTagsResponse_results_inner
- BulkPreBanParams
- BulkPreBanSummary
- ChangeCommentPinStatusResponse
- ChangeTicketStateBody
- ChangeTicketStateResponse
- CheckBlockedCommentsResponse
- CombineQuestionResultsWithCommentsResponse
- CommentData
- CommentHTMLRenderingMode
- CommentLogData
- CommentLogEntry
- CommentLogType
- CommentQuestionResultsRenderingType
- CommentQuestionsRequired
- CommentTextUpdateRequest
- CommentThreadDeletionMode
- CommentUserBadgeInfo
- CommentUserHashTagInfo
- CommentUserMentionInfo
- CommenterNameFormats
- CommentsByIdsParams
- CreateAPIPageData
- CreateAPISSOUserData
- CreateAPIUserSubscriptionData
- CreateCommentParams
- CreateEmailTemplateBody
- CreateEmailTemplateResponse
- CreateFeedPostParams
- CreateFeedPostResponse
- CreateFeedPostsResponse
- [CreateHashTagBody](https://github.com/FastComments/fastcomments-n
aggregate 
Aggregates documents by grouping them (if groupBy is provided) and applying multiple operations.
Different operations (e.g. sum, countDistinct, avg, etc.) are supported.
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da | |
| aggregationRequest | AggregationRequest | Ne | |
| options | AggregateOptions | Ne |
Odgovor
Vraća: Option[AggregateResponse]
Primjer

getAuditLogs 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da | |
| options | GetAuditLogsOptions | Ne |
Odgovor
Vraća: Option[GetAuditLogsResponse]
Primjer

logoutPublic 
Odgovor
Vraća: Option[APIEmptyResponse]
Primjer

blockFromCommentPublic 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da | |
| commentId | string | Da | |
| publicBlockFromCommentParams | PublicBlockFromCommentParams | Ne | |
| sso | string = "" | Ne |
Odgovor
Vraća: Option[BlockSuccess]
Primjer

unBlockCommentPublic 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da | |
| commentId | string | Da | |
| publicBlockFromCommentParams | PublicBlockFromCommentParams | Ne | |
| sso | string = "" | Ne |
Odgovor
Returns: Option[UnblockSuccess]
Primjer

checkedCommentsForBlocked 
Parametri
| Ime | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Yes | |
| commentIds | string | No | |
| sso | string = "" | No |
Odgovor
Vraća: Option[CheckBlockedCommentsResponse]
Primjer

blockUserFromComment 
Parametri
| Ime | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da | |
| id | string | Ne | |
| blockFromCommentParams | BlockFromCommentParams | Ne | |
| options | BlockUserFromCommentOptions | Ne |
Odgovor
Vraća: Option[BlockSuccess]
Primjer

createCommentPublic 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da | |
| urlId | string | Da | |
| broadcastId | string | Ne | |
| commentData | CommentData | Ne | |
| options | CreateCommentPublicOptions | Ne |
Odgovor
Vraća: Option[SaveCommentsResponseWithPresence]
Primjer

deleteComment 
Parametri
| Ime | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Yes | |
| id | string | No | |
| options | DeleteCommentOptions | No |
Odgovor
Vraća: Option[DeleteCommentResult]
Primjer

deleteCommentPublic 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Yes | |
| commentId | string | Yes | |
| broadcastId | string | No | |
| options | DeleteCommentPublicOptions | No |
Odgovor
Vraća: Option[PublicAPIDeleteCommentResponse]
Primjer

deleteCommentVote 
Parametri
| Ime | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Yes | |
| commentId | string | Yes | |
| voteId | string | No | |
| urlId | string | Yes | |
| broadcastId | string | No | |
| options | DeleteCommentVoteOptions | No |
Odgovor
Vraća: Option[VoteDeleteResponse]
Primjer

flagComment 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Yes | |
| id | string | No | |
| options | FlagCommentOptions | No |
Odgovor
Vraća: Option[FlagCommentResponse]
Primjer

getComment 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da | |
| id | string | Ne |
Odgovor
Returns: Option[APIGetCommentResponse]
Primjer

getComments 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Yes | |
| options | GetCommentsOptions | No |
Odgovor
Vraća: Option[APIGetCommentsResponse]
Primjer

getCommentsPublic 
req tenantId urlId
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da | |
| urlId | string | Da | |
| options | GetCommentsPublicOptions | Ne |
Odgovor
Vraća: Option[GetCommentsResponseWithPresencePublicComment]
Primjer

getCommentText 
Parametri
| Ime | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Yes | |
| commentId | string | Yes | |
| options | GetCommentTextOptions | No |
Odgovor
Vraća: Option[PublicAPIGetCommentTextResponse]
Primjer

getCommentVoteUserNames 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da | |
| commentId | string | Da | |
| dir | int | Ne | |
| sso | string = "" | Ne |
Odgovor
Vraća: Option[GetCommentVoteUserNamesSuccessResponse]
Primjer

lockComment 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da | |
| commentId | string | Da | |
| broadcastId | string | Ne | |
| sso | string = "" | Ne |
Odgovor
Vraća: Option[APIEmptyResponse]
Primjer

pinComment 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Yes | |
| commentId | string | Yes | |
| broadcastId | string | No | |
| sso | string = "" | No |
Odgovor
Vraća: Option[ChangeCommentPinStatusResponse]
Primjer

saveComment 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Yes | |
| createCommentParams | CreateCommentParams | No | |
| options | SaveCommentOptions | No |
Odgovor
Vraća: Option[APISaveCommentResponse]
Primjer

saveCommentsBulk 
Parametri
| Ime | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Yes | |
| createCommentParams | seq[CreateCommentParams] | No | |
| options | SaveCommentsBulkOptions): (Option[seq[SaveCommentsBulkResponse]] | No | |
| id | string | No | |
| fromName | string | No |
Odgovor
Vraća: Option[APIEmptyResponse]
Primjer

setCommentText 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Yes | |
| commentId | string | Yes | |
| broadcastId | string | No | |
| commentTextUpdateRequest | CommentTextUpdateRequest | No | |
| options | SetCommentTextOptions | No |
Odgovor
Vraća: Option[PublicAPISetCommentTextResponse]
Primjer

unBlockUserFromComment 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Yes | |
| id | string | No | |
| unBlockFromCommentParams | UnBlockFromCommentParams | No | |
| options | UnBlockUserFromCommentOptions | No |
Odgovor
Vraća: Option[UnblockSuccess]
Primjer

unFlagComment 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Yes | |
| id | string | No | |
| options | UnFlagCommentOptions | No |
Odgovor
Vraća: Option[FlagCommentResponse]
Primjer

unLockComment 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da | |
| commentId | string | Da | |
| broadcastId | string | Ne | |
| sso | string = "" | Ne |
Odgovor
Vraća: Option[APIEmptyResponse]
Primjer

unPinComment 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da | |
| commentId | string | Da | |
| broadcastId | string | Ne | |
| sso | string = "" | Ne |
Odgovor
Vraća: Option[ChangeCommentPinStatusResponse]
Primjer

updateComment 
Parameters
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Yes | |
| id | string | No | |
| updatableCommentParams | UpdatableCommentParams | No | |
| options | UpdateCommentOptions | No |
Response
Vraća: Option[APIEmptyResponse]
Example

voteComment 
Parametri
| Name | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da | |
| commentId | string | Da | |
| urlId | string | Da | |
| broadcastId | string | Ne | |
| voteBodyParams | VoteBodyParams | Ne | |
| options | VoteCommentOptions | Ne |
Odgovor
Vraća: Option[VoteResponse]
Primjer

getCommentsForUser 
Parametri
| Ime | Tip | Obavezno | Opis |
|---|---|---|---|
| options | GetCommentsForUserOptions | Ne |
Odgovor
Vraća: Option[GetCommentsForUserResponse]
Primjer

addDomainConfig 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da | |
| addDomainConfigParams | AddDomainConfigParams | Ne |
Odgovor
Vraća: Option[AddDomainConfigResponse]
Primjer

deleteDomainConfig 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da | |
| domain | string | Ne |
Odgovor
Vraća: Option[DeleteDomainConfigResponse]
Primjer

getDomainConfig 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Yes | |
| domain | string | No |
Odgovor
Vraća: Option[GetDomainConfigResponse]
Primjer

getDomainConfigs 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da |
Odgovor
Vraća: Option[GetDomainConfigsResponse]
Primjer

patchDomainConfig 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Yes | |
| domainToUpdate | string | No | |
| patchDomainConfigParams | PatchDomainConfigParams | No |
Odgovor
Vraća: Option[PatchDomainConfigResponse]
Primjer

putDomainConfig 
Parametri
| Ime | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Yes | |
| domainToUpdate | string | No | |
| updateDomainConfigParams | UpdateDomainConfigParams | No |
Odgovor
Vraća: Option[PutDomainConfigResponse]
Primjer

createEmailTemplate 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da | |
| createEmailTemplateBody | CreateEmailTemplateBody | Ne |
Odgovor
Vraća: Option[CreateEmailTemplateResponse]
Primjer

deleteEmailTemplate 
Parameters
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da | |
| id | string | Ne |
Response
Vraća: Option[APIEmptyResponse]
Primjer

deleteEmailTemplateRenderError 
Parametri
| Ime | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da | |
| id | string | Ne | |
| errorId | string | Ne |
Odgovor
Vraća: Option[APIEmptyResponse]
Primjer

getEmailTemplate 
Parametri
| Ime | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da | |
| id | string | Ne |
Odgovor
Vraća: Option[GetEmailTemplateResponse]
Primjer

getEmailTemplateDefinitions 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da |
Odgovor
Vraća: Option[GetEmailTemplateDefinitionsResponse]
Primjer

getEmailTemplateRenderErrors 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Yes | |
| id | string | No | |
| skip | float64 | No |
Odgovor
Vraća: Option[GetEmailTemplateRenderErrorsResponse]
Primjer

getEmailTemplates 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da | |
| skip | float64 | Ne |
Odgovor
Vraća: Option[GetEmailTemplatesResponse]
Primjer

renderEmailTemplate 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da | |
| renderEmailTemplateBody | RenderEmailTemplateBody | Ne | |
| locale | string = "" | Ne |
Odgovor
Vraća: Option[RenderEmailTemplateResponse]
Primjer

updateEmailTemplate 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da | |
| id | string | Ne | |
| updateEmailTemplateBody | UpdateEmailTemplateBody | Ne |
Odgovor
Vraća: Option[APIEmptyResponse]
Primjer

getEventLog 
req tenantId urlId userIdWS
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da | |
| urlId | string | Da | |
| userIdWS | string | Ne | |
| startTime | int64 | Ne | |
| endTime | int64 | Ne |
Odgovor
Vraća: Option[GetEventLogResponse]
Primjer

getGlobalEventLog 
req tenantId urlId userIdWS
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da | |
| urlId | string | Da | |
| userIdWS | string | Ne | |
| startTime | int64 | Ne | |
| endTime | int64 | Ne |
Odgovor
Vraća: Option[GetEventLogResponse]
Primjer

createFeedPost 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da | |
| createFeedPostParams | CreateFeedPostParams | Ne | |
| options | CreateFeedPostOptions | Ne |
Odgovor
Vraća: Option[CreateFeedPostsResponse]
Primjer

createFeedPostPublic 
Parametri
| Ime | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da | |
| createFeedPostParams | CreateFeedPostParams | Ne | |
| options | CreateFeedPostPublicOptions | Ne |
Odgovor
Vraća: Option[CreateFeedPostResponse]
Primjer

deleteFeedPostPublic 
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Yes | |
| postId | string | No | |
| options | DeleteFeedPostPublicOptions | No |
Odgovor
Vraća: Option[DeleteFeedPostPublicResponse]
Primjer

getFeedPosts 
req tenantId afterId
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da | |
| options | GetFeedPostsOptions | Ne |
Odgovor
Vraća: Option[GetFeedPostsResponse]
Primjer

getFeedPostsPublic 
req tenantId afterId
Parametri
| Naziv | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da | |
| options | GetFeedPostsPublicOptions | Ne |
Odgovor
Vraća: Option[PublicFeedPostsResponse]
Primjer

getFeedPostsStats 
Parametri
| Ime | Tip | Obavezno | Opis |
|---|---|---|---|
| tenantId | string | Da | |
| postIds | seq[string] | Ne | |
| sso | string = "" | Ne |
Odgovor
Vraća: Option[FeedPostsStatsResponse]
Primjer
