FastComments.com

FastComments Nim SDK

これは FastComments の公式 Nim SDK です。

FastComments API の公式 Nim SDK

Repository

GitHub で表示


要件 Internal Link


  • Nim >= 1.6.0
  • nimcrypto >= 0.5.4

インストール Internal Link

Nimble の使用方法

nimble install fastcomments

ソースからビルドする

nimble build

ライブラリの内容

このライブラリには、生成された API クライアントと、API の操作を簡単にする SSO ユーティリティが含まれています。

公開 API と保護された API

API クライアントには、api_defaultapi_public の 2 つの API モジュールがあります。api_default は API キーを必要とするメソッドを含み、api_public は認証なしでブラウザやモバイル端末などから直接実行できる API 呼び出しを含みます。

クイックスタート Internal Link

認証済みAPIの使用 (DefaultAPI)

重要: 認証されたエンドポイントは、APIキーを x-api-key ヘッダーとして設定する必要があります。

import httpclient
import fastcomments
import fastcomments/apis/api_default
import fastcomments/models/model_comment_data

let client = newHttpClient()
client.headers["x-api-key"] = "your-api-key"

# 認証済みのAPI呼び出しを行う
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"

パブリックAPIの使用 (PublicAPI)

パブリックなエンドポイントは認証を必要としません:

import httpclient
import fastcomments
import fastcomments/apis/api_public

let client = newHttpClient()

# パブリックAPI呼び出しを行う
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"

よくある問題

  1. 401 認証エラー: DefaultAPI へのリクエストを行う前に、HttpClient の x-api-key ヘッダーを設定していることを確認してください: client.headers["x-api-key"] = "your-api-key"
  2. API クラスの間違い: サーバー側の認証済みリクエストには api_default を、クライアント側/パブリックなリクエストには api_public を使用してください。

API の呼び出し Internal Link


このSDKのすべてのAPIメソッドは (Option[ResponseType], Response) のタプルを返します。最初の要素には成功時のパース済みレスポンスが含まれ、2番目の要素は生のHTTPレスポンスです。

例: コメントの取得

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"

注意事項 Internal Link

ブロードキャストID

いくつかの API 呼び出しでは broadcastId を渡す必要があることがわかります。イベントを受け取ったときにこの ID が返されるので、クライアント側で楽観的に変更を適用するつもりなら、そのイベントを無視すべきかどうか判断できます (これは最良の体験を提供するので、おそらくそうしたいでしょう)。ここには UUID を渡してください。ID はブラウザセッション中に二度発生しない程度に十分一意であるべきです。

SSO (シングルサインオン)

SSO の例は以下を参照してください。

SSO の使用法 Internal Link


シンプルな SSO

import fastcomments/sso

let user = newSimpleSSOUserData(
  userId = "user-123",
  email = "user@example.com",
  avatar = "https://example.com/avatar.jpg"
)
let sso = newSimple(simpleUserData = user)
let token = sso.createToken()

echo "SSO Token: ", token

セキュアな SSO

import fastcomments/sso

let user = newSecureSSOUserData(
  userId = "user-123",
  email = "user@example.com",
  username = "johndoe",
  avatar = "https://example.com/avatar.jpg"
)

let apiKey = "your-api-key"
let sso = newSecure(apiKey = apiKey, secureUserData = user)
let token = sso.createToken()

echo "Secure SSO Token: ", token

集計 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
aggregationRequest AggregationRequest いいえ
parentTenantId string いいえ
includeStats bool いいえ

レスポンス

戻り値: Option[AggregationResponse]

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

監査ログを取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
limit float64 いいえ
skip float64 いいえ
order SORTDIR いいえ
after float64 いいえ
before float64 いいえ

レスポンス

戻り値: Option[GetAuditLogs_200_response]

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

コメントからブロック(公開) Internal Link

パラメータ

Name Type Required Description
tenantId string はい
commentId string はい
publicBlockFromCommentParams PublicBlockFromCommentParams いいえ
sso string いいえ

レスポンス

返却値: Option[BlockFromCommentPublic_200_response]

blockFromCommentPublic の例
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

コメントのブロック解除(公開) Internal Link

パラメータ

名前 必須 説明
tenantId string はい
commentId string はい
publicBlockFromCommentParams PublicBlockFromCommentParams いいえ
sso string いいえ

レスポンス

戻り値: Option[UnBlockCommentPublic_200_response]

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

ブロック対象のコメントを確認 Internal Link

パラメータ

Name Type Required Description
tenantId string はい
commentIds string いいえ
sso string いいえ

レスポンス

返り値: Option[CheckedCommentsForBlocked_200_response]

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

コメントでユーザーをブロック Internal Link

パラメータ

名称 必須 説明
tenantId string はい
id string いいえ
blockFromCommentParams BlockFromCommentParams いいえ
userId string いいえ
anonUserId string いいえ

レスポンス

戻り値: Option[BlockFromCommentPublic_200_response]

blockUserFromComment の例
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

コメントを作成(公開) Internal Link

パラメータ

Name Type Required Description
tenantId string はい
urlId string はい
broadcastId string いいえ
commentData CommentData いいえ
sessionId string いいえ
sso string いいえ

レスポンス

戻り値: Option[CreateCommentPublic_200_response]

createCommentPublic の例
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

コメントを削除 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ
contextUserId string いいえ
isLive bool いいえ

レスポンス

返却値: Option[DeleteComment_200_response]

deleteComment の例
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

コメントを削除(公開) Internal Link

パラメータ

名前 必須 説明
tenantId string はい
commentId string はい
broadcastId string いいえ
editKey string いいえ
sso string いいえ

レスポンス

戻り値: Option[DeleteCommentPublic_200_response]

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

コメントの投票を削除 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
commentId string はい
voteId string いいえ
urlId string はい
broadcastId string いいえ
editKey string いいえ
sso string いいえ

レスポンス

戻り値: Option[DeleteCommentVote_200_response]

deleteCommentVote の例
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

コメントを通報 Internal Link


パラメータ

名前 必須 説明
tenantId string はい
id string いいえ
userId string いいえ
anonUserId string いいえ

レスポンス

戻り値: Option[FlagComment_200_response]

flagCommentの例
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

コメントを取得 Internal Link

パラメータ

Name Type Required Description
tenantId string はい
id string いいえ

レスポンス

戻り値: Option[GetComment_200_response]

getComment の例
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

コメントを取得 Internal Link

パラメータ

Name Type Required Description
tenantId string はい
page int いいえ
limit int いいえ
skip int いいえ
asTree bool いいえ
skipChildren int いいえ
limitChildren int いいえ
maxTreeDepth int いいえ
urlId string はい
userId string いいえ
anonUserId string いいえ
contextUserId string いいえ
hashTag string いいえ
parentId string いいえ
direction SortDirections いいえ

レスポンス

戻り値: Option[GetComments_200_response]

getComments の例
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

コメントを取得(公開) Internal Link

パラメータ

名前 必須 説明
tenantId string はい
urlId string はい
page int いいえ
direction SortDirections いいえ
sso string いいえ
skip int いいえ
skipChildren int いいえ
limit int いいえ
limitChildren int いいえ
countChildren bool いいえ
fetchPageForCommentId string いいえ
includeConfig bool いいえ
countAll bool いいえ
includei10n bool いいえ
locale string いいえ
modules string いいえ
isCrawler bool いいえ
includeNotificationCount bool いいえ
asTree bool いいえ
maxTreeDepth int いいえ
useFullTranslationIds bool いいえ
parentId string いいえ
searchText string いいえ
hashTags seq[string] いいえ
userId string いいえ
customConfigStr string いいえ
afterCommentId string いいえ
beforeCommentId string いいえ

レスポンス

戻り値: Option[GetCommentsPublic_200_response]

getCommentsPublic の例
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

コメントのテキストを取得 Internal Link

パラメータ

Name Type Required Description
tenantId string はい
commentId string はい
editKey string いいえ
sso string いいえ

レスポンス

戻り値: Option[GetCommentText_200_response]

getCommentText の例
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

コメントに投票したユーザー名を取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
commentId string はい
dir int いいえ
sso string いいえ

レスポンス

戻り値: Option[GetCommentVoteUserNames_200_response]

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

コメントをロック Internal Link

パラメータ

名前 必須 説明
tenantId string はい
commentId string はい
broadcastId string いいえ
sso string いいえ

レスポンス

返却: Option[LockComment_200_response]

lockComment の例
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

コメントをピン留め Internal Link

パラメータ

名前 必須 説明
tenantId string はい
commentId string はい
broadcastId string いいえ
sso string いいえ

レスポンス

戻り値: Option[PinComment_200_response]

pinComment の例
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

コメントを保存 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
createCommentParams CreateCommentParams いいえ
isLive bool いいえ
doSpamCheck bool いいえ
sendEmails bool いいえ
populateNotifications bool いいえ

レスポンス

戻り値: Option[SaveComment_200_response]

saveComment の例
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

コメントを一括保存 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
createCommentParams seq[CreateCommentParams] いいえ
isLive bool いいえ
doSpamCheck bool いいえ
sendEmails bool いいえ
populateNotifications bool): (Option[seq[SaveComment_200_response]] いいえ
id string いいえ
unBlockFromCommentParams UnBlockFromCommentParams いいえ
userId string いいえ
anonUserId string いいえ

レスポンス

戻り値: Option[UnBlockCommentPublic_200_response]

saveCommentsBulk の例
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

コメントのテキストを設定 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
commentId string はい
broadcastId string いいえ
commentTextUpdateRequest CommentTextUpdateRequest いいえ
editKey string いいえ
sso string いいえ

レスポンス

戻り値: Option[SetCommentText_200_response]

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

コメントからユーザーのブロックを解除 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ
unBlockFromCommentParams UnBlockFromCommentParams いいえ
userId string いいえ
anonUserId string いいえ

レスポンス

戻り値: Option[UnBlockCommentPublic_200_response]

unBlockUserFromComment の例
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

コメントの通報を解除 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ
userId string いいえ
anonUserId string いいえ

レスポンス

戻り値: Option[FlagComment_200_response]

unFlagComment の例
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

コメントのロックを解除 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
commentId string はい
broadcastId string いいえ
sso string いいえ

レスポンス

返却値: Option[LockComment_200_response]

unLockComment の例
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

コメントのピン留めを解除 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
commentId string はい
broadcastId string いいえ
sso string いいえ

レスポンス

戻り値: Option[PinComment_200_response]

unPinComment の例
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

コメントを更新 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ
updatableCommentParams UpdatableCommentParams いいえ
contextUserId string いいえ
doSpamCheck bool いいえ
isLive bool いいえ

レスポンス

戻り値: Option[FlagCommentPublic_200_response]

updateComment の例
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

コメントに投票 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
commentId string はい
urlId string はい
broadcastId string いいえ
voteBodyParams VoteBodyParams いいえ
sessionId string いいえ
sso string いいえ

レスポンス

戻り値: Option[VoteComment_200_response]

voteComment の例
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

ドメイン設定を追加 Internal Link

パラメータ

Name Type Required Description
tenantId string はい
addDomainConfigParams AddDomainConfigParams いいえ

レスポンス

戻り値: Option[AddDomainConfig_200_response]

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

ドメイン設定を削除 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
domain string いいえ

レスポンス

戻り値: Option[DeleteDomainConfig_200_response]

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

ドメイン設定を取得 Internal Link

パラメータ

名称 必須 説明
tenantId string はい
domain string いいえ

レスポンス

戻り値: Option[GetDomainConfig_200_response]

getDomainConfig の例
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

ドメイン設定を取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい

レスポンス

戻り値: Option[GetDomainConfigs_200_response]

getDomainConfigs の例
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

ドメイン設定を部分更新 Internal Link


パラメータ

名前 必須 説明
tenantId string はい
domainToUpdate string いいえ
patchDomainConfigParams PatchDomainConfigParams いいえ

レスポンス

返却: Option[GetDomainConfig_200_response]

patchDomainConfig の例
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

ドメイン設定を置換 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
domainToUpdate string いいえ
updateDomainConfigParams UpdateDomainConfigParams いいえ

レスポンス

戻り値: Option[GetDomainConfig_200_response]

putDomainConfig の例
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

メールテンプレートを作成 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
createEmailTemplateBody CreateEmailTemplateBody いいえ

レスポンス

返却値: Option[CreateEmailTemplate_200_response]

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

メールテンプレートを削除 Internal Link


パラメータ

名前 必須 説明
tenantId string はい
id string いいえ

レスポンス

戻り値: Option[FlagCommentPublic_200_response]

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

メールテンプレートのレンダーエラーを削除 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ
errorId string いいえ

レスポンス

戻り値: Option[FlagCommentPublic_200_response]

deleteEmailTemplateRenderError の例
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

メールテンプレートを取得 Internal Link

パラメータ

Name Type Required Description
tenantId string はい
id string いいえ

レスポンス

返却値: Option[GetEmailTemplate_200_response]

getEmailTemplate の例
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

メールテンプレート定義を取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい

レスポンス

戻り値: Option[GetEmailTemplateDefinitions_200_response]

getEmailTemplateDefinitionsの例
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

メールテンプレートのレンダーエラーを取得 Internal Link

パラメータ

Name Type Required Description
tenantId string はい
id string いいえ
skip float64 いいえ

レスポンス

戻り値: Option[GetEmailTemplateRenderErrors_200_response]

getEmailTemplateRenderErrors Example
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

メールテンプレートを取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
skip float64 いいえ

レスポンス

戻り値: Option[GetEmailTemplates_200_response]

getEmailTemplates の例
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

メールテンプレートをレンダー Internal Link

パラメータ

Name Type Required Description
tenantId string はい
renderEmailTemplateBody RenderEmailTemplateBody いいえ
locale string いいえ

レスポンス

戻り値: Option[RenderEmailTemplate_200_response]

renderEmailTemplate の例
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

メールテンプレートを更新 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ
updateEmailTemplateBody UpdateEmailTemplateBody いいえ

レスポンス

返却: Option[FlagCommentPublic_200_response]

updateEmailTemplate の例
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

イベントログを取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
urlId string はい
userIdWS string いいえ
startTime int64 いいえ
endTime int64 いいえ

レスポンス

戻り値: Option[GetEventLog_200_response]

getEventLog の例
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

グローバルイベントログを取得 Internal Link

パラメータ

Name Type Required Description
tenantId string はい
urlId string はい
userIdWS string いいえ
startTime int64 いいえ
endTime int64 いいえ

レスポンス

戻り値: Option[GetEventLog_200_response]

getGlobalEventLog の例
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

フィード投稿を作成 Internal Link

パラメータ

Name Type Required Description
tenantId string はい
createFeedPostParams CreateFeedPostParams いいえ
broadcastId string いいえ
isLive bool いいえ
doSpamCheck bool いいえ
skipDupCheck bool いいえ

レスポンス

戻り値: Option[CreateFeedPost_200_response]

createFeedPost の例
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

フィード投稿を作成(公開) Internal Link

パラメータ

名前 必須 説明
tenantId string はい
createFeedPostParams CreateFeedPostParams いいえ
broadcastId string いいえ
sso string いいえ

レスポンス

戻り値: Option[CreateFeedPostPublic_200_response]

createFeedPostPublic の例
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

フィード投稿を削除(公開) Internal Link

パラメータ

Name Type Required Description
tenantId string はい
postId string いいえ
broadcastId string いいえ
sso string いいえ

レスポンス

返却: Option[DeleteFeedPostPublic_200_response]

deleteFeedPostPublic の例
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

フィード投稿を取得 Internal Link

パラメーター

名前 必須 説明
tenantId string はい
afterId string いいえ
limit int いいえ
tags seq[string] いいえ

レスポンス

戻り値: Option[GetFeedPosts_200_response]

getFeedPosts の例
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

フィード投稿を取得(公開) Internal Link

パラメータ

名前 必須 説明
tenantId string はい
afterId string いいえ
limit int いいえ
tags seq[string] いいえ
sso string いいえ
isCrawler bool いいえ
includeUserInfo bool いいえ

レスポンス

戻り値: Option[GetFeedPostsPublic_200_response]

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

フィード投稿の統計を取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
postIds seq[string] いいえ
sso string いいえ

レスポンス

戻り値: Option[GetFeedPostsStats_200_response]

getFeedPostsStats の例
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

ユーザーのリアクションを取得(公開) Internal Link

パラメータ

名前 必須 説明
tenantId string はい
postIds seq[string] いいえ
sso string いいえ

レスポンス

戻り値: Option[GetUserReactsPublic_200_response]

getUserReactsPublic の例
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

フィード投稿にリアクション(公開) Internal Link

パラメータ

Name Type Required Description
tenantId string はい
postId string いいえ
reactBodyParams ReactBodyParams いいえ
isUndo bool いいえ
broadcastId string いいえ
sso string いいえ

レスポンス

戻り値: Option[ReactFeedPostPublic_200_response]

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

フィード投稿を更新 Internal Link

パラメータ

Name Type Required Description
tenantId string はい
id string いいえ
feedPost FeedPost いいえ

レスポンス

戻り値: Option[FlagCommentPublic_200_response]

updateFeedPost の例
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

フィード投稿を更新(公開) Internal Link

パラメータ

Name Type Required Description
tenantId string Yes
postId string No
updateFeedPostParams UpdateFeedPostParams No
broadcastId string No
sso string No

レスポンス

戻り値: Option[CreateFeedPostPublic_200_response]

updateFeedPostPublic の例
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

コメントを通報(公開) Internal Link

パラメータ

名前 必須 説明
tenantId string はい
commentId string はい
isFlagged bool いいえ
sso string いいえ

レスポンス

戻り値: Option[FlagCommentPublic_200_response]

flagCommentPublic の例
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

ハッシュタグを追加 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
createHashTagBody CreateHashTagBody いいえ

レスポンス

戻り値: Option[AddHashTag_200_response]

addHashTag の例
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

ハッシュタグを一括追加 Internal Link

パラメータ

Name Type Required Description
tenantId string はい
bulkCreateHashTagsBody BulkCreateHashTagsBody いいえ

レスポンス

戻り値: Option[AddHashTagsBulk_200_response]

addHashTagsBulk の例
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

ハッシュタグを削除 Internal Link

パラメータ

名前 必須 説明
tag string いいえ
tenantId string はい
deleteHashTagRequest DeleteHashTagRequest いいえ

レスポンス

戻り値: Option[FlagCommentPublic_200_response]

deleteHashTag の例
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

ハッシュタグを取得 Internal Link


パラメータ

名前 必須 説明
tenantId string はい
page float64 いいえ

レスポンス

戻り値: Option[GetHashTags_200_response]

getHashTags の例
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

ハッシュタグを部分更新 Internal Link

パラメータ

Name Type Required Description
tag string いいえ
tenantId string はい
updateHashTagBody UpdateHashTagBody いいえ

レスポンス

戻り値: Option[PatchHashTag_200_response]

patchHashTag の例
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

モデレーターを作成 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
createModeratorBody CreateModeratorBody いいえ

レスポンス

返却値: Option[CreateModerator_200_response]

createModerator の例
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

モデレーターを削除 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ
sendEmail string いいえ

レスポンス

返却: Option[FlagCommentPublic_200_response]

deleteModerator の例
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

モデレーターを取得 Internal Link

パラメータ

名前 Type 必須 説明
tenantId string はい
id string いいえ

レスポンス

戻り値: Option[GetModerator_200_response]

getModerator の例
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

モデレーターを取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
skip float64 いいえ

レスポンス

戻り値: Option[GetModerators_200_response]

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

モデレーターを更新 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ
updateModeratorBody UpdateModeratorBody いいえ

レスポンス

返却値: Option[FlagCommentPublic_200_response]

updateModerator の例
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

通知数を削除 Internal Link

パラメーター

名前 Type 必須 説明
tenantId string はい
id string いいえ

レスポンス

戻り値: Option[FlagCommentPublic_200_response]

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

キャッシュされた通知数を取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ

レスポンス

戻り値: Option[GetCachedNotificationCount_200_response]

getCachedNotificationCount の例
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

通知数を取得 Internal Link

パラメータ

Name Type 必須 説明
tenantId string 必須
userId string 任意
urlId string 必須
fromCommentId string 任意
viewed bool 任意

レスポンス

返却: Option[GetNotificationCount_200_response]

getNotificationCount の例
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

通知を取得 Internal Link

パラメータ

Name Type Required Description
tenantId string はい
userId string いいえ
urlId string はい
fromCommentId string いいえ
viewed bool いいえ
skip float64 いいえ

レスポンス

戻り値: Option[GetNotifications_200_response]

getNotifications の例
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

通知を更新 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ
updateNotificationBody UpdateNotificationBody いいえ
userId string いいえ

レスポンス

戻り値: Option[FlagCommentPublic_200_response]

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

ページを追加 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
createAPIPageData CreateAPIPageData いいえ

レスポンス

戻り値: Option[AddPageAPIResponse]

addPage の例
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

ページを削除 Internal Link


パラメータ

名前 必須 説明
tenantId string はい
id string いいえ

レスポンス

戻り値: Option[DeletePageAPIResponse]

deletePage の例
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

URL ID でページを取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
urlId string はい

レスポンス

戻り値: Option[GetPageByURLIdAPIResponse]

getPageByURLId の例
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

ページを取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい

レスポンス

戻り値: Option[GetPagesAPIResponse]

getPages の例
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

ページを部分更新 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ
updateAPIPageData UpdateAPIPageData いいえ

レスポンス

戻り値: Option[PatchPageAPIResponse]

patchPage の例
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

保留中のWebhookイベントを削除 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ

レスポンス

戻り値: Option[FlagCommentPublic_200_response]

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

保留中のWebhookイベント数を取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
commentId string はい
externalId string いいえ
eventType string いいえ
domain string いいえ
attemptCountGT float64 いいえ

レスポンス

戻り値: Option[GetPendingWebhookEventCount_200_response]

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

保留中のWebhookイベントを取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
commentId string はい
externalId string いいえ
eventType string いいえ
domain string いいえ
attemptCountGT float64 いいえ
skip float64 いいえ

レスポンス

戻り値: Option[GetPendingWebhookEvents_200_response]

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

質問設定を作成 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
createQuestionConfigBody CreateQuestionConfigBody いいえ

レスポンス

戻り値: Option[CreateQuestionConfig_200_response]

createQuestionConfig の例
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

質問設定を削除 Internal Link

パラメータ

Name Type 必須 説明
tenantId string はい
id string いいえ

レスポンス

戻り値: Option[FlagCommentPublic_200_response]

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

質問設定を取得 Internal Link

パラメータ

Name Type Required Description
tenantId string Yes
id string No

レスポンス

戻り値: Option[GetQuestionConfig_200_response]

getQuestionConfig の例
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

質問設定を取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
skip float64 いいえ

レスポンス

戻り値: Option[GetQuestionConfigs_200_response]

getQuestionConfigs の例
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

質問設定を更新 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ
updateQuestionConfigBody UpdateQuestionConfigBody いいえ

レスポンス

返り値: Option[FlagCommentPublic_200_response]

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

質問結果を作成 Internal Link

パラメータ

Name Type Required Description
tenantId string はい
createQuestionResultBody CreateQuestionResultBody いいえ

レスポンス

返却値: Option[CreateQuestionResult_200_response]

createQuestionResult の例
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

質問結果を削除 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ

レスポンス

返却: Option[FlagCommentPublic_200_response]

deleteQuestionResult の例
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

質問結果を取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ

レスポンス

戻り値: Option[GetQuestionResult_200_response]

getQuestionResultの例
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

質問結果を取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
urlId string はい
userId string いいえ
startDate string いいえ
questionId string いいえ
questionIds string いいえ
skip float64 いいえ

レスポンス

戻り値: Option[GetQuestionResults_200_response]

getQuestionResults の例
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

質問結果を更新 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ
updateQuestionResultBody UpdateQuestionResultBody いいえ

レスポンス

返却値: Option[FlagCommentPublic_200_response]

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

質問結果を集計 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
questionId string いいえ
questionIds seq[string] いいえ
urlId string はい
timeBucket AggregateTimeBucket いいえ
startDate string いいえ
forceRecalculate bool いいえ

レスポンス

戻り値: Option[AggregateQuestionResults_200_response]

aggregateQuestionResults の例
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

質問結果を一括集計 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
bulkAggregateQuestionResultsRequest BulkAggregateQuestionResultsRequest いいえ
forceRecalculate bool いいえ

レスポンス

戻り値: Option[BulkAggregateQuestionResults_200_response]

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

コメントと質問結果を結合 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
questionId string いいえ
questionIds seq[string] いいえ
urlId string はい
startDate string いいえ
forceRecalculate bool いいえ
minValue float64 いいえ
maxValue float64 いいえ
limit float64 いいえ

レスポンス

戻り値: Option[CombineCommentsWithQuestionResults_200_response]

combineCommentsWithQuestionResults の例
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ユーザーを追加 Internal Link


パラメータ

名前 必須 説明
tenantId string はい
createAPISSOUserData CreateAPISSOUserData いいえ

レスポンス

戻り値: Option[AddSSOUserAPIResponse]

addSSOUser の例
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ユーザーを削除 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ
deleteComments bool いいえ
commentDeleteMode string いいえ

レスポンス

返却値: Option[DeleteSSOUserAPIResponse]

deleteSSOUser の例
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ユーザーを取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
email string いいえ

レスポンス

戻り値: Option[GetSSOUserByEmailAPIResponse]

getSSOUserByEmail の例
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

IDでSSOユーザーを取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ

レスポンス

戻り値: Option[GetSSOUserByIdAPIResponse]

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ユーザーを取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
skip int いいえ

レスポンス

戻り値: Option[GetSSOUsers_200_response]

getSSOUsers の例
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ユーザーを部分更新 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ
updateAPISSOUserData UpdateAPISSOUserData いいえ
updateComments bool いいえ

レスポンス

返却値: Option[PatchSSOUserAPIResponse]

patchSSOUser の例
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ユーザーを置換 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ
updateAPISSOUserData UpdateAPISSOUserData いいえ
updateComments bool いいえ

レスポンス

戻り値: Option[PutSSOUserAPIResponse]

putSSOUser の例
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

サブスクリプションを作成 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
createAPIUserSubscriptionData CreateAPIUserSubscriptionData いいえ

レスポンス

戻り値: Option[CreateSubscriptionAPIResponse]

createSubscription の例
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

サブスクリプションを削除 Internal Link

パラメータ

Name Type Required Description
tenantId string はい
id string いいえ
userId string いいえ

レスポンス

戻り値: Option[DeleteSubscriptionAPIResponse]

deleteSubscription の例
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

サブスクリプションを取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
userId string いいえ

レスポンス

戻り値: Option[GetSubscriptionsAPIResponse]

getSubscriptions の例
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

テナントの日次使用量を取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
yearNumber float64 いいえ
monthNumber float64 いいえ
dayNumber float64 いいえ
skip float64 いいえ

レスポンス

戻り値: Option[GetTenantDailyUsages_200_response]

getTenantDailyUsages の例
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

テナントパッケージを作成 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
createTenantPackageBody CreateTenantPackageBody いいえ

レスポンス

返却値: Option[CreateTenantPackage_200_response]

createTenantPackage の例
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

テナントパッケージを削除 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ

レスポンス

戻り値: Option[FlagCommentPublic_200_response]

deleteTenantPackage の例
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

テナントパッケージを取得 Internal Link


パラメータ

名前 必須 説明
tenantId string はい
id string いいえ

レスポンス

返り値: Option[GetTenantPackage_200_response]

getTenantPackage の例
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

テナントパッケージを取得 Internal Link


パラメータ

名前 必須 説明
tenantId string はい
skip float64 いいえ

レスポンス

返り値: Option[GetTenantPackages_200_response]

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

テナントパッケージを置換 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ
replaceTenantPackageBody ReplaceTenantPackageBody いいえ

レスポンス

戻り値: Option[FlagCommentPublic_200_response]

replaceTenantPackage の例
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

テナントパッケージを更新 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ
updateTenantPackageBody UpdateTenantPackageBody いいえ

レスポンス

戻り値: Option[FlagCommentPublic_200_response]

updateTenantPackage の例
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

テナントユーザーを作成 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
createTenantUserBody CreateTenantUserBody いいえ

レスポンス

戻り値: Option[CreateTenantUser_200_response]

createTenantUser の例
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

テナントユーザーを削除 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ
deleteComments string いいえ
commentDeleteMode string いいえ

レスポンス

戻り値: Option[FlagCommentPublic_200_response]

deleteTenantUser の例
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

テナントユーザーを取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ

レスポンス

戻り値: Option[GetTenantUser_200_response]

getTenantUser の例
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

テナントユーザーを取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
skip float64 いいえ

レスポンス

戻り値: Option[GetTenantUsers_200_response]

getTenantUsers の例
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

テナントユーザーを置換 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ
replaceTenantUserBody ReplaceTenantUserBody いいえ
updateComments string いいえ

レスポンス

返却: Option[FlagCommentPublic_200_response]

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

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ
redirectURL string いいえ

レスポンス

戻り値: Option[FlagCommentPublic_200_response]

sendLoginLink の例
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

テナントユーザーを更新 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ
updateTenantUserBody UpdateTenantUserBody いいえ
updateComments string いいえ

レスポンス

戻り値: Option[FlagCommentPublic_200_response]

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

テナントを作成 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
createTenantBody CreateTenantBody いいえ

レスポンス

戻り値: Option[CreateTenant_200_response]

createTenant の例
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

テナントを削除 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ
sure string いいえ

レスポンス

戻り値: Option[FlagCommentPublic_200_response]

deleteTenant の例
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

テナントを取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ

レスポンス

戻り値: Option[GetTenant_200_response]

getTenant の例
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

テナントを取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
meta string いいえ
skip float64 いいえ

レスポンス

戻り値: Option[GetTenants_200_response]

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

テナントを更新 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ
updateTenantBody UpdateTenantBody いいえ

レスポンス

戻り値: Option[FlagCommentPublic_200_response]

updateTenant の例
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

画像をアップロード Internal Link

パラメータ

名前 必須 説明
tenantId string はい
file string いいえ
sizePreset SizePreset いいえ
urlId string はい

レスポンス

戻り値: Option[UploadImageResponse]

uploadImage の例
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

IDでユーザーバッジ進捗を取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ

レスポンス

返り値: Option[GetUserBadgeProgressById_200_response]

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

ユーザーIDでユーザーバッジ進捗を取得 Internal Link

パラメーター

名前 必須 説明
tenantId string はい
userId string いいえ

レスポンス

戻り値: Option[GetUserBadgeProgressById_200_response]

getUserBadgeProgressByUserId の例
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

ユーザーバッジ進捗一覧を取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
userId string いいえ
limit float64 いいえ
skip float64 いいえ

レスポンス

戻り値: Option[GetUserBadgeProgressList_200_response]

getUserBadgeProgressList の例
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

ユーザーバッジを作成 Internal Link

パラメーター

名前 必須 説明
tenantId string はい
createUserBadgeParams CreateUserBadgeParams いいえ

レスポンス

戻り値: Option[CreateUserBadge_200_response]

createUserBadge の例
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

ユーザーバッジを削除 Internal Link


パラメータ

名前 必須 説明
tenantId string はい
id string いいえ

レスポンス

返却値: Option[UpdateUserBadge_200_response]

deleteUserBadge の例
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

ユーザーバッジを取得 Internal Link

パラメータ

Name Type Required Description
tenantId string はい
id string いいえ

レスポンス

戻り値: Option[GetUserBadge_200_response]

getUserBadge の例
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

ユーザーバッジを取得 Internal Link

パラメータ

Name Type 必須 説明
tenantId string はい
userId string いいえ
badgeId string いいえ
displayedOnComments bool いいえ
limit float64 いいえ
skip float64 いいえ

レスポンス

返却値: Option[GetUserBadges_200_response]

getUserBadges の例
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

ユーザーバッジを更新 Internal Link

パラメータ

Name Type Required Description
tenantId string はい
id string いいえ
updateUserBadgeParams UpdateUserBadgeParams いいえ

レスポンス

戻り値: Option[UpdateUserBadge_200_response]

updateUserBadge の例
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

ユーザーの通知数を取得 Internal Link

パラメータ

Name Type 必須 Description
tenantId string はい
sso string いいえ

レスポンス

戻り値: Option[GetUserNotificationCount_200_response]

getUserNotificationCount の例
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

ユーザーの通知を取得 Internal Link

パラメータ

Name Type Required Description
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

レスポンス

返却値: Option[GetUserNotifications_200_response]

getUserNotifications の例
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

ユーザーの通知数をリセット Internal Link

パラメータ

名前 必須 説明
tenantId string はい
sso string いいえ

レスポンス

戻り値: Option[ResetUserNotifications_200_response]

resetUserNotificationCount の例
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

ユーザーの通知をリセット Internal Link

パラメータ

名前 必須 説明
tenantId string はい
afterId string いいえ
afterCreatedAt int64 いいえ
unreadOnly bool いいえ
dmOnly bool いいえ
noDm bool いいえ
sso string いいえ

レスポンス

戻り値: Option[ResetUserNotifications_200_response]

resetUserNotifications の例
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

ユーザーのコメント購読ステータスを更新 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
notificationId string いいえ
optedInOrOut string いいえ
commentId string はい
sso string いいえ

レスポンス

戻り値: Option[UpdateUserNotificationStatus_200_response]

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

ユーザーのページ購読ステータスを更新 Internal Link

パラメータ

Name Type Required Description
tenantId string はい
urlId string はい
url string いいえ
pageTitle string いいえ
subscribedOrUnsubscribed string いいえ
sso string いいえ

レスポンス

戻り値: Option[UpdateUserNotificationStatus_200_response]

updateUserNotificationPageSubscriptionStatus の例
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

ユーザーの通知ステータスを更新 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
notificationId string いいえ
newStatus string いいえ
sso string いいえ

レスポンス

戻り値: Option[UpdateUserNotificationStatus_200_response]

updateUserNotificationStatus の例
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

ユーザーのプレゼンス状態を取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
urlIdWS string いいえ
userIds string いいえ

レスポンス

戻り値: Option[GetUserPresenceStatuses_200_response]

getUserPresenceStatuses の例
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

ユーザーを検索 Internal Link

パラメータ

Name Type 必須 説明
tenantId string はい
urlId string はい
usernameStartsWith string いいえ
mentionGroupIds seq[string] いいえ
sso string いいえ

レスポンス

戻り値: Option[SearchUsers_200_response]

searchUsers の例
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

ユーザーを取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ

レスポンス

戻り値: Option[GetUser_200_response]

getUser の例
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

投票を作成 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
commentId string はい
direction string いいえ
userId string いいえ
anonUserId string いいえ

レスポンス

戻り値: Option[VoteComment_200_response]

createVote の例
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

投票を削除 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
id string いいえ
editKey string いいえ

レスポンス

戻り値: Option[DeleteCommentVote_200_response]

deleteVote の例
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

投票を取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
urlId string はい

レスポンス

戻り値: Option[GetVotes_200_response]

getVotes の例
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

ユーザーの投票を取得 Internal Link

パラメータ

名前 必須 説明
tenantId string はい
urlId string はい
userId string いいえ
anonUserId string いいえ

レスポンス

戻り値: Option[GetVotesForUser_200_response]

getVotesForUser の例
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

ヘルプが必要ですか?

Nim SDKで問題が発生した場合やご質問がある場合は、以下のいずれかをご利用ください:

貢献

貢献は歓迎します!貢献に関するガイドラインについては、GitHubリポジトリをご覧ください。