FastComments.com

FastComments Nim SDK


Dies ist das offizielle Nim-SDK für FastComments.

Offizielles Nim-SDK für die FastComments-API

Repository

Auf GitHub ansehen


Voraussetzungen Internal Link


  • Nim >= 1.6.0
  • nimcrypto >= 0.5.4

Installation Internal Link

Verwendung von Nimble

nimble install fastcomments

Aus dem Quellcode bauen

nimble build

Inhalt der Bibliothek

Diese Bibliothek enthält den generierten API-Client und die SSO-Dienstprogramme, um die Arbeit mit der API zu erleichtern.

Öffentliche vs. gesicherte APIs

Für den API-Client gibt es zwei API-Module, api_default und api_public. Das api_default enthält Methoden, die Ihren API-Schlüssel erfordern, und api_public enthält API-Aufrufe, die direkt aus einem Browser/Mobilgerät/etc. ohne Authentifizierung vorgenommen werden können.

Schnellstart Internal Link

Verwendung authentifizierter APIs (DefaultAPI)

Wichtig: Authentifizierte Endpunkte erfordern, dass Ihr API-Schlüssel als x-api-key Header gesetzt ist.

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"

# Authentifizierte API-Aufrufe durchführen
let (response, httpResponse) = getComments(
  httpClient = client,
  tenantId = "your-tenant-id",
  page = 0,
  limit = 0,
  skip = 0,
  asTree = false,
  skipChildren = 0,
  limitChildren = 0,
  maxTreeDepth = 0,
  urlId = "your-url-id",
  userId = "",
  anonUserId = "",
  contextUserId = "",
  hashTag = "",
  parentId = "",
  direction = SortDirections.DESC
)

if response.isSome:
  let resp = response.get()
  if resp.comments.isSome:
    echo "Found ", resp.comments.get().len, " comments"

Verwendung öffentlicher APIs (PublicAPI)

Öffentliche Endpunkte erfordern keine Authentifizierung:

import httpclient
import fastcomments
import fastcomments/apis/api_public

let client = newHttpClient()

# Öffentliche API-Aufrufe durchführen
let (response, httpResponse) = getCommentsPublic(
  httpClient = client,
  tenantId = "your-tenant-id",
  urlId = "your-url-id",
  page = 0,
  direction = SortDirections.DESC,
  sso = "",
  skip = 0,
  skipChildren = 0,
  limit = 0,
  limitChildren = 0,
  countChildren = false,
  fetchPageForCommentId = "",
  includeConfig = false,
  countAll = false,
  includei10n = false,
  locale = "",
  modules = "",
  isCrawler = false,
  includeNotificationCount = false,
  asTree = false,
  maxTreeDepth = 0,
  useFullTranslationIds = false,
  parentId = "",
  searchText = "",
  hashTags = @[],
  userId = "",
  customConfigStr = "",
  afterCommentId = "",
  beforeCommentId = ""
)

if response.isSome:
  let resp = response.get()
  if resp.comments.isSome:
    echo "Found ", resp.comments.get().len, " comments"

Häufige Probleme

  1. 401 Authentifizierungsfehler: Stellen Sie sicher, dass Sie den x-api-key-Header in Ihrem HttpClient setzen, bevor Sie DefaultAPI-Anfragen stellen: client.headers["x-api-key"] = "your-api-key"
  2. Falsche API-Klasse: Verwenden Sie api_default für serverseitige authentifizierte Anfragen, api_public für clientseitige/öffentliche Anfragen.

API-Aufrufe durchführen Internal Link

Alle API-Methoden in diesem SDK geben Tupel von (Option[ResponseType], Response) zurück. Das erste Element enthält die geparste Antwort, falls erfolgreich, und das zweite Element ist die rohe HTTP-Antwort.

Beispiel: Kommentare abrufen

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",
  page = 0,
  limit = 0,
  skip = 0,
  asTree = false,
  skipChildren = 0,
  limitChildren = 0,
  maxTreeDepth = 0,
  urlId = "your-url-id",
  userId = "",
  anonUserId = "",
  contextUserId = "",
  hashTag = "",
  parentId = "",
  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"

Hinweise Internal Link

Broadcast-IDs

Sie werden sehen, dass Sie in einigen API-Aufrufen ein broadcastId übergeben sollen. Wenn Sie Ereignisse erhalten, bekommen Sie diese ID zurück, sodass Sie das Ereignis ignorieren können, falls Sie Änderungen optimistisch auf dem Client anwenden möchten (was Sie wahrscheinlich tun werden, da es die beste Nutzererfahrung bietet). Übergeben Sie hier eine UUID. Die ID sollte eindeutig genug sein, um in einer Browsersitzung nicht zweimal aufzutreten.

SSO (Single Sign-On)

Für SSO-Beispiele siehe unten.

SSO-Nutzung Internal Link


Einfaches 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

Sicheres 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

Aggregation Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
aggregationRequest AggregationRequest Nein
parentTenantId string Nein
includeStats bool Nein

Antwort

Gibt zurück: Option[AggregationResponse]

Beispiel

Beispiel für aggregate
Copy Copy
1
2let (response, httpResponse) = client.aggregate(
3 tenantId = "my-tenant-123",
4 aggregationRequest = AggregationRequest(),
5 parentTenantId = "",
6 includeStats = false
7)
8if response.isSome:
9 let aggregation = response.get()
10 echo $aggregation
11

Audit-Logs abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
limit float64 Nein
skip float64 Nein
order SORTDIR Nein
after float64 Nein
before float64 Nein

Antwort

Gibt zurück: Option[GetAuditLogs_200_response]

Beispiel

Beispiel für getAuditLogs
Copy Copy
1
2let (response, httpResponse) = client.getAuditLogs(
3 tenantId = "my-tenant-123",
4 limit = 100.0,
5 skip = 0.0,
6 order = SORTDIR(0),
7 after = 0.0,
8 before = 0.0
9)
10if response.isSome:
11 let audit = response.get()
12 echo audit
13

Vom Kommentar blockieren (öffentlich) Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
commentId string Ja
publicBlockFromCommentParams PublicBlockFromCommentParams Nein
sso string Nein

Antwort

Gibt zurück: Option[BlockFromCommentPublic_200_response]

Beispiel

blockFromCommentPublic Beispiel
Copy Copy
1
2let (response, httpResponse) = client.blockFromCommentPublic(
3 tenantId = "my-tenant-123",
4 commentId = "comment-987654",
5 publicBlockFromCommentParams = PublicBlockFromCommentParams(),
6 sso = "sso-token-7a9b3c"
7)
8if response.isSome:
9 let blockResult = response.get()
10 discard blockResult
11

Blockierung für Kommentar aufheben (öffentlich) Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Yes
commentId string Yes
publicBlockFromCommentParams PublicBlockFromCommentParams No
sso string No

Antwort

Gibt zurück: Option[UnBlockCommentPublic_200_response]

Beispiel

Beispiel für unBlockCommentPublic
Copy Copy
1
2let (response, httpResponse) = client.unBlockCommentPublic(
3 tenantId = "news-site-456",
4 commentId = "comment-abc123",
5 publicBlockFromCommentParams = PublicBlockFromCommentParams{},
6 sso = ""
7)
8if response.isSome:
9 let unblocked = response.get()
10 discard unblocked
11else:
12 discard httpResponse
13

Kommentare auf Sperrung prüfen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Yes
commentIds string No
sso string No

Antwort

Gibt zurück: Option[CheckedCommentsForBlocked_200_response]

Beispiel

Beispiel für checkedCommentsForBlocked
Copy Copy
1
2let (response, httpResponse) = client.checkedCommentsForBlocked(
3 tenantId = "my-tenant-123",
4 commentIds = "",
5 sso = ""
6)
7if response.isSome:
8 let checked = response.get()
9 echo "Checked comments received for tenant my-tenant-123"
10 echo checked
11else:
12 echo "No checked comments (HTTP status: ", $httpResponse.statusCode, ")"
13

Benutzer vom Kommentar blockieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein
blockFromCommentParams BlockFromCommentParams Nein
userId string Nein
anonUserId string Nein

Antwort

Gibt zurück: Option[BlockFromCommentPublic_200_response]

Beispiel

blockUserFromComment Beispiel
Copy Copy
1
2let (response, httpResponse) = client.blockUserFromComment(
3 tenantId = "my-tenant-123",
4 id = "comment-98765",
5 blockFromCommentParams = BlockFromCommentParams(),
6 userId = "user-456",
7 anonUserId = ""
8)
9if response.isSome:
10 let blocked = response.get()
11 echo "Block confirmed for tenant:", " my-tenant-123"
12

Kommentar erstellen (öffentlich) Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
urlId string Ja
broadcastId string Nein
commentData CommentData Nein
sessionId string Nein
sso string Nein

Antwort

Gibt zurück: Option[CreateCommentPublic_200_response]

Beispiel

createCommentPublic Beispiel
Copy Copy
1
2let (response, httpResponse) = client.createCommentPublic(
3 tenantId = "my-tenant-123",
4 urlId = "news/breaking-elections-2025",
5 broadcastId = "broadcast-456",
6 commentData = CommentData(
7 content = "Great reporting — thanks for the clear analysis!",
8 authorName = "Jane Doe",
9 authorEmail = "jane.doe@example.com",
10 isVerified = false,
11 tags = @["politics", "analysis"]
12 ),
13 sessionId = "session-789",
14 sso = "sso-token-abc123"
15)
16
17if response.isSome:
18 let created = response.get()
19 echo "Created comment:", created
20else:
21 echo "No comment returned, HTTP status: ", httpResponse.status`
22

Kommentar löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein
contextUserId string Nein
isLive bool Nein

Antwort

Gibt zurück: Option[DeleteComment_200_response]

Beispiel

deleteComment Beispiel
Copy Copy
1
2let (response, httpResponse) = client.deleteComment(tenantId = "my-tenant-123", id = "cmt-456abc", contextUserId = "user-789", isLive = true)
3if response.isSome:
4 let deleted = response.get()
5 discard deleted
6 echo "Delete succeeded"
7else:
8 echo "No delete response"
9

Kommentar löschen (öffentlich) Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
commentId string Ja
broadcastId string Nein
editKey string Nein
sso string Nein

Antwort

Gibt zurück: Option[DeleteCommentPublic_200_response]

Beispiel

Beispiel für deleteCommentPublic
Copy Copy
1
2let (response, httpResponse) = client.deleteCommentPublic(
3 tenantId = "my-tenant-123",
4 commentId = "cmt-987654",
5 broadcastId = "",
6 editKey = "",
7 sso = ""
8)
9if response.isSome:
10 let deleted = response.get()
11 echo "Delete succeeded"
12 echo "HTTP status: ", httpResponse.status
13else:
14 echo "Delete failed, HTTP status: ", httpResponse.status
15

Kommentar-Vote löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
commentId string Ja
voteId string Nein
urlId string Ja
broadcastId string Nein
editKey string Nein
sso string Nein

Antwort

Gibt zurück: Option[DeleteCommentVote_200_response]

Beispiel

deleteCommentVote Beispiel
Copy Copy
1
2let (response, httpResponse) = client.deleteCommentVote(
3 tenantId = "my-tenant-123",
4 commentId = "cmt-789",
5 voteId = "",
6 urlId = "news/breaking-story-2025",
7 broadcastId = "",
8 editKey = "",
9 sso = ""
10)
11if response.isSome:
12 let deleted = response.get()
13 discard deleted
14 echo "Vote removed for comment cmt-789"
15else:
16 echo "No response body returned"
17

Kommentar melden Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein
userId string Nein
anonUserId string Nein

Antwort

Gibt zurück: Option[FlagComment_200_response]

Beispiel

flagComment Beispiel
Copy Copy
1
2let (response, httpResponse) = client.flagComment(tenantId = "my-tenant-123", id = "cmt-98765", userId = "user-8342", anonUserId = "")
3if response.isSome:
4 let flagged = response.get()
5 echo "Flagged comment response: ", flagged
6else:
7 echo "Flag comment failed: ", httpResponse
8

Kommentar abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein

Antwort

Gibt zurück: Option[GetComment_200_response]

Beispiel

getComment-Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getComment(tenantId = "my-tenant-123", id = "cmt-987654321")
3if response.isSome:
4 let comment = response.get()
5 echo comment
6

Kommentare abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
page int Nein
limit int Nein
skip int Nein
asTree bool Nein
skipChildren int Nein
limitChildren int Nein
maxTreeDepth int Nein
urlId string Ja
userId string Nein
anonUserId string Nein
contextUserId string Nein
hashTag string Nein
parentId string Nein
direction SortDirections Nein

Antwort

Gibt zurück: Option[GetComments_200_response]

Beispiel

getComments Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getComments(
3 tenantId = "my-tenant-123",
4 page = 1,
5 limit = 20,
6 skip = 0,
7 asTree = false,
8 skipChildren = 0,
9 limitChildren = 0,
10 maxTreeDepth = 0,
11 urlId = "news/2025-election-night",
12 userId = "",
13 anonUserId = "",
14 contextUserId = "",
15 hashTag = "",
16 parentId = "",
17 direction = SortDirections.Desc
18)
19
20if response.isSome:
21 let comments = response.get()
22 echo "Status: ", httpResponse.status, " Comments: ", comments
23

Kommentare abrufen (öffentlich) Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
urlId string Ja
page int Nein
direction SortDirections Nein
sso string Nein
skip int Nein
skipChildren int Nein
limit int Nein
limitChildren int Nein
countChildren bool Nein
fetchPageForCommentId string Nein
includeConfig bool Nein
countAll bool Nein
includei10n bool Nein
locale string Nein
modules string Nein
isCrawler bool Nein
includeNotificationCount bool Nein
asTree bool Nein
maxTreeDepth int Nein
useFullTranslationIds bool Nein
parentId string Nein
searchText string Nein
hashTags seq[string] Nein
userId string Nein
customConfigStr string Nein
afterCommentId string Nein
beforeCommentId string Nein

Antwort

Gibt zurück: Option[GetCommentsPublic_200_response]

Beispiel

getCommentsPublic Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getCommentsPublic(
3 tenantId = "my-tenant-123",
4 urlId = "news/world/article-2025",
5 page = 1,
6 direction = SortDirections(0),
7 sso = "sso_token_abc",
8 skip = 0,
9 skipChildren = 0,
10 limit = 20,
11 limitChildren = 5,
12 countChildren = false,
13 fetchPageForCommentId = "cmt_789",
14 includeConfig = true,
15 countAll = false,
16 includei10n = true,
17 locale = "en-US",
18 modules = "reactions,moderation",
19 isCrawler = false,
20 includeNotificationCount = true,
21 asTree = true,
22 maxTreeDepth = 3,
23 useFullTranslationIds = false,
24 parentId = "parent_123",
25 searchText = "openAI integration",
26 hashTags = @["ai", "technology"],
27 userId = "user_456",
28 customConfigStr = "{}",
29 afterCommentId = "cmt_100",
30 beforeCommentId = ""
31)
32
33if response.isSome:
34 let comments = response.get()
35 discard comments
36else:
37 discard httpResponse
38

Kommentartext abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
commentId string Ja
editKey string Nein
sso string Nein

Antwort

Gibt zurück: Option[GetCommentText_200_response]

Beispiel

getCommentText Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getCommentText(tenantId = "my-tenant-123", commentId = "cmt-456789", editKey = "", sso = "")
3
4if response.isSome:
5 let comment = response.get()
6 echo "Comment text: ", $comment
7else:
8 echo "No comment returned"
9

Benutzernamen von Kommentar-Votes abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
commentId string Ja
dir int Nein
sso string Nein

Antwort

Gibt zurück: Option[GetCommentVoteUserNames_200_response]

Beispiel

Beispiel für getCommentVoteUserNames
Copy Copy
1
2let (response, httpResponse) = client.getCommentVoteUserNames(tenantId = "my-tenant-123", commentId = "c_987654321", dir = 0, sso = "")
3if response.isSome:
4 let res = response.get()
5 for userName in res.userNames:
6 echo userName
7

Kommentar sperren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
commentId string Ja
broadcastId string Nein
sso string Nein

Antwort

Gibt zurück: Option[LockComment_200_response]

Beispiel

lockComment-Beispiel
Copy Copy
1
2let (response, httpResponse) = client.lockComment(
3 tenantId = "my-tenant-123",
4 commentId = "cmt-98765",
5 broadcastId = "",
6 sso = ""
7)
8if response.isSome:
9 let lockResp = response.get()
10 discard lockResp
11

Kommentar anpinnen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
commentId string Ja
broadcastId string Nein
sso string Nein

Antwort

Gibt zurück: Option[PinComment_200_response]

Beispiel

pinComment Beispiel
Copy Copy
1
2let (response, httpResponse) = client.pinComment(tenantId = "my-tenant-123", commentId = "cmt-98765", broadcastId = "", sso = "")
3if response.isSome:
4 let pinned = response.get()
5 echo "Pinned comment response received"
6else:
7 echo "No pin response"
8

Kommentar speichern Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createCommentParams CreateCommentParams Nein
isLive bool Nein
doSpamCheck bool Nein
sendEmails bool Nein
populateNotifications bool Nein

Antwort

Gibt zurück: Option[SaveComment_200_response]

Beispiel

saveComment Beispiel
Copy Copy
1
2let (response, httpResponse) = client.saveComment(
3 tenantId = "my-tenant-123",
4 createCommentParams = CreateCommentParams(
5 content = "This article was really helpful, thanks!",
6 urlId = "news/2025-11/ai-regulations",
7 authorName = "Jane Doe",
8 authorEmail = "jane.doe@example.com",
9 tags = @["policy", "analysis"]
10 ),
11 isLive = true,
12 doSpamCheck = true,
13 sendEmails = true,
14 populateNotifications = false
15)
16
17if response.isSome:
18 let saved = response.get()
19 discard saved
20

Kommentare (Batch) speichern Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createCommentParams seq[CreateCommentParams] Nein
isLive bool Nein
doSpamCheck bool Nein
sendEmails bool Nein
populateNotifications bool): (Option[seq[SaveComment_200_response]] Nein
id string Nein
unBlockFromCommentParams UnBlockFromCommentParams Nein
userId string Nein
anonUserId string Nein

Antwort

Gibt zurück: Option[UnBlockCommentPublic_200_response]

Beispiel

saveCommentsBulk Beispiel
Copy Copy
1
2let (response, httpResponse) = client.saveCommentsBulk(
3 tenantId = "my-tenant-123",
4 createCommentParams = @[],
5 isLive = true,
6 doSpamCheck = true,
7 sendEmails = false,
8 populateNotifications = true,
9 id = "batch-20251122",
10 unBlockFromCommentParams = UnBlockFromCommentParams(),
11 userId = "user-456",
12 anonUserId = "anon-789"
13)
14if response.isSome:
15 let unblocked = response.get()
16 echo "Unblocked response received: ", unblocked
17else:
18 echo "No unblocked response, httpResponse: ", $httpResponse
19

Kommentartext setzen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
commentId string Ja
broadcastId string Nein
commentTextUpdateRequest CommentTextUpdateRequest Nein
editKey string Nein
sso string Nein

Antwort

Gibt zurück: Option[SetCommentText_200_response]

Beispiel

Beispiel für setCommentText
Copy Copy
1
2let (response, httpResponse) = client.setCommentText(
3 tenantId = "my-tenant-123",
4 commentId = "cmt-7890",
5 broadcastId = "broadcast-456",
6 commentTextUpdateRequest = CommentTextUpdateRequest(text = "Updated comment text to fix typos and add clarity."),
7 editKey = "edit-key-abc123",
8 sso = "sso-token-xyz"
9)
10
11if response.isSome:
12 let updated = response.get()
13

Benutzer vom Kommentar entsperren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Yes
id string No
unBlockFromCommentParams UnBlockFromCommentParams No
userId string No
anonUserId string No

Antwort

Gibt zurück: Option[UnBlockCommentPublic_200_response]

Beispiel

unBlockUserFromComment Beispiel
Copy Copy
1
2let (response, httpResponse) = client.unBlockUserFromComment(
3 tenantId = "news-site-001",
4 id = "cmt-8fj3k9",
5 unBlockFromCommentParams = UnBlockFromCommentParams(),
6 userId = "user-98765",
7 anonUserId = ""
8)
9
10if response.isSome:
11 let unblocked = response.get()
12 discard unblocked
13

Kommentar-Meldung entfernen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein
userId string Nein
anonUserId string Nein

Antwort

Gibt zurück: Option[FlagComment_200_response]

Beispiel

unFlagComment Beispiel
Copy Copy
1
2let (response, httpResponse) = client.unFlagComment(
3 tenantId = "my-tenant-123",
4 id = "flag-789",
5 userId = "",
6 anonUserId = ""
7)
8
9if response.isSome:
10 let flagResponse = response.get()
11 echo "Comment unflagged successfully"
12

Kommentar entsperren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
commentId string Ja
broadcastId string Nein
sso string Nein

Antwort

Gibt zurück: Option[LockComment_200_response]

Beispiel

unLockComment Beispiel
Copy Copy
1
2let (response, httpResponse) = client.unLockComment(tenantId = "my-tenant-123", commentId = "cmt-7f9a3b2d", broadcastId = "", sso = "")
3if response.isSome:
4 let lockResult = response.get()
5 echo "Unlock response: ", $lockResult
6else:
7 echo "Unlock failed, HTTP response: ", $httpResponse
8

Anpinnen aufheben Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
commentId string Ja
broadcastId string Nein
sso string Nein

Antwort

Gibt zurück: Option[PinComment_200_response]

Beispiel

unPinComment Beispiel
Copy Copy
1
2let (response, httpResponse) = client.unPinComment(tenantId = "my-tenant-123", commentId = "cmt-9f8b7a6", broadcastId = "", sso = "")
3if response.isSome:
4 let pinResp = response.get()
5 echo "Unpinned comment successfully"
6else:
7 echo "Failed to unpin comment; HTTP response: ", httpResponse
8

Kommentar aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein
updatableCommentParams UpdatableCommentParams Nein
contextUserId string Nein
doSpamCheck bool Nein
isLive bool Nein

Antwort

Gibt zurück: Option[FlagCommentPublic_200_response]

Beispiel

updateComment Beispiel
Copy Copy
1
2let updatableCommentParams = UpdatableCommentParams(content: "Fixed a typo in the second paragraph", tags: @["article-edit", "typo"], isApproved: true)
3let (response, httpResponse) = client.updateComment(
4 tenantId = "my-tenant-123",
5 id = "comment-456",
6 updatableCommentParams = updatableCommentParams,
7 contextUserId = "user-789",
8 doSpamCheck = true,
9 isLive = true
10)
11if response.isSome:
12 let flagResp = response.get()
13 discard flagResp
14

Kommentar bewerten Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
commentId string Ja
urlId string Ja
broadcastId string Nein
voteBodyParams VoteBodyParams Nein
sessionId string Nein
sso string Nein

Antwort

Gibt zurück: Option[VoteComment_200_response]

Beispiel

voteComment Beispiel
Copy Copy
1
2let voteBody = VoteBodyParams()
3let (response, httpResponse) = client.voteComment(
4 tenantId = "my-tenant-123",
5 commentId = "cmt-456789",
6 urlId = "news/2025/fastcomments-integration",
7 broadcastId = "",
8 voteBodyParams = voteBody,
9 sessionId = "",
10 sso = ""
11)
12if response.isSome:
13 let voteResp = response.get()
14 echo "Vote recorded for comment cmt-456789"
15else:
16 echo "Failed to record vote"
17

Domain-Konfiguration hinzufügen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
addDomainConfigParams AddDomainConfigParams Nein

Antwort

Gibt zurück: Option[AddDomainConfig_200_response]

Beispiel

Beispiel für addDomainConfig
Copy Copy
1
2let (response, httpResponse) = client.addDomainConfig(tenantId = "my-tenant-123", addDomainConfigParams = AddDomainConfigParams())
3if response.isSome:
4 let domainConfig = response.get()
5 discard domainConfig
6else:
7 discard httpResponse
8

Domain-Konfiguration löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
domain string Nein

Antwort

Gibt zurück: Option[DeleteDomainConfig_200_response]

Beispiel

Beispiel für deleteDomainConfig
Copy Copy
1
2let (response, httpResponse) = client.deleteDomainConfig(tenantId = "my-tenant-123", domain = "news.example.com")
3if response.isSome:
4 let result = response.get()
5 echo "Deleted domain config result: ", result
6else:
7 echo "No response body, HTTP status: ", $httpResponse.status
8

Domain-Konfiguration abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
domain string Nein

Antwort

Gibt zurück: Option[GetDomainConfig_200_response]

Beispiel

getDomainConfig Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getDomainConfig(tenantId = "my-tenant-123", domain = "news.example.com")
3if response.isSome:
4 let domainConfig = response.get()
5 echo "Loaded domain config for tenant my-tenant-123:", $domainConfig
6else:
7 echo "No domain config; HTTP status:", $httpResponse.status
8

Domain-Konfigurationen abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja

Antwort

Gibt zurück: Option[GetDomainConfigs_200_response]

Beispiel

getDomainConfigs Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getDomainConfigs(tenantId = "my-tenant-123")
3if response.isSome:
4 let domainConfigs = response.get()
5 echo "Domain configs received:"
6 echo domainConfigs
7else:
8 echo "Failed to retrieve domain configs."
9 echo httpResponse
10

Domain-Konfiguration teilweise aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Yes
domainToUpdate string No
patchDomainConfigParams PatchDomainConfigParams No

Antwort

Gibt zurück: Option[GetDomainConfig_200_response]

Beispiel

patchDomainConfig Beispiel
Copy Copy
1
2let (response, httpResponse) = client.patchDomainConfig(
3 tenantId = "my-tenant-123",
4 domainToUpdate = "news/article-crowdsourcing",
5 patchDomainConfigParams = PatchDomainConfigParams(
6 allowedOrigins = @["https://www.news-site.com"],
7 moderated = true,
8 maxCommentLength = 1000
9 )
10)
11
12if response.isSome:
13 let domainConfig = response.get()
14 echo "Updated domain config received"
15else:
16 echo "No domain config returned"
17

Domain-Konfiguration ersetzen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
domainToUpdate string Nein
updateDomainConfigParams UpdateDomainConfigParams Nein

Antwort

Gibt zurück: Option[GetDomainConfig_200_response]

Beispiel

putDomainConfig Beispiel
Copy Copy
1
2let updateParams = UpdateDomainConfigParams(
3 allowAnonymous = false,
4 moderationEnabled = true,
5 allowedOrigins = @["https://news.example.com"],
6 maxCommentLength = 2000
7)
8
9let (response, httpResponse) = client.putDomainConfig(
10 tenantId = "my-tenant-123",
11 domainToUpdate = "news/example-article",
12 updateDomainConfigParams = updateParams
13)
14
15if response.isSome:
16 let domainCfg = response.get()
17 discard domainCfg
18

E-Mail-Vorlage erstellen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createEmailTemplateBody CreateEmailTemplateBody Nein

Antwort

Gibt zurück: Option[CreateEmailTemplate_200_response]

Beispiel

Beispiel für createEmailTemplate
Copy Copy
1
2let (response, httpResponse) = client.createEmailTemplate(tenantId = "my-tenant-123", createEmailTemplateBody = CreateEmailTemplateBody(name = "Weekly Newsletter", subject = "Weekly updates from OurSite", fromName = "OurSite Team", fromEmail = "newsletter@oursite.com", bodyHtml = "<h1>Highlights</h1><p>Top stories this week...</p>", enabled = true, tags = @["newsletter", "weekly"]))
3if response.isSome:
4 let template = response.get()
5 discard template
6

E-Mail-Vorlage löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein

Antwort

Gibt zurück: Option[FlagCommentPublic_200_response]

Beispiel

Beispiel für deleteEmailTemplate
Copy Copy
1
2let (response, httpResponse) = client.deleteEmailTemplate(tenantId = "my-tenant-123", id = "tmpl-456")
3if response.isSome:
4 let deleted = response.get()
5 echo deleted
6

Renderfehler der E-Mail-Vorlage löschen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Yes
id string No
errorId string No

Antwort

Gibt zurück: Option[FlagCommentPublic_200_response]

Beispiel

deleteEmailTemplateRenderError Beispiel
Copy Copy
1
2let (response, httpResponse) = client.deleteEmailTemplateRenderError(
3 tenantId = "my-tenant-123",
4 id = "welcome-email-template",
5 errorId = "render-error-2026"
6)
7if response.isSome:
8 let flagResp = response.get()
9 discard flagResp
10

E-Mail-Vorlage abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein

Antwort

Gibt zurück: Option[GetEmailTemplate_200_response]

Beispiel

getEmailTemplate Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getEmailTemplate(tenantId = "my-tenant-123", id = "welcome-email-01")
3if response.isSome:
4 let template = response.get()
5 echo "Template ID: ", template.id
6 echo "Subject: ", template.subject
7 echo "Body: ", template.body
8

Definitionen der E-Mail-Vorlagen abrufen Internal Link

Parameter

Name Type Required Description
tenantId string Ja

Antwort

Gibt zurück: Option[GetEmailTemplateDefinitions_200_response]

Beispiel

getEmailTemplateDefinitions Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getEmailTemplateDefinitions(tenantId = "my-tenant-123")
3if response.isSome:
4 let defs = response.get()
5 echo "Received email template definitions for tenant my-tenant-123"
6else:
7 echo "No template definitions returned; HTTP status: ", httpResponse.status
8

Renderfehler der E-Mail-Vorlagen abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein
skip float64 Nein

Antwort

Gibt zurück: Option[GetEmailTemplateRenderErrors_200_response]

Beispiel

getEmailTemplateRenderErrors Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getEmailTemplateRenderErrors(tenantId = "my-tenant-123", id = "welcome-email-template-001", skip = 0.0)
3if response.isSome:
4 let result = response.get()
5 echo "Render errors:", result
6else:
7 echo "No render errors or request failed. HTTP status:", httpResponse.status
8

E-Mail-Vorlagen abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
skip float64 Nein

Antwort

Gibt zurück: Option[GetEmailTemplates_200_response]

Beispiel

getEmailTemplates Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getEmailTemplates(tenantId = "my-tenant-123", skip = 0.0)
3if response.isSome:
4 let templates = response.get()
5 echo templates
6else:
7 echo "No templates returned"
8

E-Mail-Vorlage rendern Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
renderEmailTemplateBody RenderEmailTemplateBody Nein
locale string Nein

Antwort

Gibt zurück: Option[RenderEmailTemplate_200_response]

Beispiel

renderEmailTemplate Beispiel
Copy Copy
1
2let renderBody = RenderEmailTemplateBody(templateId: "comment-notification", subject: "New comment on your article", variables: @["John Doe", "news/global-climate"])
3let (response, httpResponse) = client.renderEmailTemplate(tenantId = "my-tenant-123", renderEmailTemplateBody = renderBody, locale = "en-US")
4if response.isSome:
5 let rendered = response.get()
6 echo rendered
7

E-Mail-Vorlage aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein
updateEmailTemplateBody UpdateEmailTemplateBody Nein

Antwort

Gibt zurück: Option[FlagCommentPublic_200_response]

Beispiel

updateEmailTemplate Beispiel
Copy Copy
1
2let updateBody = UpdateEmailTemplateBody(
3 name = "Welcome Email",
4 subject = "Welcome to Example News",
5 html = "<p>Hi {name}, welcome to Example News.</p>",
6 isActive = true,
7 tags = @["onboarding", "welcome"]
8)
9
10let (response, httpResponse) = client.updateEmailTemplate(
11 tenantId = "my-tenant-123",
12 id = "welcome-template-2026",
13 updateEmailTemplateBody = updateBody
14)
15
16if response.isSome:
17 let template = response.get()
18 discard template
19

Ereignisprotokoll abrufen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
urlId string Ja
userIdWS string Nein
startTime int64 Nein
endTime int64 Nein

Antwort

Gibt zurück: Option[GetEventLog_200_response]

Beispiel

getEventLog Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getEventLog(
3 tenantId = "my-tenant-123",
4 urlId = "news/politics/election-2024",
5 userIdWS = "",
6 startTime = 0'i64,
7 endTime = 0'i64
8)
9if response.isSome:
10 let eventLog = response.get()
11 echo "Received event log for ", "my-tenant-123"
12else:
13 echo "No event log returned. HTTP status: ", $httpResponse.status
14

Globales Ereignisprotokoll abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
urlId string Ja
userIdWS string Nein
startTime int64 Nein
endTime int64 Nein

Antwort

Gibt zurück: Option[GetEventLog_200_response]

Beispiel

getGlobalEventLog Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getGlobalEventLog(
3 tenantId = "my-tenant-123",
4 urlId = "news/article-title",
5 userIdWS = "",
6 startTime = int64(0),
7 endTime = int64(0)
8)
9if response.isSome:
10 let eventLog = response.get()
11 echo eventLog
12else:
13 echo "No event log returned"
14

Feed-Beitrag erstellen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createFeedPostParams CreateFeedPostParams Nein
broadcastId string Nein
isLive bool Nein
doSpamCheck bool Nein
skipDupCheck bool Nein

Antwort

Gibt zurück: Option[CreateFeedPost_200_response]

Beispiel

createFeedPost Beispiel
Copy Copy
1
2let createParams = CreateFeedPostParams(
3 content = "We're rolling out realtime comments to all users!",
4 title = "Realtime Comments Rollout",
5 url = "news/realtime-comments-rollout-2025",
6 authorId = "prod-team",
7 tags = @["release", "comments"]
8)
9
10let (response, httpResponse) = client.createFeedPost(
11 tenantId = "my-tenant-123",
12 createFeedPostParams = createParams,
13 broadcastId = "broadcast-2025-11",
14 isLive = true,
15 doSpamCheck = true,
16 skipDupCheck = false
17)
18
19if response.isSome:
20 let created = response.get()
21 echo "Feed post created, id: ", $created.id
22else:
23 echo "Failed to create feed post, HTTP status: ", $httpResponse.statusCode
24

Feed-Beitrag erstellen (öffentlich) Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createFeedPostParams CreateFeedPostParams Nein
broadcastId string Nein
sso string Nein

Antwort

Gibt zurück: Option[CreateFeedPostPublic_200_response]

Beispiel

createFeedPostPublic Beispiel
Copy Copy
1
2let (response, httpResponse) = client.createFeedPostPublic(
3 tenantId = "my-tenant-123",
4 createFeedPostParams = CreateFeedPostParams(
5 title = "Product Launch Announcement",
6 content = "We just launched a new commenting feature to improve engagement.",
7 authorId = "team-product",
8 url = "news/product-launch",
9 tags = @["launch", "comments"],
10 isFeatured = false
11 ),
12 broadcastId = "broadcast-009",
13 sso = ""
14)
15if response.isSome:
16 let created = response.get()
17 discard created
18

Feed-Beitrag löschen (öffentlich) Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
postId string Nein
broadcastId string Nein
sso string Nein

Antwort

Gibt zurück: Option[DeleteFeedPostPublic_200_response]

Beispiel

deleteFeedPostPublic Beispiel
Copy Copy
1
2let (response, httpResponse) = client.deleteFeedPostPublic(
3 tenantId = "my-tenant-123",
4 postId = "post-456",
5 broadcastId = "broadcast-789",
6 sso = ""
7)
8if response.isSome:
9 let result = response.get()
10

Feed-Beiträge abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
afterId string Nein
limit int Nein
tags seq[string] Nein

Antwort

Gibt zurück: Option[GetFeedPosts_200_response]

Beispiel

getFeedPosts Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getFeedPosts(tenantId = "my-tenant-123", afterId = "post_abc123", limit = 20, tags = @["news", "sports"])
3if response.isSome:
4 let feed = response.get()
5 echo "Feed posts retrieved for tenant my-tenant-123"
6else:
7 echo "No feed posts returned, HTTP status: ", $httpResponse.status
8

Feed-Beiträge abrufen (öffentlich) Internal Link

Parameter

Name Type Required Description
tenantId string Ja
afterId string Nein
limit int Nein
tags seq[string] Nein
sso string Nein
isCrawler bool Nein
includeUserInfo bool Nein

Antwort

Gibt zurück: Option[GetFeedPostsPublic_200_response]

Beispiel

Beispiel für getFeedPostsPublic
Copy Copy
1
2let (response, httpResponse) = client.getFeedPostsPublic(
3 tenantId = "my-tenant-123",
4 afterId = "",
5 limit = 0,
6 tags = @[],
7 sso = "",
8 isCrawler = false,
9 includeUserInfo = false
10)
11
12if response.isSome:
13 let feed = response.get()
14 echo feed
15

Statistiken zu Feed-Beiträgen abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
postIds seq[string] Nein
sso string Nein

Antwort

Gibt zurück: Option[GetFeedPostsStats_200_response]

Beispiel

getFeedPostsStats Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getFeedPostsStats(
3 tenantId = "my-tenant-123",
4 postIds = @["news/article-2025-11-22", "opinion/market-trends-452"],
5 sso = ""
6)
7
8if response.isSome:
9 let stats = response.get()
10 discard stats
11

Benutzerreaktionen abrufen (öffentlich) Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
postIds seq[string] Nein
sso string Nein

Antwort

Gibt zurück: Option[GetUserReactsPublic_200_response]

Beispiel

getUserReactsPublic Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getUserReactsPublic(tenantId = "my-tenant-123", postIds = @[], sso = "")
3if response.isSome:
4 let reacts = response.get()
5 discard reacts
6

Auf Feed-Beitrag reagieren (öffentlich) Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
postId string Nein
reactBodyParams ReactBodyParams Nein
isUndo bool Nein
broadcastId string Nein
sso string Nein

Antwort

Gibt zurück: Option[ReactFeedPostPublic_200_response]

Beispiel

Beispiel für reactFeedPostPublic
Copy Copy
1
2let (response, httpResponse) = client.reactFeedPostPublic(
3 tenantId = "my-tenant-123",
4 postId = "news/article-title",
5 reactBodyParams = ReactBodyParams(),
6 isUndo = false,
7 broadcastId = "broadcast-456",
8 sso = ""
9)
10if response.isSome:
11 let result = response.get()
12 echo "Reaction result: ", result
13else:
14 echo "Reaction failed, HTTP response: ", httpResponse
15

Feed-Beitrag aktualisieren Internal Link

Parameter

Name Type Required Description
tenantId string Yes
id string No
feedPost FeedPost No

Antwort

Gibt zurück: Option[FlagCommentPublic_200_response]

Beispiel

updateFeedPost Beispiel
Copy Copy
1
2let feedPost = FeedPost(
3 title: "Local Election Results",
4 content: "Updated vote counts across precincts",
5 tags: @["politics", "local"],
6 authorId: "journalist-32",
7 isPublished: true,
8 views: 124
9)
10
11let (response, httpResponse) = client.updateFeedPost(tenantId = "my-tenant-123", id = "post-456", feedPost = feedPost)
12
13if response.isSome:
14 let flagResp = response.get()
15 discard flagResp
16

Feed-Beitrag aktualisieren (öffentlich) Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
postId string Nein
updateFeedPostParams UpdateFeedPostParams Nein
broadcastId string Nein
sso string Nein

Antwort

Gibt zurück: Option[CreateFeedPostPublic_200_response]

Beispiel

updateFeedPostPublic Beispiel
Copy Copy
1
2var updateParams: UpdateFeedPostParams = UpdateFeedPostParams(
3 title = "Breaking: Service Update",
4 content = "We improved feed performance and UX for all users.",
5 tags = @["performance", "release"],
6 isPublic = true
7)
8
9let (response, httpResponse) = client.updateFeedPostPublic(
10 tenantId = "my-tenant-123",
11 postId = "post-456",
12 updateFeedPostParams = updateParams,
13 broadcastId = "broadcast-789",
14 sso = "sso-token-abc123"
15)
16
17if response.isSome:
18 let post = response.get()
19 echo "Updated post title: ", post.title
20 echo "HTTP status: ", httpResponse.status
21

Kommentar melden (öffentlich) Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
commentId string Ja
isFlagged bool Nein
sso string Nein

Antwort

Gibt zurück: Option[FlagCommentPublic_200_response]

Beispiel

flagCommentPublic Beispiel
Copy Copy
1
2let (response, httpResponse) = client.flagCommentPublic(
3 tenantId = "my-tenant-123",
4 commentId = "comment-98765",
5 isFlagged = false,
6 sso = ""
7)
8if response.isSome:
9 let flagResult = response.get()
10 discard flagResult
11

Hashtag hinzufügen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createHashTagBody CreateHashTagBody Nein

Antwort

Gibt zurück: Option[AddHashTag_200_response]

Beispiel

addHashTag Beispiel
Copy Copy
1
2let createBody = CreateHashTagBody(
3 name = "sports",
4 description = "Articles and discussions about sports",
5 aliases = @["sport", "athletics"],
6 isActive = true
7)
8
9let (response, httpResponse) = client.addHashTag(tenantId = "my-tenant-123", createHashTagBody = createBody)
10
11if response.isSome:
12 let added = response.get()
13 echo "HashTag added successfully"
14else:
15 echo "Failed to add HashTag"
16

Hashtags (Batch) hinzufügen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
bulkCreateHashTagsBody BulkCreateHashTagsBody Nein

Antwort

Gibt zurück: Option[AddHashTagsBulk_200_response]

Beispiel

addHashTagsBulk Beispiel
Copy Copy
1
2let bulkBody = BulkCreateHashTagsBody(
3 tags = @["breaking", "world-news", "economy"],
4 createdBy = "editor@dailynews.com",
5 replaceExisting = false
6)
7let (response, httpResponse) = client.addHashTagsBulk(tenantId = "newsroom-tenant-42", bulkCreateHashTagsBody = bulkBody)
8if response.isSome:
9 let created = response.get()
10 echo created
11else:
12 echo "AddHashTagsBulk failed:", httpResponse
13

Hashtag löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tag string Nein
tenantId string Ja
deleteHashTagRequest DeleteHashTagRequest Nein

Antwort

Rückgabe: Option[FlagCommentPublic_200_response]

Beispiel

deleteHashTag Beispiel
Copy Copy
1
2let (response, httpResponse) = client.deleteHashTag(tag = "breaking-news", tenantId = "my-tenant-123", deleteHashTagRequest = DeleteHashTagRequest())
3if response.isSome:
4 let result = response.get()
5 discard result
6

Hashtags abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
page float64 Nein

Antwort

Gibt zurück: Option[GetHashTags_200_response]

Beispiel

getHashTags Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getHashTags(tenantId = "my-tenant-123", page = 1.0)
3if response.isSome:
4 let tags = response.get()
5 for t in tags:
6 echo t
7else:
8 echo "no hashtags found"
9

Hashtag teilweise aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tag string Nein
tenantId string Ja
updateHashTagBody UpdateHashTagBody Nein

Antwort

Gibt zurück: Option[PatchHashTag_200_response]

Beispiel

patchHashTag Beispiel
Copy Copy
1
2let (response, httpResponse) = client.patchHashTag(tag = "politics", tenantId = "my-tenant-123", updateHashTagBody = UpdateHashTagBody())
3
4if response.isSome:
5 let updated = response.get()
6 echo "Hashtag updated successfully"
7else:
8 echo "Failed to update hashtag, status:", httpResponse.status
9

Moderator erstellen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createModeratorBody CreateModeratorBody Nein

Antwort

Gibt zurück: Option[CreateModerator_200_response]

Beispiel

createModerator Beispiel
Copy Copy
1
2let createBody = CreateModeratorBody(
3 email = "moderator@news-site.com",
4 displayName = "News Moderator",
5 permissions = @["approve_comments", "delete_comments"],
6 isSuperAdmin = false
7)
8
9let (response, httpResponse) = client.createModerator(tenantId = "my-tenant-123", createModeratorBody = createBody)
10
11if response.isSome:
12 let moderator = response.get()
13 echo "Created moderator: ", $moderator
14

Moderator löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein
sendEmail string Nein

Antwort

Gibt zurück: Option[FlagCommentPublic_200_response]

Beispiel

deleteModerator Beispiel
Copy Copy
1
2let (response, httpResponse) = client.deleteModerator(tenantId = "my-tenant-123", id = "moderator-456", sendEmail = "false")
3if response.isSome:
4 let flagResp = response.get()
5 echo "Moderator deletion response: ", $flagResp
6else:
7 echo "No response body; HTTP status: ", $httpResponse.status
8

Moderator abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein

Antwort

Gibt zurück: Option[GetModerator_200_response]

Beispiel

getModerator Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getModerator(tenantId = "my-tenant-123", id = "mod-98765")
3if response.isSome:
4 let moderator = response.get()
5 discard moderator
6

Moderatoren abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
skip float64 Nein

Antwort

Gibt zurück: Option[GetModerators_200_response]

Beispiel

Beispiel für getModerators
Copy Copy
1
2let (response, httpResponse) = client.getModerators(tenantId = "my-tenant-123", skip = 0.0)
3if response.isSome:
4 let moderators = response.get()
5 echo "Moderators fetched successfully"
6 echo moderators
7

Moderator aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein
updateModeratorBody UpdateModeratorBody Nein

Antwort

Gibt zurück: Option[FlagCommentPublic_200_response]

Beispiel

updateModerator-Beispiel
Copy Copy
1
2let updateBody = UpdateModeratorBody(
3 name: "Alicia Gomez",
4 email: "alicia.gomez@dailynews.com",
5 active: true,
6 roles: @["moderator"]
7)
8
9let (response, httpResponse) = client.updateModerator(tenantId = "my-tenant-123", id = "moderator-789", updateModeratorBody = updateBody)
10
11if response.isSome:
12 let updated = response.get()
13 echo "Moderator updated:", updated
14

Benachrichtigungszähler löschen Internal Link

Parameters

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein

Antwort

Gibt zurück: Option[FlagCommentPublic_200_response]

Beispiel

Beispiel für deleteNotificationCount
Copy Copy
1
2let (response, httpResponse) = client.deleteNotificationCount(tenantId = "my-tenant-123", id = "notif-456")
3if response.isSome:
4 let deleted = response.get()
5 echo "Deleted notification count:", deleted
6else:
7 echo "No response body; HTTP response:", httpResponse
8

Zwischengespeicherten Benachrichtigungszähler abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein

Antwort

Gibt zurück: Option[GetCachedNotificationCount_200_response]

Beispiel

getCachedNotificationCount Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getCachedNotificationCount(tenantId = "my-tenant-123", id = "notif-thread-2026")
3if response.isSome:
4 let cached = response.get()
5 echo "Cached notification count: ", $cached
6

Benachrichtigungszähler abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
userId string Nein
urlId string Ja
fromCommentId string Nein
viewed bool Nein

Antwort

Gibt zurück: Option[GetNotificationCount_200_response]

Beispiel

getNotificationCount Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getNotificationCount(
3 tenantId = "acme-corp-tenant-12",
4 userId = "user-84",
5 urlId = "news/2026/market-update",
6 fromCommentId = "cmt-20251234",
7 viewed = false
8)
9
10if response.isSome:
11 let notificationData = response.get()
12 echo "Received notification data"
13else:
14 echo "No notification data"
15

Benachrichtigungen abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
userId string Nein
urlId string Ja
fromCommentId string Nein
viewed bool Nein
skip float64 Nein

Antwort

Gibt zurück: Option[GetNotifications_200_response]

Beispiel

getNotifications Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getNotifications(
3 tenantId = "fastcomments-tenant-42",
4 userId = "",
5 urlId = "news/latest-tech-innovations",
6 fromCommentId = "",
7 viewed = false,
8 skip = 0.0
9)
10
11if response.isSome:
12 let notifications = response.get()
13 echo "Received notifications: ", notifications
14else:
15 echo "No notifications, response: ", httpResponse
16

Benachrichtigung aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein
updateNotificationBody UpdateNotificationBody Nein
userId string Nein

Antwort

Gibt zurück: Option[FlagCommentPublic_200_response]

Beispiel

Beispiel für updateNotification
Copy Copy
1
2let (response, httpResponse) = client.updateNotification(tenantId = "my-tenant-123",
3 id = "notif-456",
4 updateNotificationBody = UpdateNotificationBody(),
5 userId = "user-789")
6if response.isSome:
7 let updated = response.get()
8 echo "Updated notification id: ", $updated
9

Seite hinzufügen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createAPIPageData CreateAPIPageData Nein

Antwort

Gibt zurück: Option[AddPageAPIResponse]

Beispiel

addPage Beispiel
Copy Copy
1
2var createData: CreateAPIPageData
3createData.url = "news/nim-4-release"
4createData.title = "Nim 4 Release Coverage"
5createData.path = "/news/nim-4-release"
6createData.isEnabled = true
7createData.tags = @["nim", "release"]
8createData.description = "Coverage of Nim 4 release"
9
10let (response, httpResponse) = client.addPage(tenantId = "my-tenant-123", createAPIPageData = createData)
11
12if response.isSome:
13 let pageResp = response.get()
14 echo pageResp
15

Seite löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein

Antwort

Gibt zurück: Option[DeletePageAPIResponse]

Beispiel

deletePage Beispiel
Copy Copy
1
2let (response, httpResponse) = client.deletePage(tenantId = "site-tenant-456", id = "news/winter-updates-2025")
3if response.isSome:
4 let deleted = response.get()
5 echo "DeletePageAPIResponse:", deleted
6else:
7 echo "Delete failed, HTTP response:", httpResponse
8

Seite nach URL-ID abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
urlId string Ja

Antwort

Gibt zurück: Option[GetPageByURLIdAPIResponse]

Beispiel

getPageByURLId Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getPageByURLId(tenantId = "my-tenant-123", urlId = "news/article-title")
3if response.isSome:
4 let page = response.get()
5 echo "Page ID: ", page.id
6 echo "Title: ", page.title
7 echo "URL: ", page.url
8 echo "Published: ", $page.published
9 echo "Tags: ", $page.tags
10else:
11 echo "No page found. HTTP status: ", httpResponse.statusCode
12

Seiten abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja

Antwort

Gibt zurück: Option[GetPagesAPIResponse]

Beispiel

getPages Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getPages(tenantId = "news-site-456")
3if response.isSome:
4 let pages = response.get()
5 echo "Received pages response: ", pages
6else:
7 echo "No pages returned. HTTP response: ", httpResponse
8

Seite teilweise aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein
updateAPIPageData UpdateAPIPageData Nein

Antwort

Gibt zurück: Option[PatchPageAPIResponse]

Beispiel

patchPage Beispiel
Copy Copy
1
2let updateData = UpdateAPIPageData(
3 title = "Breaking: Major Event Update",
4 urlId = "news/major-event-update",
5 visible = true,
6 tags = @["breaking", "headline"],
7 sortOrder = 5
8)
9
10let (response, httpResponse) = client.patchPage(
11 tenantId = "my-tenant-123",
12 id = "news/major-event-update",
13 updateAPIPageData = updateData
14)
15
16if response.isSome:
17 let page = response.get()
18 discard page
19

Ausstehendes Webhook-Ereignis löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Yes
id string No

Antwort

Gibt zurück: Option[FlagCommentPublic_200_response]

Beispiel

Beispiel für deletePendingWebhookEvent
Copy Copy
1
2let (response, httpResponse) = client.deletePendingWebhookEvent(tenantId = "my-tenant-123", id = "wh_evt_6f1e3b2a")
3if response.isSome:
4 let flagResp = response.get()
5 discard flagResp
6

Anzahl ausstehender Webhook-Ereignisse abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Yes
commentId string Yes
externalId string No
eventType string No
domain string No
attemptCountGT float64 No

Antwort

Gibt zurück: Option[GetPendingWebhookEventCount_200_response]

Beispiel

Beispiel für getPendingWebhookEventCount
Copy Copy
1
2let (response, httpResponse) = client.getPendingWebhookEventCount(
3 tenantId = "my-tenant-123",
4 commentId = "cmt-4567",
5 externalId = "",
6 eventType = "",
7 domain = "",
8 attemptCountGT = 0.0
9)
10if response.isSome:
11 let pending = response.get()
12 echo "Received pending webhook event count response: ", $pending
13else:
14 echo "No pending webhook event count returned, HTTP response: ", $httpResponse
15

Ausstehende Webhook-Ereignisse abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
commentId string Ja
externalId string Nein
eventType string Nein
domain string Nein
attemptCountGT float64 Nein
skip float64 Nein

Antwort

Gibt zurück: Option[GetPendingWebhookEvents_200_response]

Beispiel

Beispiel für getPendingWebhookEvents
Copy Copy
1
2let (response, httpResponse) = client.getPendingWebhookEvents(
3 tenantId = "my-tenant-123",
4 commentId = "cmt-456789",
5 externalId = "",
6 eventType = "",
7 domain = "",
8 attemptCountGT = 0.0,
9 skip = 0.0
10)
11if response.isSome:
12 let pending = response.get()
13 discard pending
14 echo "Received pending webhook events"
15else:
16 echo "No pending webhook events"
17

Fragekonfiguration erstellen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createQuestionConfigBody CreateQuestionConfigBody Nein

Antwort

Gibt zurück: Option[CreateQuestionConfig_200_response]

Beispiel

createQuestionConfig Beispiel
Copy Copy
1
2let body = CreateQuestionConfigBody(
3 key = "recommendation",
4 question = "Would you recommend this article to a friend?",
5 required = false,
6 inputType = "radio",
7 options = @["Yes", "No", "Maybe"]
8)
9
10let (response, httpResponse) = client.createQuestionConfig(tenantId = "my-tenant-123", createQuestionConfigBody = body)
11
12if response.isSome:
13 let config = response.get()
14 discard config
15

Fragekonfiguration löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein

Antwort

Gibt zurück: Option[FlagCommentPublic_200_response]

Beispiel

Beispiel für deleteQuestionConfig
Copy Copy
1
2let (response, httpResponse) = client.deleteQuestionConfig(tenantId = "my-tenant-123", id = "qcfg-456")
3if response.isSome:
4 let respVal = response.get()
5 echo "Delete succeeded for tenant my-tenant-123"
6else:
7 echo "Delete returned no data (status: ", $httpResponse.status, ")"
8

Fragekonfiguration abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein

Antwort

Gibt zurück: Option[GetQuestionConfig_200_response]

Beispiel

getQuestionConfig Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getQuestionConfig(tenantId = "my-tenant-123", id = "qcfg-98765")
3if response.isSome:
4 let config = response.get()
5 echo "Received question config for tenant:", " my-tenant-123"
6

Fragekonfigurationen abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
skip float64 Nein

Antwort

Gibt zurück: Option[GetQuestionConfigs_200_response]

Beispiel

getQuestionConfigs Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getQuestionConfigs(tenantId = "my-tenant-123", skip = 0.0)
3if response.isSome:
4 let configs = response.get()
5 discard configs
6

Fragekonfiguration aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein
updateQuestionConfigBody UpdateQuestionConfigBody Nein

Antwort

Gibt zurück: Option[FlagCommentPublic_200_response]

Beispiel

Beispiel für updateQuestionConfig
Copy Copy
1
2let (response, httpResponse) = client.updateQuestionConfig(
3 tenantId = "my-tenant-123",
4 id = "q-config-456",
5 updateQuestionConfigBody = UpdateQuestionConfigBody()
6)
7if response.isSome:
8 let updated = response.get()
9 discard updated
10 echo "Question config updated"
11else:
12 echo "Update did not return a result"
13

Frageergebnis erstellen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createQuestionResultBody CreateQuestionResultBody Nein

Antwort

Gibt zurück: Option[CreateQuestionResult_200_response]

Beispiel

createQuestionResult Beispiel
Copy Copy
1
2let (response, httpResponse) = client.createQuestionResult(tenantId = "my-tenant-123",
3 createQuestionResultBody = CreateQuestionResultBody(questionId: "q-456",
4 userId: "user-789",
5 correct: true,
6 score: 9,
7 answers: @["B", "D"]))
8if response.isSome:
9 let result = response.get()
10 echo result
11

Frageergebnis löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein

Antwort

Gibt zurück: Option[FlagCommentPublic_200_response]

Beispiel

deleteQuestionResult Beispiel
Copy Copy
1
2let (response, httpResponse) = client.deleteQuestionResult(tenantId = "my-tenant-123", id = "question-result-789")
3if response.isSome:
4 let result = response.get()
5 echo "Deleted question result:", result
6else:
7 echo "No result returned, HTTP status:", $httpResponse.status
8

Frageergebnis abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein

Antwort

Gibt zurück: Option[GetQuestionResult_200_response]

Beispiel

getQuestionResult Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getQuestionResult(tenantId = "my-tenant-123", id = "question-456")
3if response.isSome:
4 let result = response.get()
5 echo "Received question result:"
6 echo result
7else:
8 echo "No question result returned"
9

Frageergebnisse abrufen Internal Link

Parameter

Name Type Erforderlich Beschreibung
tenantId string Ja
urlId string Ja
userId string Nein
startDate string Nein
questionId string Nein
questionIds string Nein
skip float64 Nein

Antwort

Gibt zurück: Option[GetQuestionResults_200_response]

Beispiel

getQuestionResults Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getQuestionResults(
3 tenantId = "my-tenant-123",
4 urlId = "news/politics/election-2024",
5 userId = "user-9876",
6 startDate = "2024-01-01T00:00:00Z",
7 questionId = "q-user-satisfaction",
8 questionIds = "q-user-satisfaction,q-engagement",
9 skip = 0.0
10)
11
12if response.isSome:
13 let results = response.get()
14 echo "Got question results: ", $results
15else:
16 echo "No results, HTTP status: ", httpResponse.status
17

Frageergebnis aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein
updateQuestionResultBody UpdateQuestionResultBody Nein

Antwort

Gibt zurück: Option[FlagCommentPublic_200_response]

Beispiel

Beispiel für updateQuestionResult
Copy Copy
1
2let (response, httpResponse) = client.updateQuestionResult(
3 tenantId = "my-tenant-123",
4 id = "question-456",
5 updateQuestionResultBody = UpdateQuestionResultBody(
6 result = "approved",
7 reviewerId = "moderator-42",
8 notes = "Valid question, no action required",
9 isSpam = false
10 )
11)
12if response.isSome:
13 let flagResponse = response.get()
14 discard flagResponse
15

Frageergebnisse aggregieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
questionId string Nein
questionIds seq[string] Nein
urlId string Ja
timeBucket AggregateTimeBucket Nein
startDate string Nein
forceRecalculate bool Nein

Antwort

Gibt zurück: Option[AggregateQuestionResults_200_response]

Beispiel

aggregateQuestionResults Beispiel
Copy Copy
1
2let (response, httpResponse) = client.aggregateQuestionResults(
3 tenantId = "my-tenant-123",
4 questionId = "",
5 questionIds = @[],
6 urlId = "news/economy/budget-2025",
7 timeBucket = AggregateTimeBucket(0),
8 startDate = "",
9 forceRecalculate = false
10)
11
12if response.isSome:
13 let aggResults = response.get()
14 discard aggResults
15

Frageergebnisse (Batch) aggregieren Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
bulkAggregateQuestionResultsRequest BulkAggregateQuestionResultsRequest Nein
forceRecalculate bool Nein

Antwort

Gibt zurück: Option[BulkAggregateQuestionResults_200_response]

Beispiel

Beispiel für bulkAggregateQuestionResults
Copy Copy
1
2let request = BulkAggregateQuestionResultsRequest()
3let (response, httpResponse) = client.bulkAggregateQuestionResults(tenantId = "my-tenant-123", bulkAggregateQuestionResultsRequest = request, forceRecalculate = false)
4if response.isSome:
5 let aggregated = response.get()
6 echo aggregated
7

Kommentare mit Frageergebnissen kombinieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
questionId string Nein
questionIds seq[string] Nein
urlId string Ja
startDate string Nein
forceRecalculate bool Nein
minValue float64 Nein
maxValue float64 Nein
limit float64 Nein

Antwort

Gibt zurück: Option[CombineCommentsWithQuestionResults_200_response]

Beispiel

combineCommentsWithQuestionResults Beispiel
Copy Copy
1
2let (response, httpResponse) = client.combineCommentsWithQuestionResults(
3 tenantId = "my-tenant-123",
4 questionId = "q-9876",
5 questionIds = @["q-9876", "q-9877"],
6 urlId = "news/article-title",
7 startDate = "2025-01-01T00:00:00Z",
8 forceRecalculate = false,
9 minValue = 1.0,
10 maxValue = 5.0,
11 limit = 100.0
12)
13
14if response.isSome:
15 let combined = response.get()
16 discard combined
17

SSO-Benutzer hinzufügen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createAPISSOUserData CreateAPISSOUserData Nein

Antwort

Gibt zurück: Option[AddSSOUserAPIResponse]

Beispiel

addSSOUser Beispiel
Copy Copy
1
2let (response, httpResponse) = client.addSSOUser(
3 tenantId = "my-tenant-123",
4 createAPISSOUserData = CreateAPISSOUserData(
5 id = "sso-456",
6 email = "alice.johnson@newsorg.com",
7 name = "Alice Johnson",
8 roles = @["editor", "contributor"],
9 isActive = true,
10 isAdmin = false
11 )
12)
13if response.isSome:
14 let apiResp = response.get()
15 discard apiResp
16else:
17 discard httpResponse
18

SSO-Benutzer löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein
deleteComments bool Nein
commentDeleteMode string Nein

Antwort

Gibt zurück: Option[DeleteSSOUserAPIResponse]

Beispiel

deleteSSOUser Beispiel
Copy Copy
1
2let (response, httpResponse) = client.deleteSSOUser(tenantId = "my-tenant-123", id = "sso-user-9876", deleteComments = true, commentDeleteMode = "hard")
3if response.isSome:
4 let deleted = response.get()
5 discard deleted
6else:
7 discard httpResponse
8

SSO-Benutzer nach E-Mail abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
email string Nein

Antwort

Gibt zurück: Option[GetSSOUserByEmailAPIResponse]

Beispiel

getSSOUserByEmail Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getSSOUserByEmail(tenantId = "my-tenant-123", email = "alice@newsco.com")
3if response.isSome:
4 let ssoUser = response.get()
5 echo "SSO user found: ", ssoUser.email
6else:
7 echo "No SSO user found. HTTP status: ", httpResponse.status
8

SSO-Benutzer nach ID abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein

Antwort

Gibt zurück: Option[GetSSOUserByIdAPIResponse]

Beispiel

Beispiel für getSSOUserById
Copy Copy
1
2let (response, httpResponse) = client.getSSOUserById(tenantId = "my-tenant-123", id = "user-789")
3if response.isSome:
4 let ssoUser: GetSSOUserByIdAPIResponse = response.get()
5 echo "SSO user retrieved: ", $ssoUser
6else:
7 echo "No SSO user found, HTTP status: ", httpResponse.statusCode
8

SSO-Benutzer abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
skip int Nein

Antwort

Gibt zurück: Option[GetSSOUsers_200_response]

Beispiel

getSSOUsers Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getSSOUsers(tenantId = "my-tenant-123", skip = 0)
3if response.isSome:
4 let ssoUsers = response.get()
5 echo "Fetched SSO users:"
6 echo ssoUsers
7else:
8 echo "No SSO users returned, HTTP status: ", httpResponse.statusCode
9

SSO-Benutzer teilweise aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein
updateAPISSOUserData UpdateAPISSOUserData Nein
updateComments bool Nein

Antwort

Gibt zurück: Option[PatchSSOUserAPIResponse]

Beispiel

patchSSOUser Beispiel
Copy Copy
1
2let (response, httpResponse) = client.patchSSOUser(
3 tenantId = "my-tenant-123",
4 id = "user-789",
5 updateAPISSOUserData = UpdateAPISSOUserData(
6 externalId = "ext-987",
7 username = "j.smith",
8 email = "j.smith@news.example.com",
9 displayName = "John Smith",
10 roles = @["author", "editor"],
11 avatarUrl = "https://cdn.news.example.com/avatars/j.smith.png"
12 ),
13 updateComments = true
14)
15
16if response.isSome:
17 let patched = response.get()
18 echo patched
19

SSO-Benutzer ersetzen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein
updateAPISSOUserData UpdateAPISSOUserData Nein
updateComments bool Nein

Antwort

Gibt zurück: Option[PutSSOUserAPIResponse]

Beispiel

putSSOUser Beispiel
Copy Copy
1
2let (response, httpResponse) = client.putSSOUser(
3 tenantId = "my-tenant-123",
4 id = "user-456",
5 updateAPISSOUserData = UpdateAPISSOUserData(
6 externalId = "ext-789",
7 displayName = "Jane Doe",
8 email = "jane.doe@example.com",
9 avatarUrl = "https://cdn.news-site.com/avatars/jane.jpg",
10 roles = @["member", "subscriber"]
11 ),
12 updateComments = true
13)
14
15if response.isSome:
16 let result = response.get()
17 echo "SSO user updated:", result
18

Abonnement erstellen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createAPIUserSubscriptionData CreateAPIUserSubscriptionData Nein

Antwort

Gibt zurück: Option[CreateSubscriptionAPIResponse]

Beispiel

createSubscription Beispiel
Copy Copy
1
2let createData = CreateAPIUserSubscriptionData(
3 subscriberId = "user-987",
4 email = "jane.doe@newsreader.com",
5 urlId = "news/local-weather",
6 active = true,
7 tags = @["weather", "local"],
8 frequency = "immediate"
9)
10let (response, httpResponse) = client.createSubscription(tenantId = "my-tenant-123", createAPIUserSubscriptionData = createData)
11if response.isSome:
12 let created = response.get()
13 echo "Created subscription id: ", created.id
14

Abonnement löschen Internal Link

Parameter

Name Type Required Description
tenantId string Ja
id string Nein
userId string Nein

Antwort

Gibt zurück: Option[DeleteSubscriptionAPIResponse]

Beispiel

deleteSubscription Beispiel
Copy Copy
1
2let (response, httpResponse) = client.deleteSubscription(tenantId = "my-tenant-123", id = "sub-98765", userId = "user-456")
3if response.isSome:
4 let deleteResp = response.get()
5 echo "Delete subscription response received"
6else:
7 echo "No subscription response"
8

Abonnements abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
userId string Nein

Antwort

Gibt zurück: Option[GetSubscriptionsAPIResponse]

Beispiel

getSubscriptions Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getSubscriptions(tenantId = "my-tenant-123", userId = "")
3if response.isSome:
4 let subscriptions = response.get()
5 discard subscriptions
6

Tägliche Nutzungen des Mandanten abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
yearNumber float64 Nein
monthNumber float64 Nein
dayNumber float64 Nein
skip float64 Nein

Antwort

Rückgabe: Option[GetTenantDailyUsages_200_response]

Beispiel

getTenantDailyUsages Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getTenantDailyUsages(
3 tenantId = "my-tenant-123",
4 yearNumber = 2025.0,
5 monthNumber = 6.0,
6 dayNumber = 15.0,
7 skip = 0.0
8)
9
10if response.isSome:
11 let usages = response.get()
12 echo usages
13else:
14 echo "No daily usages returned"
15

Mandantenpaket erstellen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createTenantPackageBody CreateTenantPackageBody Nein

Antwort

Gibt zurück: Option[CreateTenantPackage_200_response]

Beispiel

createTenantPackage Beispiel
Copy Copy
1
2let packageBody = CreateTenantPackageBody(
3 packageName = "premium-comments",
4 description = "Premium moderation package for news site",
5 planId = "plan-pro-2024",
6 seats = 100,
7 enabled = true,
8 features = @["moderation", "analytics", "sentiment"]
9)
10
11let (response, httpResponse) = client.createTenantPackage(tenantId = "my-tenant-123", createTenantPackageBody = packageBody)
12
13if response.isSome:
14 let pkg = response.get()
15 echo "Created package ID: ", pkg.packageId
16 echo "Package name: ", pkg.packageName
17else:
18 echo "Failed to create package, HTTP status: ", httpResponse.status.code
19

Mandantenpaket löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein

Antwort

Gibt zurück: Option[FlagCommentPublic_200_response]

Beispiel

deleteTenantPackage Beispiel
Copy Copy
1
2let (response, httpResponse) = client.deleteTenantPackage(tenantId = "my-tenant-123", id = "pkg-789")
3if response.isSome:
4 let deleted = response.get()
5 echo "Successfully deleted tenant package"
6

Mandantenpaket abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein

Antwort

Gibt zurück: Option[GetTenantPackage_200_response]

Beispiel

getTenantPackage Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getTenantPackage(tenantId = "my-tenant-123", id = "pkg-premium-001")
3if response.isSome:
4 let pkg = response.get()
5 echo pkg
6else:
7 echo "No package found for tenant"
8

Mandantenpakete abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
skip float64 Nein

Antwort

Gibt zurück: Option[GetTenantPackages_200_response]

Beispiel

Beispiel für getTenantPackages
Copy Copy
1
2let (response, httpResponse) = client.getTenantPackages(tenantId = "my-tenant-123", skip = 0.0)
3if response.isSome:
4 let packages = response.get()
5 echo "Received packages for tenant:", " my-tenant-123"
6 echo packages
7else:
8 echo "No packages found, status:", httpResponse.status
9

Mandantenpaket ersetzen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein
replaceTenantPackageBody ReplaceTenantPackageBody Nein

Antwort

Gibt zurück: Option[FlagCommentPublic_200_response]

Beispiel

replaceTenantPackage Beispiel
Copy Copy
1
2let replaceBody = ReplaceTenantPackageBody(
3 packageName = "Community Pro",
4 seats = 500,
5 enableModeration = true,
6 features = @["moderation", "analytics", "single-sign-on"]
7)
8
9let (response, httpResponse) = client.replaceTenantPackage(
10 tenantId = "my-tenant-123",
11 id = "community-pro",
12 replaceTenantPackageBody = replaceBody
13)
14
15if response.isSome:
16 let flagResp = response.get()
17 echo "Package replaced for tenant: ", "my-tenant-123"
18 discard flagResp
19

Mandantenpaket aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein
updateTenantPackageBody UpdateTenantPackageBody Nein

Antwort

Gibt zurück: Option[FlagCommentPublic_200_response]

Beispiel

updateTenantPackage Beispiel
Copy Copy
1
2let (response, httpResponse) = client.updateTenantPackage(tenantId = "my-tenant-123", id = "pkg-premium", updateTenantPackageBody = UpdateTenantPackageBody())
3if response.isSome:
4 let updated = response.get()
5 echo "Updated package received:", updated
6else:
7 echo "Update failed, HTTP status: ", httpResponse.status
8

Mandantenbenutzer erstellen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createTenantUserBody CreateTenantUserBody Nein

Antwort

Gibt zurück: Option[CreateTenantUser_200_response]

Beispiel

createTenantUser Beispiel
Copy Copy
1
2let createBody = CreateTenantUserBody(
3 email = "jane.doe@acmepub.com",
4 displayName = "Jane Doe",
5 password = "S3cur3P@ssw0rd",
6 roles = @["moderator", "editor"],
7 disabled = false
8)
9let (response, httpResponse) = client.createTenantUser(tenantId = "my-tenant-123", createTenantUserBody = createBody)
10if response.isSome:
11 let createdUser = response.get()
12 echo createdUser
13

Mandantenbenutzer löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein
deleteComments string Nein
commentDeleteMode string Nein

Antwort

Gibt zurück: Option[FlagCommentPublic_200_response]

Beispiel

deleteTenantUser Beispiel
Copy Copy
1
2let (response, httpResponse) = client.deleteTenantUser(tenantId = "my-tenant-123", id = "user-456", deleteComments = "", commentDeleteMode = "")
3if response.isSome:
4 let flagResp = response.get()
5 echo flagResp
6

Mandantenbenutzer abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein

Antwort

Gibt zurück: Option[GetTenantUser_200_response]

Beispiel

getTenantUser Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getTenantUser(tenantId = "my-tenant-123", id = "user-456")
3if response.isSome:
4 let tenantUser = response.get()
5 discard tenantUser
6else:
7 discard httpResponse
8

Mandantenbenutzer abrufen Internal Link

Parameter

Name Type Erforderlich Beschreibung
tenantId string Ja
skip float64 Nein

Antwort

Gibt zurück: Option[GetTenantUsers_200_response]

Beispiel

getTenantUsers Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getTenantUsers(tenantId = "my-tenant-123", skip = 0.0)
3if response.isSome:
4 let tenantUsers = response.get()
5 echo "Fetched tenant users for my-tenant-123"
6 discard tenantUsers
7else:
8 echo "No users returned"
9 discard httpResponse
10

Mandantenbenutzer ersetzen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein
replaceTenantUserBody ReplaceTenantUserBody Nein
updateComments string Nein

Antwort

Gibt zurück: Option[FlagCommentPublic_200_response]

Beispiel

Beispiel für replaceTenantUser
Copy Copy
1
2let replaceBody = ReplaceTenantUserBody(name: "Jane Doe", email: "jane.doe@example.com", roles: @["moderator", "contributor"], banned: false)
3let (response, httpResponse) = client.replaceTenantUser(tenantId = "my-tenant-123", id = "user-789", replaceTenantUserBody = replaceBody, updateComments = "true")
4if response.isSome:
5 let updated = response.get()
6 echo updated
7else:
8 echo "No response returned"
9

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein
redirectURL string Nein

Antwort

Gibt zurück: Option[FlagCommentPublic_200_response]

Beispiel

sendLoginLink Beispiel
Copy Copy
1
2let (response, httpResponse) = client.sendLoginLink(tenantId = "fastcomments-tenant-42", id = "user-9876", redirectURL = "https://news.example.com/articles/2026/fastcomments-login")
3if response.isSome:
4 let loginResp = response.get()
5 echo "Login link sent successfully"
6else:
7 echo "Failed to send login link"
8

Mandantenbenutzer aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein
updateTenantUserBody UpdateTenantUserBody Nein
updateComments string Nein

Antwort

Gibt zurück: Option[FlagCommentPublic_200_response]

Beispiel

Beispiel für updateTenantUser
Copy Copy
1
2var body: UpdateTenantUserBody
3body.email = "jane.doe@example.com"
4body.displayName = "Jane Doe"
5body.roles = @["moderator", "editor"]
6body.isActive = true
7
8let (response, httpResponse) = client.updateTenantUser(
9 tenantId = "my-tenant-123",
10 id = "user-789",
11 updateTenantUserBody = body,
12 updateComments = "Promoted user to moderator and editor roles"
13)
14
15if response.isSome:
16 let flagResp = response.get()
17 echo flagResp
18else:
19 echo "Update failed, status: ", httpResponse.status
20

Mandant erstellen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createTenantBody CreateTenantBody Nein

Antwort

Gibt zurück: Option[CreateTenant_200_response]

Beispiel

createTenant Beispiel
Copy Copy
1
2let (response, httpResponse) = client.createTenant(tenantId = "my-tenant-123", createTenantBody = CreateTenantBody(
3 name: "My Tenant 123",
4 domain: "mytenant.example.com",
5 plan: "pro",
6 isActive: true,
7 allowedOrigins: @["https://www.example.com", "https://admin.example.com"]
8))
9if response.isSome:
10 let tenantInfo = response.get()
11 discard tenantInfo
12

Mandant löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein
sure string Nein

Antwort

Gibt zurück: Option[FlagCommentPublic_200_response]

Beispiel

deleteTenant Beispiel
Copy Copy
1
2let (response, httpResponse) = client.deleteTenant(tenantId = "my-tenant-123", id = "", sure = "")
3
4if response.isSome:
5 let flagResp = response.get()
6 echo "Tenant deletion response received for tenant: ", "my-tenant-123"
7 discard flagResp
8else:
9 echo "No response body returned for tenant deletion"
10

Mandant abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein

Antwort

Gibt zurück: Option[GetTenant_200_response]

Beispiel

getTenant Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getTenant(tenantId = "my-tenant-123", id = "")
3if response.isSome:
4 let tenant = response.get()
5 echo "Tenant retrieved"
6 discard tenant
7else:
8 echo "No tenant found"
9 echo "HTTP status:", httpResponse.status
10

Mandanten abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Yes
meta string No
skip float64 No

Antwort

Gibt zurück: Option[GetTenants_200_response]

Beispiel

Beispiel für getTenants
Copy Copy
1
2let (response, httpResponse) = client.getTenants(tenantId = "my-tenant-123", meta = "include=details", skip = 0.0)
3if response.isSome:
4 let tenants = response.get()
5 echo "Received tenants: ", repr(tenants)
6else:
7 echo "Failed to retrieve tenants"
8

Mandant aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein
updateTenantBody UpdateTenantBody Nein

Antwort

Gibt zurück: Option[FlagCommentPublic_200_response]

Beispiel

updateTenant Beispiel
Copy Copy
1
2let (response, httpResponse) = client.updateTenant(
3 tenantId = "my-tenant-123",
4 id = "tenant-456",
5 updateTenantBody = UpdateTenantBody()
6)
7if response.isSome:
8 let flagResponse = response.get()
9 echo flagResponse
10else:
11 echo "No body returned; HTTP status: ", httpResponse.status
12

Bild hochladen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
file string Nein
sizePreset SizePreset Nein
urlId string Ja

Antwort

Gibt zurück: Option[UploadImageResponse]

Beispiel

uploadImage Beispiel
Copy Copy
1
2let (response, httpResponse) = client.uploadImage(
3 tenantId = "my-tenant-123",
4 file = "assets/images/comment-avatar.jpg",
5 sizePreset = SizePreset.small,
6 urlId = "news/article-2025-11-22"
7)
8if response.isSome:
9 let upload = response.get()
10 echo "Uploaded image id: ", upload.id
11 echo "Uploaded image url: ", upload.url
12

Benutzerbadge-Fortschritt nach ID abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein

Antwort

Gibt zurück: Option[GetUserBadgeProgressById_200_response]

Beispiel

Beispiel für getUserBadgeProgressById
Copy Copy
1
2let (response, httpResponse) = client.getUserBadgeProgressById(tenantId = "my-tenant-123", id = "editor-badge-42")
3if response.isSome:
4 let badgeProgress = response.get()
5 echo "Badge progress received:"
6 echo badgeProgress
7else:
8 echo "No badge progress found for tenant 'my-tenant-123' and id 'editor-badge-42'"
9 echo httpResponse
10

Benutzerbadge-Fortschritt nach Benutzer-ID abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
userId string Nein

Antwort

Gibt zurück: Option[GetUserBadgeProgressById_200_response]

Beispiel

getUserBadgeProgressByUserId Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getUserBadgeProgressByUserId(tenantId = "my-tenant-123", userId = "user-456")
3if response.isSome:
4 let badgeProgress = response.get()
5 echo "Badge progress retrieved for user-456"
6else:
7 echo "No badge progress found, HTTP status: ", $httpResponse.status
8

Liste des Benutzerbadge-Fortschritts abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
userId string Nein
limit float64 Nein
skip float64 Nein

Antwort

Gibt zurück: Option[GetUserBadgeProgressList_200_response]

Beispiel

getUserBadgeProgressList Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getUserBadgeProgressList(tenantId = "my-tenant-123", userId = "user-9823", limit = 25.0, skip = 0.0)
3if response.isSome:
4 let badgeProgress = response.get()
5 echo "Badge progress received:", badgeProgress
6else:
7 echo "No badge progress. HTTP response:", httpResponse.status
8

Benutzerabzeichen erstellen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
createUserBadgeParams CreateUserBadgeParams Nein

Antwort

Gibt zurück: Option[CreateUserBadge_200_response]

Beispiel

createUserBadge Beispiel
Copy Copy
1
2let (response, httpResponse) = client.createUserBadge(tenantId = "my-tenant-123",
3 createUserBadgeParams = CreateUserBadgeParams(userId = "user-987", badgeId = "top-commenter"))
4if response.isSome:
5 let createdBadge = response.get()
6 echo "Created badge for user: ", createdBadge.userId
7else:
8 echo "Failed to create badge, status: ", $httpResponse.status
9

Benutzerabzeichen löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein

Antwort

Gibt zurück: Option[UpdateUserBadge_200_response]

Beispiel

deleteUserBadge Beispiel
Copy Copy
1
2let (response, httpResponse) = client.deleteUserBadge(tenantId = "my-tenant-123", id = "badge-456")
3if response.isSome:
4 let updated = response.get()
5 discard updated
6

Benutzerabzeichen abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein

Antwort

Gibt zurück: Option[GetUserBadge_200_response]

Beispiel

getUserBadge Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getUserBadge(tenantId = "my-tenant-123", id = "")
3
4if response.isSome:
5 let badge = response.get()
6 discard badge
7

Benutzerabzeichen abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
userId string Nein
badgeId string Nein
displayedOnComments bool Nein
limit float64 Nein
skip float64 Nein

Antwort

Gibt zurück: Option[GetUserBadges_200_response]

Beispiel

getUserBadges Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getUserBadges(
3 tenantId = "my-tenant-123",
4 userId = "user-789",
5 badgeId = "top-commenter",
6 displayedOnComments = true,
7 limit = 50.0,
8 skip = 0.0
9)
10
11if response.isSome:
12 let badges = response.get()
13 echo "Retrieved badges: ", $badges
14

Benutzerabzeichen aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein
updateUserBadgeParams UpdateUserBadgeParams Nein

Antwort

Gibt zurück: Option[UpdateUserBadge_200_response]

Beispiel

updateUserBadge Beispiel
Copy Copy
1
2let updateParams = UpdateUserBadgeParams(
3 name = "Top Contributor",
4 description = "Awarded for consistent high-quality comments",
5 active = true,
6 tags = @["community", "milestone"]
7)
8
9let (response, httpResponse) = client.updateUserBadge(tenantId = "my-tenant-123", id = "badge-456", updateUserBadgeParams = updateParams)
10
11if response.isSome:
12 let updated = response.get()
13 echo "Badge updated successfully"
14else:
15 echo "Failed to update badge, HTTP status: ", $httpResponse.status
16

Benutzer-Benachrichtigungszähler abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
sso string Nein

Antwort

Gibt zurück: Option[GetUserNotificationCount_200_response]

Beispiel

getUserNotificationCount Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getUserNotificationCount(tenantId = "my-tenant-123", sso = "")
3if response.isSome:
4 let notificationData = response.get()
5 echo "Received notification data: ", $notificationData
6else:
7 echo "No notification data returned. HTTP response: ", $httpResponse.status
8

Benutzerbenachrichtigungen abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Yes
pageSize int No
afterId string No
includeContext bool No
afterCreatedAt int64 No
unreadOnly bool No
dmOnly bool No
noDm bool No
includeTranslations bool No
sso string No

Antwort

Gibt zurück: Option[GetUserNotifications_200_response]

Beispiel

getUserNotifications Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getUserNotifications(
3 tenantId = "my-tenant-123",
4 pageSize = 50,
5 afterId = "notif_9a1b2c3d",
6 includeContext = true,
7 afterCreatedAt = int64(1699999999000),
8 unreadOnly = false,
9 dmOnly = false,
10 noDm = false,
11 includeTranslations = false,
12 sso = ""
13)
14if response.isSome:
15 let notifications = response.get()
16 discard notifications
17else:
18 discard httpResponse
19

Benutzer-Benachrichtigungszähler zurücksetzen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
sso string Nein

Antwort

Gibt zurück: Option[ResetUserNotifications_200_response]

Beispiel

resetUserNotificationCount Beispiel
Copy Copy
1
2let (response, httpResponse) = client.resetUserNotificationCount(tenantId = "my-tenant-123", sso = "sso-jwt-9a8b7c6d")
3if response.isSome:
4 let resetResult = response.get()
5 echo resetResult
6else:
7 echo "Reset failed, status: ", httpResponse.status
8

Benutzerbenachrichtigungen zurücksetzen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
afterId string Nein
afterCreatedAt int64 Nein
unreadOnly bool Nein
dmOnly bool Nein
noDm bool Nein
sso string Nein

Antwort

Gibt zurück: Option[ResetUserNotifications_200_response]

Beispiel

resetUserNotifications Beispiel
Copy Copy
1
2let (response, httpResponse) = client.resetUserNotifications(
3 tenantId = "my-tenant-123",
4 afterId = "",
5 afterCreatedAt = int64(0),
6 unreadOnly = false,
7 dmOnly = false,
8 noDm = false,
9 sso = ""
10)
11
12if response.isSome:
13 let result = response.get()
14

Kommentar-Abonnementstatus des Benutzers aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
notificationId string Nein
optedInOrOut string Nein
commentId string Ja
sso string Nein

Antwort

Gibt zurück: Option[UpdateUserNotificationStatus_200_response]

Beispiel

Beispiel für updateUserNotificationCommentSubscriptionStatus
Copy Copy
1
2let (response, httpResponse) = client.updateUserNotificationCommentSubscriptionStatus(
3 tenantId = "my-tenant-123",
4 notificationId = "notif-456",
5 optedInOrOut = "opted_in",
6 commentId = "cmt-789",
7 sso = "sso-token-abc"
8)
9if response.isSome:
10 let updatedStatus = response.get()
11 discard updatedStatus
12else:
13 discard httpResponse
14

Seiten-Abonnementstatus des Benutzers aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
urlId string Ja
url string Nein
pageTitle string Nein
subscribedOrUnsubscribed string Nein
sso string Nein

Antwort

Gibt zurück: Option[UpdateUserNotificationStatus_200_response]

Beispiel

updateUserNotificationPageSubscriptionStatus Beispiel
Copy Copy
1
2let (response, httpResponse) = client.updateUserNotificationPageSubscriptionStatus(
3 tenantId = "my-tenant-123",
4 urlId = "news/article-2025-11-22",
5 url = "https://example.com/news/article-2025-11-22",
6 pageTitle = "Breaking News: Market Update",
7 subscribedOrUnsubscribed = "subscribed",
8 sso = "sso-token-abc123"
9)
10
11if response.isSome:
12 let result = response.get()
13 discard result
14

Benachrichtigungsstatus des Benutzers aktualisieren Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
notificationId string Nein
newStatus string Nein
sso string Nein

Response

Rückgabe: Option[UpdateUserNotificationStatus_200_response]

Beispiel

updateUserNotificationStatus Beispiel
Copy Copy
1
2let (response, httpResponse) = client.updateUserNotificationStatus(
3 tenantId = "my-tenant-123",
4 notificationId = "notif-456",
5 newStatus = "read",
6 sso = "sso-abc-789"
7)
8if response.isSome:
9 let updateResp = response.get()
10 discard updateResp
11

Status der Benutzeranwesenheit abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
urlIdWS string Nein
userIds string Nein

Antwort

Gibt zurück: Option[GetUserPresenceStatuses_200_response]

Beispiel

getUserPresenceStatuses Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getUserPresenceStatuses(
3 tenantId = "my-tenant-123",
4 urlIdWS = "news/2025/technology/ai-ethics",
5 userIds = "user-789,user-456"
6)
7if response.isSome:
8 let presence = response.get()
9 echo "Presence received: ", presence
10else:
11 echo "No presence information returned, HTTP status: ", httpResponse.status.code
12

Benutzer suchen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
urlId string Ja
usernameStartsWith string Nein
mentionGroupIds seq[string] Nein
sso string Nein

Antwort

Gibt zurück: Option[SearchUsers_200_response]

Beispiel

searchUsers Beispiel
Copy Copy
1
2let (response, httpResponse) = client.searchUsers(
3 tenantId = "my-tenant-123",
4 urlId = "news/article-title",
5 usernameStartsWith = "jo",
6 mentionGroupIds = @["editors", "sports-team"],
7 sso = "sso-abc-456"
8)
9
10if response.isSome:
11 let users = response.get()
12 echo "Users found: ", users
13else:
14 echo "No users found; HTTP status: ", httpResponse.status
15

Benutzer abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein

Antwort

Gibt zurück: Option[GetUser_200_response]

Beispiel

getUser Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getUser(tenantId = "my-tenant-123", id = "user-9876")
3if response.isSome:
4 let user = response.get()
5 echo "User:", user
6else:
7 echo "No user found. HTTP response:", httpResponse
8

Abstimmung erstellen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
commentId string Ja
direction string Nein
userId string Nein
anonUserId string Nein

Antwort

Gibt zurück: Option[VoteComment_200_response]

Beispiel

createVote Beispiel
Copy Copy
1
2let (response, httpResponse) = client.createVote(
3 tenantId = "my-tenant-123",
4 commentId = "cmt-987654321",
5 direction = "up",
6 userId = "user-42",
7 anonUserId = ""
8)
9if response.isSome:
10 let vote = response.get()
11 echo "Vote recorded: ", $vote
12else:
13 echo "Vote not created, HTTP response: ", $httpResponse
14

Abstimmung löschen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
id string Nein
editKey string Nein

Antwort

Gibt zurück: Option[DeleteCommentVote_200_response]

Beispiel

deleteVote Beispiel
Copy Copy
1
2let (response, httpResponse) = client.deleteVote(tenantId = "my-tenant-123", id = "", editKey = "")
3if response.isSome:
4 let deleted = response.get()
5 discard deleted
6

Abstimmungen abrufen Internal Link


Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
urlId string Ja

Antwort

Gibt zurück: Option[GetVotes_200_response]

Beispiel

getVotes Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getVotes(tenantId = "my-tenant-123", urlId = "news/2026/major-update")
3if response.isSome:
4 let votes = response.get()
5 discard votes
6else:
7 discard httpResponse
8

Abstimmungen für Benutzer abrufen Internal Link

Parameter

Name Typ Erforderlich Beschreibung
tenantId string Ja
urlId string Ja
userId string Nein
anonUserId string Nein

Antwort

Gibt zurück: Option[GetVotesForUser_200_response]

Beispiel

getVotesForUser Beispiel
Copy Copy
1
2let (response, httpResponse) = client.getVotesForUser(
3 tenantId = "my-tenant-123",
4 urlId = "news/economy-update-2026",
5 userId = "user-789",
6 anonUserId = ""
7)
8
9if response.isSome:
10 let votes = response.get()
11 discard votes
12

Benötigen Sie Hilfe?

Wenn Sie auf Probleme stoßen oder Fragen zum Nim SDK haben, bitte:

Mitwirken

Beiträge sind willkommen! Bitte besuchen Sie das GitHub-Repository für Beitragsrichtlinien.