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 ユーティリティが含まれています。

パブリック vs 保護された API

API クライアントには、api_defaultapi_publicapi_moderation の 3 つの API モジュールがあります。api_default は API キーを必要とするメソッドを含み、api_public はブラウザ/モバイルデバイス等から認証なしに直接呼び出せる API コールを含みます。api_moderation モジュールはモデレーターダッシュボード用のメソッドを含みます。

api_moderation のメソッドは、コメントおよびそのログの一覧取得、カウント、検索、エクスポート;コメントの削除/復元、フラグ付け、レビュー/スパム/承認ステータスの設定、投票の調整、スレッドの再開/クローズなどのモデレーション操作;バン(コメントからのユーザーのバン、バンの解除、事前バンのサマリー、バン状況と設定、バンされたユーザーの数);およびバッジと信頼(バッジの付与/削除、手動バッジの一覧取得、ユーザーの信頼度の取得/設定、ユーザーの内部プロファイルの取得)をカバーします。すべての api_moderation メソッドは sso パラメータを受け取り、その呼び出しは SSO モデレーターとして認証されます。

クイックスタート 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"

モデレーションAPIの使用 (ModerationAPI)

モデレーション用エンドポイントはモデレーターダッシュボードで使用され、操作を行うモデレータのSSOトークンで認証されます:

import httpclient
import fastcomments
import fastcomments/apis/api_moderation

let client = newHttpClient()

# モデレーションダッシュボードのコメント一覧を取得する
let (response, httpResponse) = getApiComments(
  httpClient = client,
  page = 0,
  count = 30,
  textSearch = "",
  byIPFromComment = "",
  filters = "",
  searchFilters = "",
  sorts = "",
  demo = false,
  sso = "your-sso-token"
)

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

よくある問題

  1. 401 認証エラー: DefaultAPI のリクエストを行う前に HttpClient に x-api-key ヘッダーを設定していることを確認してください: client.headers["x-api-key"] = "your-api-key"
  2. API クラスの選択ミス: サーバー側の認証されたリクエストには api_default、クライアント側/パブリックなリクエストには api_public、モデレーターダッシュボードのリクエストには api_moderation を使用してください。

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


ドキュメントを集約します。groupBy が指定されている場合はグループ化し、複数の操作を適用します。sum、countDistinct、avg などの操作が利用可能です。

パラメータ

名前必須説明
tenantIdstringはい
aggregationRequestAggregationRequestいいえ
parentTenantIdstringいいえ
includeStatsboolいいえ

レスポンス

返却: Option[AggregateResponse]

aggregate の例
Copy Copy
1
2let (response, httpResponse) = client.aggregate(
3 tenantId = "my-tenant-123",
4 aggregationRequest = AggregationRequest(groupBy = @["articleId"], metrics = @["commentCount"], filters = @[], limit = 0),
5 parentTenantId = "",
6 includeStats = false
7)
8
9if response.isSome:
10 let agg = response.get()
11 discard agg
12

監査ログを取得 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
limitfloat64いいえ
skipfloat64いいえ
orderSORTDIRいいえ
afterfloat64いいえ
beforefloat64いいえ

レスポンス

戻り値: Option[GetAuditLogsResponse]

getAuditLogs の例
Copy Copy
1
2let (response, httpResponse) = client.getAuditLogs(
3 tenantId = "my-tenant-123",
4 limit = 50.0,
5 skip = 0.0,
6 order = SORTDIR.DESC,
7 after = 1622505600.0,
8 before = 1625097600.0
9)
10
11if response.isSome:
12 let logs = response.get()
13 echo logs
14else:
15 echo "No audit logs returned"
16

パブリックログアウト Internal Link

レスポンス

返却値: Option[APIEmptyResponse]

logoutPublic の例
Copy Copy
1
2let (response, httpResponse) = client.logoutPublic(tenantId = "my-tenant-123", sessionId = "sess-9a8b7c6d", userId = "editor-87", revokeAll = false, ipAddress = "")
3if response.isSome:
4 let emptyResp = response.get()
5 echo "Logout successful for user: ", "editor-87"
6else:
7 echo "Logout failed"
8

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


パラメータ

名前必須説明
tenantIdstringはい
commentIdstringはい
publicBlockFromCommentParamsPublicBlockFromCommentParamsいいえ
ssostringいいえ

レスポンス

戻り値: Option[BlockSuccess]

blockFromCommentPublic の例
Copy Copy
1
2let publicParams = PublicBlockFromCommentParams(
3 reason = "Repeated spam links",
4 durationMinutes = 1440,
5 blockAll = true,
6 notifyUser = false,
7 tags = @["spam", "auto-block"]
8)
9
10let (response, httpResponse) = client.blockFromCommentPublic(
11 tenantId = "my-tenant-123",
12 commentId = "comment-98765",
13 publicBlockFromCommentParams = publicParams,
14 sso = ""
15)
16
17if response.isSome:
18 let blockResult = response.get()
19 echo "Block succeeded: ", $blockResult
20else:
21 echo "Block failed, HTTP status: ", $httpResponse.status
22

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

パラメータ

名前必須説明
tenantIdstringはい
commentIdstringはい
publicBlockFromCommentParamsPublicBlockFromCommentParamsいいえ
ssostringいいえ

レスポンス

戻り値: Option[UnblockSuccess]

unBlockCommentPublic の例
Copy Copy
1
2let (response, httpResponse) = client.unBlockCommentPublic(tenantId = "my-tenant-123", commentId = "cmt-987654321", publicBlockFromCommentParams = PublicBlockFromCommentParams(), sso = "")
3if response.isSome:
4 let unblockResult = response.get()
5 discard unblockResult
6else:
7 discard httpResponse
8

ブロック済みコメントの確認 Internal Link


パラメータ

名前必須説明
tenantIdstringはい
commentIdsstringいいえ
ssostringいいえ

レスポンス

返却: Option[CheckBlockedCommentsResponse]

checkedCommentsForBlocked の例
Copy Copy
1
2let (response, httpResponse) = client.checkedCommentsForBlocked(
3 tenantId = "my-tenant-123",
4 commentIds = "",
5 sso = ""
6)
7if response.isSome:
8 let blockedResp = response.get()
9 echo "Received blocked comments response: ", blockedResp
10else:
11 echo "No response body; HTTP status: ", $httpResponse.status
12

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

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ
blockFromCommentParamsBlockFromCommentParamsいいえ
userIdstringいいえ
anonUserIdstringいいえ

レスポンス

返り値: Option[BlockSuccess]

blockUserFromComment の例
Copy Copy
1
2let (response, httpResponse) = client.blockUserFromComment(
3 tenantId = "my-tenant-123",
4 id = "cmt-7890",
5 blockFromCommentParams = BlockFromCommentParams(
6 reason = "Repeated abusive language",
7 durationMinutes = 1440,
8 notifyUser = true,
9 tags = @["abuse", "automated"]
10 ),
11 userId = "user-456",
12 anonUserId = ""
13)
14
15if response.isSome:
16 let result = response.get()
17 discard result
18else:
19 discard httpResponse
20

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

パラメータ

名前必須説明
tenantIdstringはい
urlIdstringはい
broadcastIdstringいいえ
commentDataCommentDataいいえ
sessionIdstringいいえ
ssostringいいえ

レスポンス

返却値: Option[SaveCommentsResponseWithPresence]

createCommentPublic の例
Copy Copy
1
2let commentPayload = CommentData(
3 text = "Great write-up on serverless architectures.",
4 authorName = "Jane Doe",
5 authorEmail = "jane.doe@example.com",
6 isPublic = true,
7 tags = @["tech", "serverless"]
8)
9let (response, httpResponse) = client.createCommentPublic(
10 tenantId = "my-tenant-123",
11 urlId = "news/2026/06/fastcomments-sdk-update",
12 broadcastId = "broadcast-2026-06-19",
13 commentData = commentPayload,
14 sessionId = "sess-8a7b6c",
15 sso = "sso-jwt-abc123"
16)
17if response.isSome:
18 let saved = response.get()
19 discard saved
20

コメントを削除 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ
contextUserIdstringいいえ
isLiveboolいいえ

レスポンス

戻り値: Option[DeleteCommentResult]

deleteComment の例
Copy Copy
1
2let (response, httpResponse) = client.deleteComment(tenantId = "my-tenant-123", id = "cmt-98765", contextUserId = "user-456", isLive = true)
3if response.isSome:
4 let result = response.get()
5 echo "DeleteCommentResult received"
6else:
7 echo "No result, HTTP status: ", httpResponse.status
8

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

パラメータ

名前必須説明
tenantIdstringYes
commentIdstringYes
broadcastIdstringNo
editKeystringNo
ssostringNo

レスポンス

戻り値: Option[PublicAPIDeleteCommentResponse]

deleteCommentPublic の例
Copy Copy
1
2let (response, httpResponse) = client.deleteCommentPublic(tenantId = "my-tenant-123", commentId = "cmt-987654321", broadcastId = "", editKey = "", sso = "")
3if response.isSome:
4 let deleted = response.get()
5 echo "Delete acknowledged, HTTP status: ", httpResponse.status
6

コメント投票を削除 Internal Link

パラメータ

NameTypeRequiredDescription
tenantIdstringYes
commentIdstringYes
voteIdstringNo
urlIdstringYes
broadcastIdstringNo
editKeystringNo
ssostringNo

レスポンス

返却: Option[VoteDeleteResponse]

deleteCommentVote の例
Copy Copy
1
2let (response, httpResponse) = client.deleteCommentVote(
3 tenantId = "my-tenant-123",
4 commentId = "comment-456",
5 voteId = "vote-789",
6 urlId = "news/article-title",
7 broadcastId = "",
8 editKey = "",
9 sso = ""
10)
11if response.isSome:
12 let voteResp = response.get()
13 echo "Vote delete response:", voteResp
14else:
15 echo "No response body, HTTP response:", httpResponse
16

コメントを通報 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ
userIdstringいいえ
anonUserIdstringいいえ

レスポンス

戻り値: Option[FlagCommentResponse]

flagComment の例
Copy Copy
1
2let (response, httpResponse) = client.flagComment(
3 tenantId = "my-tenant-123",
4 id = "cmt-98765",
5 userId = "user-12345",
6 anonUserId = ""
7)
8
9if response.isSome:
10 let flagResp = response.get()
11 echo "Flag response received"
12else:
13 echo "No flag response returned"
14

コメントを取得 Internal Link

Parameters

名前必須説明
tenantIdstringはい
idstringいいえ

レスポンス

戻り値: Option[APIGetCommentResponse]

getComment の例
Copy Copy
1
2let (response, httpResponse) = client.getComment(tenantId = "my-tenant-123", id = "cmt-7890")
3if response.isSome:
4 let comment = response.get()
5 discard comment
6else:
7 echo "Comment not found"
8

コメント一覧を取得 Internal Link


パラメータ

NameTypeRequiredDescription
tenantIdstringはい
pageintいいえ
limitintいいえ
skipintいいえ
asTreeboolいいえ
skipChildrenintいいえ
limitChildrenintいいえ
maxTreeDepthintいいえ
urlIdstringはい
userIdstringいいえ
anonUserIdstringいいえ
contextUserIdstringいいえ
hashTagstringいいえ
parentIdstringいいえ
directionSortDirectionsいいえ
fromDateint64いいえ
toDateint64いいえ

レスポンス

戻り値: Option[APIGetCommentsResponse]

getComments の例
Copy Copy
1
2let (response, httpResponse) = client.getComments(
3 tenantId = "my-tenant-123",
4 page = 1,
5 limit = 25,
6 skip = 0,
7 asTree = true,
8 skipChildren = 0,
9 limitChildren = 5,
10 maxTreeDepth = 3,
11 urlId = "news/2026-global-economy",
12 userId = "user-789",
13 anonUserId = "",
14 contextUserId = "",
15 hashTag = "economy",
16 parentId = "",
17 direction = SortDirections.Desc,
18 fromDate = 1710000000000'i64,
19 toDate = 1710100000000'i64
20)
21if response.isSome:
22 let commentsResp = response.get()
23 discard commentsResp
24

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


req tenantId urlId

パラメータ

名前必須説明
tenantIdstringはい
urlIdstringはい
pageintいいえ
directionSortDirectionsいいえ
ssostringいいえ
skipintいいえ
skipChildrenintいいえ
limitintいいえ
limitChildrenintいいえ
countChildrenboolいいえ
fetchPageForCommentIdstringいいえ
includeConfigboolいいえ
countAllboolいいえ
includei10nboolいいえ
localestringいいえ
modulesstringいいえ
isCrawlerboolいいえ
includeNotificationCountboolいいえ
asTreeboolいいえ
maxTreeDepthintいいえ
useFullTranslationIdsboolいいえ
parentIdstringいいえ
searchTextstringいいえ
hashTagsseq[string]いいえ
userIdstringいいえ
customConfigStrstringいいえ
afterCommentIdstringいいえ
beforeCommentIdstringいいえ

レスポンス

戻り値: Option[GetCommentsResponseWithPresencePublicComment]

getCommentsPublic の例
Copy Copy
1
2let (response, httpResponse) = client.getCommentsPublic(
3 tenantId = "my-tenant-123",
4 urlId = "news/article-title",
5 page = 2,
6 direction = SortDirections.Descending,
7 sso = "",
8 skip = 0,
9 skipChildren = 0,
10 limit = 25,
11 limitChildren = 5,
12 countChildren = false,
13 fetchPageForCommentId = "",
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 = "",
25 searchText = "climate change",
26 hashTags = @["climate", "research"],
27 userId = "user-789",
28 customConfigStr = "",
29 afterCommentId = "",
30 beforeCommentId = ""
31)
32
33if response.isSome:
34 let commentsResp = response.get()
35 echo "Received comments response:"
36 echo commentsResp
37else:
38 echo "No comments returned. HTTP status:", httpResponse.status
39

コメント本文を取得 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
commentIdstringはい
editKeystringいいえ
ssostringいいえ

レスポンス

返却: Option[PublicAPIGetCommentTextResponse]

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

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

パラメータ

名前必須説明
tenantIdstringはい
commentIdstringはい
dirintいいえ
ssostringいいえ

レスポンス

戻り値: Option[GetCommentVoteUserNamesSuccessResponse]

getCommentVoteUserNames の例
Copy Copy
1
2let (response, httpResponse) = client.getCommentVoteUserNames(tenantId = "my-tenant-123", commentId = "cmt-987654", dir = 0, sso = "")
3if response.isSome:
4 let success: GetCommentVoteUserNamesSuccessResponse = response.get()
5 discard success
6

コメントをロック Internal Link

Parameters

NameTypeRequiredDescription
tenantIdstringはい
commentIdstringはい
broadcastIdstringいいえ
ssostringいいえ

Response

戻り値: Option[APIEmptyResponse]

lockComment の例
Copy Copy
1
2let (response, httpResponse) = client.lockComment(tenantId = "news-tenant-42", commentId = "cmt-8f3a2b9d", broadcastId = "", sso = "")
3if response.isSome:
4 let apiResp = response.get()
5 echo "Locked comment successfully for tenant news-tenant-42"
6else:
7 echo "Failed to lock comment, HTTP status: ", $httpResponse.status
8

コメントをピン留め Internal Link

パラメータ

名前必須説明
tenantIdstringはい
commentIdstringはい
broadcastIdstringいいえ
ssostringいいえ

レスポンス

戻り値: Option[ChangeCommentPinStatusResponse]

pinComment の例
Copy Copy
1
2let (response, httpResponse) = client.pinComment(tenantId = "my-tenant-123", commentId = "cmt-98765", broadcastId = "", sso = "")
3if response.isSome:
4 let pinnedResp = response.get()
5 echo "Pin status updated for comment cmt-98765"
6else:
7 echo "No response received"
8

コメントを保存 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
createCommentParamsCreateCommentParamsいいえ
isLiveboolいいえ
doSpamCheckboolいいえ
sendEmailsboolいいえ
populateNotificationsboolいいえ

レスポンス

返却値: Option[APISaveCommentResponse]

saveComment の例
Copy Copy
1
2let createCommentParams = CreateCommentParams(
3 urlId = "news/2026/major-policy-change",
4 content = "This is a thoughtful comment on the policy change and its potential impacts.",
5 authorName = "Morgan Lee",
6 authorEmail = "morgan.lee@example.org",
7 tags = @["policy","analysis"],
8 extraData = @[])
9
10let (response, httpResponse) = client.saveComment(
11 tenantId = "my-tenant-123",
12 createCommentParams = createCommentParams,
13 isLive = true,
14 doSpamCheck = true,
15 sendEmails = false,
16 populateNotifications = true)
17
18if response.isSome:
19 let saved = response.get()
20 discard saved
21

コメントを一括保存 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
createCommentParamsseq[CreateCommentParams]いいえ
isLiveboolいいえ
doSpamCheckboolいいえ
sendEmailsboolいいえ
populateNotificationsbool): (Option[seq[SaveCommentsBulkResponse]]いいえ
idstringいいえ
fromNamestringいいえ

レスポンス

戻り値: Option[APIEmptyResponse]

saveCommentsBulk の例
Copy Copy
1
2let (response, httpResponse) = client.saveCommentsBulk(
3 tenantId = "my-tenant-123",
4 createCommentParams = @[],
5 isLive = false,
6 doSpamCheck = false,
7 sendEmails = false,
8 populateNotifications = false,
9 id = "",
10 fromName = ""
11)
12
13if response.isSome:
14 let apiResp = response.get()
15 echo "Bulk save succeeded, tenant:", " my-tenant-123"
16else:
17 echo "Bulk save returned no API response"
18

コメント本文を設定 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
commentIdstringはい
broadcastIdstringいいえ
commentTextUpdateRequestCommentTextUpdateRequestいいえ
editKeystringいいえ
ssostringいいえ

レスポンス

返却: Option[PublicAPISetCommentTextResponse]

setCommentText の例
Copy Copy
1
2let (response, httpResponse) = client.setCommentText(
3 tenantId = "my-tenant-123",
4 commentId = "cmt-456789",
5 broadcastId = "",
6 commentTextUpdateRequest = CommentTextUpdateRequest(text: "Updated comment text to fix a typo and clarify meaning."),
7 editKey = "",
8 sso = ""
9)
10if response.isSome:
11 let result = response.get()
12 discard result
13

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

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ
unBlockFromCommentParamsUnBlockFromCommentParamsいいえ
userIdstringいいえ
anonUserIdstringいいえ

レスポンス

戻り値: Option[UnblockSuccess]

コメントからユーザーのブロックを解除する例
Copy Copy
1
2let (response, httpResponse) = client.unBlockUserFromComment(
3 tenantId = "my-tenant-123",
4 id = "comment-9f3b2a",
5 unBlockFromCommentParams = UnBlockFromCommentParams(),
6 userId = "user-1024",
7 anonUserId = "anon-77b"
8)
9
10if response.isSome:
11 let unblockResult = response.get()
12 echo unblockResult
13else:
14 echo "Unblock failed"
15

コメントの通報を取り下げ Internal Link


パラメーター

名前必須説明
tenantIdstringはい
idstringいいえ
userIdstringいいえ
anonUserIdstringいいえ

レスポンス

戻り値: Option[FlagCommentResponse]

unFlagComment の例
Copy Copy
1
2let (response, httpResponse) = client.unFlagComment(tenantId = "my-tenant-123",
3 id = "comment-98765",
4 userId = "user-12345",
5 anonUserId = "")
6
7if response.isSome:
8 let flagResp = response.get()
9 echo "Unflagged comment response:", flagResp
10else:
11 echo "Unflag failed, HTTP status:", httpResponse.status
12

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

パラメータ

名前必須説明
tenantIdstringはい
commentIdstringはい
broadcastIdstringいいえ
ssostringいいえ

レスポンス

戻り値: Option[APIEmptyResponse]

unLockComment の例
Copy Copy
1
2let tenantId = "my-tenant-123"
3let commentId = "cmt-987654321"
4let (response, httpResponse) = client.unLockComment(
5 tenantId = tenantId,
6 commentId = commentId,
7 broadcastId = "",
8 sso = ""
9)
10if response.isSome:
11 let apiResp = response.get()
12 echo "Unlocked comment ", commentId, " for tenant ", tenantId
13else:
14 echo "Unlock failed, HTTP status: ", $httpResponse.status
15

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

パラメータ

名前必須説明
tenantIdstringはい
commentIdstringはい
broadcastIdstringいいえ
ssostringいいえ

レスポンス

返却値: Option[ChangeCommentPinStatusResponse]

unPinComment の例
Copy Copy
1
2let (response, httpResponse) = client.unPinComment(tenantId = "my-tenant-123", commentId = "cmt-987654321", broadcastId = "", sso = "")
3if response.isSome:
4 let result = response.get()
5 echo "Unpinned comment:", $result
6else:
7 echo "Unpin failed, HTTP status:", $httpResponse.status
8

コメントを更新 Internal Link

パラメータ

NameTypeRequiredDescription
tenantIdstringはい
idstringいいえ
updatableCommentParamsUpdatableCommentParamsいいえ
contextUserIdstringいいえ
doSpamCheckboolいいえ
isLiveboolいいえ

レスポンス

返却値: Option[APIEmptyResponse]

updateCommentの例
Copy Copy
1
2let (response, httpResponse) = client.updateComment(
3 tenantId = "my-tenant-123",
4 id = "cmt-987654",
5 updatableCommentParams = UpdatableCommentParams(
6 text = "Updated comment: corrected facts and clarified wording.",
7 isApproved = true,
8 tags = @["news", "update"]
9 ),
10 contextUserId = "user-456",
11 doSpamCheck = true,
12 isLive = true
13)
14
15if response.isSome:
16 let apiResp = response.get()
17 discard apiResp
18

コメントに投票 Internal Link


パラメータ

名前必須説明
tenantIdstringはい
commentIdstringはい
urlIdstringはい
broadcastIdstringいいえ
voteBodyParamsVoteBodyParamsいいえ
sessionIdstringいいえ
ssostringいいえ

レスポンス

戻り値: Option[VoteResponse]

voteComment の例
Copy Copy
1
2let (response, httpResponse) = client.voteComment(
3 tenantId = "my-tenant-123",
4 commentId = "cmt-987654321",
5 urlId = "news/article-2026-inflation",
6 broadcastId = "",
7 voteBodyParams = VoteBodyParams(),
8 sessionId = "",
9 sso = ""
10)
11
12if response.isSome:
13 let voteResp = response.get()
14 discard voteResp
15else:
16 discard httpResponse
17

ユーザーのコメントを取得 Internal Link

パラメータ

名前必須説明
userIdstring任意
directionSortDirections任意
repliesToUserIdstring任意
pagefloat64任意
includei10nbool任意
localestring任意
isCrawlerbool任意

レスポンス

戻り値: Option[GetCommentsForUserResponse]

getCommentsForUser の例
Copy Copy
1
2let (response, httpResponse) = client.getCommentsForUser(
3 userId = "user-8421",
4 direction = SortDirections.Newest,
5 repliesToUserId = "",
6 page = 1.0,
7 includei10n = true,
8 locale = "en-US",
9 isCrawler = false
10)
11
12if response.isSome:
13 let comments = response.get()
14 discard comments
15

ドメイン設定を追加 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
addDomainConfigParamsAddDomainConfigParamsいいえ

レスポンス

返却値: Option[AddDomainConfigResponse]

addDomainConfig の例
Copy Copy
1
2let config = AddDomainConfigParams(
3 domain: "comments.example-news.com",
4 enabled: true,
5 allowedOrigins: @["https://www.example-news.com", "https://m.example-news.com"],
6 commentsPath: "/news/world/election-coverage",
7 priority: 5
8)
9let (response, httpResponse) = client.addDomainConfig(tenantId = "my-tenant-123", addDomainConfigParams = config)
10if response.isSome:
11 let created = response.get()
12 echo "Created domain config:", created
13else:
14 echo "Failed to create domain config, HTTP status:", httpResponse.status.code
15

ドメイン設定を削除 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
domainstringいいえ

レスポンス

戻り値: Option[DeleteDomainConfigResponse]

deleteDomainConfig の例
Copy Copy
1
2let (response, httpResponse) = client.deleteDomainConfig(tenantId = "my-tenant-123", domain = "news.example.com")
3if response.isSome:
4 let deleted = response.get()
5 echo "DeleteDomainConfig succeeded for tenant ", "my-tenant-123"
6else:
7 echo "DeleteDomainConfig failed. HTTP status: ", $httpResponse.status
8

ドメイン設定を取得 Internal Link


パラメータ

NameTypeRequiredDescription
tenantIdstringYes
domainstringNo

レスポンス

戻り値: Option[GetDomainConfigResponse]

getDomainConfig の例
Copy Copy
1
2let (response, httpResponse) = client.getDomainConfig(tenantId = "my-tenant-123", domain = "news/top-story-2026")
3if response.isSome:
4 let cfg = response.get()
5 discard cfg
6else:
7 discard httpResponse
8

ドメイン設定一覧を取得 Internal Link


パラメータ

名前必須説明
tenantIdstringはい

レスポンス

戻り値: Option[GetDomainConfigsResponse]

getDomainConfigsの例
Copy Copy
1
2let (response, httpResponse) = client.getDomainConfigs(tenantId = "my-tenant-123")
3if response.isSome:
4 let domainConfigs = response.get()
5 echo "Received domain configs for tenant my-tenant-123"
6 echo domainConfigs
7else:
8 echo "No domain configs returned"
9

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

パラメータ

名前必須説明
tenantIdstringはい
domainToUpdatestringいいえ
patchDomainConfigParamsPatchDomainConfigParamsいいえ

レスポンス

戻り値: Option[PatchDomainConfigResponse]

patchDomainConfig の例
Copy Copy
1
2let patchParams: PatchDomainConfigParams = PatchDomainConfigParams(
3 allowedOrigins = @["https://news.example.com", "https://cdn.news.com"],
4 enableComments = true,
5 moderationRequired = false,
6 maxCommentLength = 2000,
7 primaryDomain = "comments.news-site.com"
8)
9let (response, httpResponse) = client.patchDomainConfig(
10 tenantId = "my-tenant-123",
11 domainToUpdate = "comments.news-site.com",
12 patchDomainConfigParams = patchParams
13)
14if response.isSome:
15 let cfg = response.get()
16 echo "Patched domain config received:", cfg
17else:
18 echo "No response body, HTTP status:", httpResponse.statusCode
19

ドメイン設定を置換 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
domainToUpdatestringいいえ
updateDomainConfigParamsUpdateDomainConfigParamsいいえ

レスポンス

戻り値: Option[PutDomainConfigResponse]

putDomainConfig の例
Copy Copy
1
2let (response, httpResponse) = client.putDomainConfig(
3 tenantId = "my-tenant-123",
4 domainToUpdate = "blog.example.com",
5 updateDomainConfigParams = UpdateDomainConfigParams(
6 allowAnonymous = false,
7 moderationEnabled = true,
8 maxCommentLength = 800,
9 allowedOrigins = @["https://blog.example.com", "https://cdn.blog.example.com"],
10 enableThreadedComments = true
11 )
12)
13
14if response.isSome:
15 let cfg = response.get()
16 echo cfg
17else:
18 echo "Failed to update domain config, HTTP status: ", httpResponse.status
19

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

パラメータ

名前必須説明
tenantIdstringはい
createEmailTemplateBodyCreateEmailTemplateBodyいいえ

レスポンス

戻り値: Option[CreateEmailTemplateResponse]

createEmailTemplateの例
Copy Copy
1
2let (response, httpResponse) = client.createEmailTemplate(tenantId = "my-tenant-123",
3 createEmailTemplateBody = CreateEmailTemplateBody(
4 name = "Weekly Newsletter",
5 subject = "This Week on NewsSite",
6 html = "<h1>Latest updates</h1><p>Read our latest article.</p>",
7 fromAddress = "no-reply@newssite.com",
8 isDefault = false,
9 tags = @["news", "weekly"]
10 )
11)
12
13if response.isSome:
14 let template = response.get()
15 echo "Created email template id: ", template.id
16

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

パラメータ

NameTypeRequiredDescription
tenantIdstringはい
idstringいいえ

レスポンス

返り値: Option[APIEmptyResponse]

deleteEmailTemplate の例
Copy Copy
1
2let (response, httpResponse) = client.deleteEmailTemplate(
3 tenantId = "my-tenant-123",
4 id = "welcome-email-template-001"
5)
6
7if response.isSome:
8 let apiEmpty = response.get()
9 discard apiEmpty
10 echo "Email template deleted successfully"
11else:
12 echo "No response body"
13

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

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ
errorIdstringいいえ

レスポンス

戻り値: Option[APIEmptyResponse]

deleteEmailTemplateRenderError Example
Copy Copy
1
2let (response, httpResponse) = client.deleteEmailTemplateRenderError(tenantId = "my-tenant-123", id = "welcome-email-template", errorId = "err-20250615-01")
3if response.isSome:
4 let emptyResp = response.get()
5 echo "Deleted render error, tenant:", "my-tenant-123"
6 echo "HTTP status:", httpResponse.status
7else:
8 echo "No body returned, HTTP status:", httpResponse.status
9

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

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ

レスポンス

戻り値: Option[GetEmailTemplateResponse]

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 discard template
6

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

パラメータ

NameTypeRequiredDescription
tenantIdstringYes

レスポンス

戻り値: Option[GetEmailTemplateDefinitionsResponse]

getEmailTemplateDefinitions の例
Copy Copy
1
2let (response, httpResponse) = client.getEmailTemplateDefinitions(tenantId = "my-tenant-123")
3if response.isSome:
4 let definitions = response.get()
5 echo "Email template definitions for my-tenant-123: ", definitions
6else:
7 echo "Failed to retrieve templates, HTTP status: ", httpResponse.status
8

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

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ
skipfloat64いいえ

レスポンス

返却値: Option[GetEmailTemplateRenderErrorsResponse]

getEmailTemplateRenderErrors の例
Copy Copy
1
2let (response, httpResponse) = client.getEmailTemplateRenderErrors(tenantId = "my-tenant-123", id = "", skip = 0.0)
3if response.isSome:
4 let templateErrors = response.get()
5 discard templateErrors
6else:
7 discard httpResponse
8

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


パラメータ

名前必須説明
tenantIdstringはい
skipfloat64いいえ

レスポンス

戻り値: Option[GetEmailTemplatesResponse]

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 email templates available"
8

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

パラメータ

名前必須説明
tenantIdstringはい
renderEmailTemplateBodyRenderEmailTemplateBodyいいえ
localestringいいえ

レスポンス

戻り値: Option[RenderEmailTemplateResponse]

renderEmailTemplate の例
Copy Copy
1
2let (response, httpResponse) = client.renderEmailTemplate(
3 tenantId = "my-tenant-123",
4 renderEmailTemplateBody = RenderEmailTemplateBody(),
5 locale = "en-US"
6)
7
8if response.isSome:
9 let rendered = response.get()
10 echo rendered
11

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

パラメータ

NameTypeRequiredDescription
tenantIdstringはい
idstringいいえ
updateEmailTemplateBodyUpdateEmailTemplateBodyいいえ

レスポンス

戻り値: Option[APIEmptyResponse]

updateEmailTemplate の例
Copy Copy
1
2let updateBody = UpdateEmailTemplateBody(
3 subject = "Welcome to Newsly",
4 html = "<p>Thanks for joining Newsly! Visit https://newsly.example to get started.</p>",
5 fromAddress = "no-reply@newsly.example",
6 fromName = "Newsly Team",
7 enabled = true
8)
9let (response, httpResponse) = client.updateEmailTemplate(tenantId = "my-tenant-123", id = "welcome-email", updateEmailTemplateBody = updateBody)
10if response.isSome:
11 let result = response.get()
12 discard result
13else:
14 discard httpResponse.statusCode
15

イベントログを取得 Internal Link


req tenantId urlId userIdWS

パラメータ

名前必須説明
tenantIdstringはい
urlIdstringはい
userIdWSstringいいえ
startTimeint64いいえ
endTimeint64いいえ

レスポンス

返却値: Option[GetEventLogResponse]

getEventLog の例
Copy Copy
1
2let (response, httpResponse) = client.getEventLog(
3 tenantId = "my-tenant-123",
4 urlId = "news/article-2026-solar-panels",
5 userIdWS = "user-456",
6 startTime = 1688000000'i64,
7 endTime = 1688086400'i64
8)
9if response.isSome:
10 let eventLog = response.get()
11 discard eventLog
12

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


req tenantId urlId userIdWS

パラメータ

名前必須説明
tenantIdstringはい
urlIdstringはい
userIdWSstringいいえ
startTimeint64いいえ
endTimeint64いいえ

レスポンス

返却値: Option[GetEventLogResponse]

getGlobalEventLog の例
Copy Copy
1
2let (response, httpResponse) = client.getGlobalEventLog(
3 tenantId = "my-tenant-123",
4 urlId = "news/article-2026-06-19",
5 userIdWS = "user-987",
6 startTime = int64(1622505600),
7 endTime = int64(1625097600)
8)
9if response.isSome:
10 let eventLog = response.get()
11 echo eventLog, httpResponse.statusCode
12

フィード投稿を作成 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
createFeedPostParamsCreateFeedPostParamsいいえ
broadcastIdstringいいえ
isLiveboolいいえ
doSpamCheckboolいいえ
skipDupCheckboolいいえ

レスポンス

戻り値: Option[CreateFeedPostsResponse]

createFeedPost の例
Copy Copy
1
2let postParams = CreateFeedPostParams(
3 title = "Major Acquisition by TechCorp",
4 content = "TechCorp has acquired SoftWorks in a deal valued at $1.2B, creating a new market leader.",
5 url = "news/tech/major-acquisition",
6 tags = @["business", "technology"],
7 authorId = "journalist-321"
8)
9
10let (response, httpResponse) = client.createFeedPost(
11 tenantId = "my-tenant-123",
12 createFeedPostParams = postParams,
13 broadcastId = "",
14 isLive = false,
15 doSpamCheck = false,
16 skipDupCheck = false
17)
18
19if response.isSome:
20 let created = response.get()
21 discard created
22

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

パラメータ

名前必須説明
tenantIdstringはい
createFeedPostParamsCreateFeedPostParamsいいえ
broadcastIdstringいいえ
ssostringいいえ

レスポンス

戻り値: Option[CreateFeedPostResponse]

createFeedPostPublic の例
Copy Copy
1
2let params = CreateFeedPostParams(
3 title = "Breaking: Major Update on Product X",
4 content = "Today we released Product X v2.0 with performance improvements and bug fixes.",
5 author = "jane.doe",
6 tags = @["product", "release", "v2"],
7 isPinned = false
8)
9
10let (response, httpResponse) = client.createFeedPostPublic(tenantId = "my-tenant-123", createFeedPostParams = params, broadcastId = "", sso = "")
11
12if response.isSome:
13 let created = response.get()
14 echo "Created feed post:", created
15else:
16 echo "Failed to create feed post; HTTP status:", httpResponse.status
17

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

パラメータ

NameTypeRequiredDescription
tenantIdstringはい
postIdstringいいえ
broadcastIdstringいいえ
ssostringいいえ

レスポンス

戻り値: Option[DeleteFeedPostPublicResponse]

deleteFeedPostPublic の例
Copy Copy
1
2let (response, httpResponse) = client.deleteFeedPostPublic(tenantId = "my-tenant-123", postId = "", broadcastId = "", sso = "")
3if response.isSome:
4 let deleted = response.get()
5 echo "Delete successful"
6else:
7 echo "Delete failed"
8

フィード投稿を取得 Internal Link

req tenantId afterId

パラメータ

名前必須説明
tenantIdstringはい
afterIdstringいいえ
limitintいいえ
tagsseq[string]いいえ

レスポンス

戻り値: Option[GetFeedPostsResponse]

getFeedPosts の例
Copy Copy
1
2let (response, httpResponse) = client.getFeedPosts(
3 tenantId = "my-tenant-123",
4 afterId = "",
5 limit = 0,
6 tags = @[]
7)
8if response.isSome:
9 let feed = response.get()
10 echo "Feed retrieved for tenant my-tenant-123"
11

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

req tenantId afterId

パラメータ

名前必須説明
tenantIdstringはい
afterIdstringいいえ
limitintいいえ
tagsseq[string]いいえ
ssostringいいえ
isCrawlerboolいいえ
includeUserInfoboolいいえ

レスポンス

戻り値: Option[PublicFeedPostsResponse]

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)
11if response.isSome:
12 let feed = response.get()
13 discard feed
14

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


パラメータ

名前必須説明
tenantIdstringはい
postIdsseq[string]いいえ
ssostringいいえ

レスポンス

返却: Option[FeedPostsStatsResponse]

getFeedPostsStats の例
Copy Copy
1
2let (response, httpResponse) = client.getFeedPostsStats(tenantId = "my-tenant-123", postIds = @["news/article-2026", "opinion/market-trends"], sso = "")
3if response.isSome:
4 let stats = response.get()
5 echo "Received feed posts stats for tenant:", " my-tenant-123"
6 discard stats
7

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

パラメータ

名前必須説明
tenantIdstringはい
postIdsseq[string]いいえ
ssostringいいえ

レスポンス

戻り値: Option[UserReactsResponse]

getUserReactsPublic の例
Copy Copy
1
2let (response, httpResponse) = client.getUserReactsPublic(
3 tenantId = "my-tenant-123",
4 postIds = @["news/article-2026", "blog/opinion-987"],
5 sso = ""
6)
7if response.isSome:
8 let reacts = response.get()
9 echo "Received user reacts for tenant: ", "my-tenant-123"
10

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

パラメータ

名前必須説明
tenantIdstringはい
postIdstringいいえ
reactBodyParamsReactBodyParamsいいえ
isUndoboolいいえ
broadcastIdstringいいえ
ssostringいいえ

レスポンス

返り値: Option[ReactFeedPostResponse]

reactFeedPostPublic の例
Copy Copy
1
2let (response, httpResponse) = client.reactFeedPostPublic(
3 tenantId = "my-tenant-123",
4 postId = "news/article-2026-06-19",
5 reactBodyParams = ReactBodyParams(reactType = "heart", tags = @["breaking", "editorial"]),
6 isUndo = false,
7 broadcastId = "broadcast-789",
8 sso = "sso-token-abc123"
9)
10if response.isSome:
11 let react = response.get()
12 echo react
13else:
14 echo "No response from reactFeedPostPublic, HTTP status:", httpResponse.statusCode
15

フィード投稿を更新 Internal Link


パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ
feedPostFeedPostいいえ

レスポンス

戻り値: Option[APIEmptyResponse]

updateFeedPost の例
Copy Copy
1
2let feedPost: FeedPost = FeedPost(title: "City Council Approves New Waterfront Park",
3 content: "The council voted 5-2 to approve funding and a timeline for construction.",
4 tags: @["local", "parks", "city"],
5 published: true)
6
7let (response, httpResponse) = client.updateFeedPost(tenantId = "my-tenant-123", id = "post-456", feedPost = feedPost)
8
9if response.isSome:
10 let apiResp = response.get()
11 echo "Feed post updated successfully"
12 echo apiResp
13else:
14 echo "Failed to update feed post"
15 echo httpResponse
16

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

パラメータ

名前必須説明
tenantIdstringはい
postIdstringいいえ
updateFeedPostParamsUpdateFeedPostParamsいいえ
broadcastIdstringいいえ
ssostringいいえ

レスポンス

戻り値: Option[CreateFeedPostResponse]

updateFeedPostPublic の例
Copy Copy
1
2let (response, httpResponse) = client.updateFeedPostPublic(
3 tenantId = "my-tenant-123",
4 postId = "post-456",
5 updateFeedPostParams = UpdateFeedPostParams(title = "Weekly Product Update", content = "Released bug fixes and performance improvements in v2.1.", tags = @["release", "product"], pinned = false),
6 broadcastId = "",
7 sso = ""
8)
9if response.isSome:
10 let created = response.get()
11 echo "Updated feed post id: ", created.postId
12else:
13 echo "Update failed with HTTP status: ", httpResponse.status
14

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

パラメータ

名前必須説明
tenantIdstringはい
commentIdstringはい
isFlaggedboolいいえ
ssostringいいえ

レスポンス

戻り値: Option[APIEmptyResponse]

flagCommentPublicの例
Copy Copy
1
2let (response, httpResponse) = client.flagCommentPublic(
3 tenantId = "my-tenant-123",
4 commentId = "cmt-456789",
5 isFlagged = true,
6 sso = ""
7)
8
9if response.isSome:
10 let apiResp = response.get()
11 discard apiResp
12else:
13 discard httpResponse
14

大きいGIFを取得 Internal Link


パラメータ

NameTypeRequiredDescription
tenantIdstringはい
largeInternalURLSanitizedstringいいえ

レスポンス

戻り値: Option[GifGetLargeResponse]

getGifLarge の例
Copy Copy
1
2let (response, httpResponse) = client.getGifLarge(tenantId = "news-tenant-42", largeInternalURLSanitized = "")
3if response.isSome:
4 let gif = response.get()
5 echo "Received GifGetLargeResponse"
6 discard gif
7else:
8 echo "No gif returned, HTTP status: " & $httpResponse.status
9

GIF検索を取得 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
searchstringいいえ
localestringいいえ
ratingstringいいえ
pagefloat64いいえ

レスポンス

戻り値: Option[GetGifsSearchResponse]

getGifsSearch の例
Copy Copy
1
2let (response, httpResponse) = client.getGifsSearch(
3 tenantId = "my-tenant-123",
4 search = "funny cat",
5 locale = "en-US",
6 rating = "PG",
7 page = 1.0
8)
9
10if response.isSome:
11 let gifs = response.get()
12 echo "Fetched GIFs response:", gifs
13

トレンドGIFを取得 Internal Link

パラメータ

NameTypeRequiredDescription
tenantIdstringはい
localestringいいえ
ratingstringいいえ
pagefloat64いいえ

レスポンス

戻り値: Option[GetGifsTrendingResponse]

getGifsTrending の例
Copy Copy
1
2let (response, httpResponse) = client.getGifsTrending(tenantId = "my-tenant-123",
3 locale = "en-US",
4 rating = "pg-13",
5 page = 1.0)
6if response.isSome:
7 let trending = response.get()
8

ハッシュタグを追加 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
createHashTagBodyCreateHashTagBodyいいえ

レスポンス

戻り値: Option[CreateHashTagResponse]

addHashTag の例
Copy Copy
1
2let (response, httpResponse) = client.addHashTag(tenantId = "my-tenant-123",
3 createHashTagBody = CreateHashTagBody(name = "Breaking News",
4 slug = "breaking-news",
5 description = "Major breaking news items",
6 color = "#ff0000",
7 isTrending = true,
8 aliases = @["breaking", "news"]))
9if response.isSome:
10 let created = response.get()
11 echo created
12

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

パラメータ

NameTypeRequiredDescription
tenantIdstringはい
bulkCreateHashTagsBodyBulkCreateHashTagsBodyいいえ

レスポンス

戻り値: Option[BulkCreateHashTagsResponse]

addHashTagsBulk の例
Copy Copy
1
2let (response, httpResponse) = client.addHashTagsBulk(tenantId = "my-tenant-123", bulkCreateHashTagsBody = BulkCreateHashTagsBody(hashTags = @["news", "breaking", "politics"], replaceExisting = false))
3if response.isSome:
4 let result = response.get()
5 echo "Bulk tags response:", result
6else:
7 echo "No response body, HTTP status:", httpResponse.statusCode
8

ハッシュタグを削除 Internal Link

パラメータ

名前必須説明
tagstringいいえ
tenantIdstringはい
deleteHashTagRequestBodyDeleteHashTagRequestBodyいいえ

レスポンス

戻り値: Option[APIEmptyResponse]

deleteHashTag の例
Copy Copy
1
2let (response, httpResponse) = client.deleteHashTag(
3 tag = "",
4 tenantId = "my-tenant-123",
5 deleteHashTagRequestBody = DeleteHashTagRequestBody()
6)
7
8if response.isSome:
9 let emptyResp = response.get()
10 echo "Deleted hashtag for tenant my-tenant-123; response:", $emptyResp, " status:", $httpResponse.status
11else:
12 echo "No response body; status:", $httpResponse.status
13

ハッシュタグ一覧を取得 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
pagefloat64いいえ

レスポンス

戻り値: Option[GetHashTagsResponse]

getHashTags の例
Copy Copy
1
2let (response, httpResponse) = client.getHashTags(tenantId = "news-portal-987", page = 2.0)
3if response.isSome:
4 let tagsResp = response.get()
5 echo "Received hashtags response"
6else:
7 echo "No hashtags returned"
8

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

パラメータ

名前必須説明
tagstringいいえ
tenantIdstringはい
updateHashTagBodyUpdateHashTagBodyいいえ

レスポンス

戻り値: Option[UpdateHashTagResponse]

patchHashTag の例
Copy Copy
1
2let (response, httpResponse) = client.patchHashTag(tag = "breaking-news", tenantId = "my-tenant-123", updateHashTagBody = UpdateHashTagBody())
3if response.isSome:
4 let updatedHashTag = response.get()
5 echo updatedHashTag
6

モデレーション投票を削除 Internal Link

パラメータ

名前必須説明
commentIdstringはい
voteIdstringいいえ
ssostringいいえ

レスポンス

戻り値: Option[VoteDeleteResponse]

deleteModerationVote の例
Copy Copy
1
2let (response, httpResponse) = client.deleteModerationVote(commentId = "my-tenant-123/news/article-title/comment-987", voteId = "vote-456", sso = "sso-token-abc")
3if response.isSome:
4 let voteResp = response.get()
5 echo "Vote deleted:", voteResp
6else:
7 echo "Delete failed:", httpResponse
8

API経由のコメントを取得 Internal Link

パラメータ

名前必須説明
pagefloat64いいえ
countfloat64いいえ
textSearchstringいいえ
byIPFromCommentstringいいえ
filtersstringいいえ
searchFiltersstringいいえ
sortsstringいいえ
demoboolいいえ
ssostringいいえ

レスポンス

返却値: Option[ModerationAPIGetCommentsResponse]

getApiComments の例
Copy Copy
1
2let (response, httpResponse) = client.getApiComments(
3 page = 1.0,
4 count = 25.0,
5 textSearch = "opinion on climate summit",
6 byIPFromComment = "198.51.100.23",
7 filters = "status:approved",
8 searchFilters = "section:world",
9 sorts = "-createdAt",
10 demo = false,
11 sso = "sso-user-982bf"
12)
13
14if response.isSome:
15 let commentsResp = response.get()
16 echo "Retrieved comments response"
17else:
18 echo "No comments returned, HTTP status: ", httpResponse.status
19

APIエクスポートのステータスを取得 Internal Link


パラメータ

NameType必須説明
batchJobIdstringいいえ
ssostringいいえ

レスポンス

返却値: Option[ModerationExportStatusResponse]

getApiExportStatus の例
Copy Copy
1
2let (response, httpResponse) = client.getApiExportStatus(batchJobId = "export-job-2026-06-01", sso = "sso-abc123token")
3if response.isSome:
4 let exportStatus = response.get()
5 echo repr(exportStatus)
6else:
7 echo "No export status available, HTTP code: ", httpResponse.statusCode
8

API用IDを取得 Internal Link

パラメータ

名前必須説明
textSearchstringいいえ
byIPFromCommentstringいいえ
filtersstringいいえ
searchFiltersstringいいえ
afterIdstringいいえ
demoboolいいえ
ssostringいいえ

レスポンス

返却値: Option[ModerationAPIGetCommentIdsResponse]

getApiIds の例
Copy Copy
1
2let (response, httpResponse) = client.getApiIds(
3 textSearch = "urgent moderation review",
4 byIPFromComment = "203.0.113.45",
5 filters = "status:pending,flagged",
6 searchFilters = "author:jane.doe@example.com",
7 afterId = "cmt_9f8e7d6a",
8 demo = false,
9 sso = "sso-token-6b7f9a"
10)
11
12if response.isSome:
13 let idsResp = response.get()
14 echo idsResp
15

コメントからの禁止ユーザーを取得 Internal Link


パラメータ

名前必須説明
commentIdstringはい
ssostringいいえ

レスポンス

戻り値: Option[GetBannedUsersFromCommentResponse]

getBanUsersFromComment の例
Copy Copy
1
2let (response, httpResponse) = client.getBanUsersFromComment(commentId = "comment-98765", sso = "")
3if response.isSome:
4 let bannedResp = response.get()
5 discard bannedResp
6else:
7 echo "No banned users found or request failed"
8

コメントの禁止状態を取得 Internal Link

パラメータ

名前必須説明
commentIdstringはい
ssostringいいえ

レスポンス

戻り値: Option[GetCommentBanStatusResponse]

getCommentBanStatus の例
Copy Copy
1
2let (response, httpResponse) = client.getCommentBanStatus(commentId = "cmt-987654321", sso = "")
3
4if response.isSome:
5 let banStatus = response.get()
6 echo "Ban status for comment cmt-987654321: ", banStatus
7else:
8 echo "No ban status returned for comment cmt-987654321"
9

コメントの子コメントを取得 Internal Link

Parameters

名前必須説明
commentIdstringはい
ssostringいいえ

Response

戻り値: Option[ModerationAPIChildCommentsResponse]

Example

getCommentChildren の例
Copy Copy
1
2let (response, httpResponse) = client.getCommentChildren(commentId = "comment-98765", sso = "")
3if response.isSome:
4 let childResp = response.get()
5 discard childResp
6

カウントを取得 Internal Link

パラメータ

名前必須説明
textSearchstringいいえ
byIPFromCommentstringいいえ
filterstringいいえ
searchFiltersstringいいえ
demoboolいいえ
ssostringいいえ

レスポンス

戻り値: Option[ModerationAPICountCommentsResponse]

getCount の例
Copy Copy
1
2let (response, httpResponse) = client.getCount(
3 textSearch = "climate change",
4 byIPFromComment = "203.0.113.5",
5 filter = "status:approved",
6 searchFilters = "author:john.doe@example.com;tag:opinion",
7 demo = false,
8 sso = "sso_eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"
9)
10if response.isSome:
11 let countResp = response.get()
12 discard countResp
13 echo "Count response received"
14else:
15 echo "No count data returned"
16

複数カウントを取得 Internal Link

パラメータ

名前必須説明
ssostring任意

レスポンス

戻り値: Option[GetBannedUsersCountResponse]

getCounts の例
Copy Copy
1
2let (response, httpResponse) = client.getCounts(sso = "sso_my-tenant-123_token_AbCdEf123456")
3if response.isSome:
4 let counts = response.get()
5 echo counts
6else:
7 echo "Request failed with status:", httpResponse.status
8

ログを取得 Internal Link

パラメータ

名前必須説明
commentIdstringはい
ssostringいいえ

レスポンス

戻り値: Option[ModerationAPIGetLogsResponse]

getLogs の例
Copy Copy
1
2let (response, httpResponse) = client.getLogs(commentId = "cmt-8471f2d3", sso = "")
3if response.isSome:
4 let logs = response.get()
5 echo "Fetched logs:", logs
6

手動バッジを取得 Internal Link


パラメータ

名前必須説明
ssostringいいえ

レスポンス

戻り値: Option[GetTenantManualBadgesResponse]

getManualBadges の例
Copy Copy
1
2let (response, httpResponse) = client.getManualBadges(sso = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9")
3if response.isSome:
4 let badges = response.get()
5 echo "Manual badges received:"
6 echo badges
7else:
8 echo "No manual badges returned."
9 echo httpResponse
10

ユーザーの手動バッジを取得 Internal Link

パラメータ

NameTypeRequiredDescription
badgesUserIdstring任意
commentIdstring必須
ssostring任意

レスポンス

戻り値: Option[GetUserManualBadgesResponse]

getManualBadgesForUser の例
Copy Copy
1
2let (response, httpResponse) = client.getManualBadgesForUser(
3 badgesUserId = "user-98765",
4 commentId = "comment-0a1b2c3d",
5 sso = "sso-eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"
6)
7if response.isSome:
8 let badges = response.get()
9 echo "Received manual badges for user"
10 echo "HTTP status: ", httpResponse.status
11

モデレーション対象コメントを取得 Internal Link


パラメータ

名前必須説明
commentIdstringはい
includeEmailboolいいえ
includeIPboolいいえ
ssostringいいえ

レスポンス

返却値: Option[ModerationAPICommentResponse]

getModerationComment の例
Copy Copy
1
2let (response, httpResponse) = client.getModerationComment(commentId = "cmt-8f3b2a9d", includeEmail = false, includeIP = false, sso = "")
3if response.isSome:
4 let comment = response.get()
5 discard comment
6else:
7 echo "No moderation comment returned"
8

モデレーションコメント本文を取得 Internal Link

パラメータ

名前必須説明
commentIdstring必須
ssostring任意

レスポンス

戻り値: Option[GetCommentTextResponse]

getModerationCommentText の例
Copy Copy
1
2let (response, httpResponse) = client.getModerationCommentText(commentId = "comment-9f8b7a6c", sso = "")
3if response.isSome:
4 let commentData = response.get()
5 echo "Moderation comment text retrieved"
6else:
7 echo "No moderation comment text available"
8

事前禁止の概要を取得 Internal Link

パラメータ

名前必須説明
commentIdstringはい
includeByUserIdAndEmailboolいいえ
includeByIPboolいいえ
includeByEmailDomainboolいいえ
ssostringいいえ

レスポンス

戻り値: Option[PreBanSummary]

getPreBanSummary の例
Copy Copy
1
2let commentId = "cmt-7423"
3let (response, httpResponse) = client.getPreBanSummary(
4 commentId = commentId,
5 includeByUserIdAndEmail = false,
6 includeByIP = false,
7 includeByEmailDomain = false,
8 sso = ""
9)
10if response.isSome:
11 let preBanSummary = response.get()
12 discard preBanSummary
13else:
14 discard httpResponse
15

検索コメントの概要を取得 Internal Link


パラメータ

名前必須説明
valuestringいいえ
filtersstringいいえ
searchFiltersstringいいえ
ssostringいいえ

レスポンス

返却値: Option[ModerationCommentSearchResponse]

getSearchCommentsSummary の例
Copy Copy
1
2let (response, httpResponse) = client.getSearchCommentsSummary(
3 value = "news/climate-change-2026",
4 filters = "{\"tenantId\":\"my-tenant-123\",\"siteId\":\"main-site\",\"status\":\"approved\"}",
5 searchFilters = "author:journalist@news.com OR content:climate",
6 sso = "sso-xyz-7890"
7)
8if response.isSome:
9 let summary = response.get()
10 echo "Received summary: ", $summary
11else:
12 echo "No summary returned, HTTP response: ", $httpResponse
13

検索ページを取得 Internal Link

パラメータ

名前必須説明
valuestring任意
ssostring任意

レスポンス

戻り値: Option[ModerationPageSearchResponse]

getSearchPages の例
Copy Copy
1
2let (response, httpResponse) = client.getSearchPages(value = "news/politics/election-2024", sso = "sso-user-7f3b9c")
3if response.isSome:
4 let pageSearch = response.get()
5 echo "Moderation page search returned"
6else:
7 echo "No moderation pages found"
8

検索サイトを取得 Internal Link

パラメータ

名前必須説明
valuestringいいえ
ssostringいいえ

レスポンス

戻り値: Option[ModerationSiteSearchResponse]

getSearchSites の例
Copy Copy
1
2let (response, httpResponse) = client.getSearchSites(value = "news/2026-olympics", sso = "sso-user-9876-token")
3if response.isSome:
4 let searchResponse: ModerationSiteSearchResponse = response.get()
5 echo "Found sites for search:", searchResponse
6

検索候補を取得 Internal Link

パラメータ

名前必須説明
textSearchstringいいえ
ssostringいいえ

戻り値

戻り値: Option[ModerationSuggestResponse]

getSearchSuggest の例
Copy Copy
1
2let (response, httpResponse) = client.getSearchSuggest(textSearch = "suspicious comment with spammy links", sso = "sso-user-789")
3if response.isSome:
4 let suggest = response.get()
5 echo "ModerationSuggestResponse:"
6 echo suggest
7else:
8 echo "No moderation suggestions returned. HTTP status: ", httpResponse.status
9

検索ユーザーを取得 Internal Link

パラメータ

名前必須説明
valuestringいいえ
ssostringいいえ

レスポンス

返り値: Option[ModerationUserSearchResponse]

getSearchUsers の例
Copy Copy
1
2let (response, httpResponse) = client.getSearchUsers(value = "john.doe@example.com", sso = "sso-acme-789")
3if response.isSome:
4 let searchRes = response.get()
5 echo "Search result:", searchRes
6else:
7 echo "No users found"
8

信頼係数を取得 Internal Link

パラメータ

NameTypeRequiredDescription
userIdstring任意
ssostring任意

レスポンス

返却値: Option[GetUserTrustFactorResponse]

getTrustFactor の例
Copy Copy
1
2let (response, httpResponse) = client.getTrustFactor(userId = "user-1001", sso = "sso-token-6f7d9c")
3if response.isSome:
4 let trust = response.get()
5 echo "Received trust factor for user-1001"
6else:
7 echo "No trust factor returned, HTTP status: ", $httpResponse.status
8

ユーザーの禁止設定を取得 Internal Link


パラメータ

名前必須説明
ssostringいいえ

レスポンス

戻り値: Option[APIModerateGetUserBanPreferencesResponse]

getUserBanPreference の例
Copy Copy
1
2let (response, httpResponse) = client.getUserBanPreference(sso = "sso-jwt-7f3a9b")
3if response.isSome:
4 let prefs = response.get()
5 echo "User ban preferences:", prefs
6else:
7 echo "No ban preference found"
8

ユーザー内部プロファイルを取得 Internal Link

パラメータ

NameTypeRequiredDescription
commentIdstringはい
ssostringいいえ

レスポンス

戻り値: Option[GetUserInternalProfileResponse]

getUserInternalProfile の例
Copy Copy
1
2let (response, httpResponse) = client.getUserInternalProfile(commentId = "cmt-2026-00042", sso = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoibXl1c2VyIn0.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c")
3if response.isSome:
4 let profile = response.get()
5 discard profile
6

コメント投票を調整 Internal Link


パラメータ

名前必須説明
commentIdstringはい
adjustCommentVotesParamsAdjustCommentVotesParamsいいえ
ssostringいいえ

レスポンス

戻り値: Option[AdjustVotesResponse]

postAdjustCommentVotes の例
Copy Copy
1
2let (response, httpResponse) = client.postAdjustCommentVotes(commentId = "cmt-987654", adjustCommentVotesParams = nil, sso = "sso-token-abc123")
3if response.isSome:
4 let adjusted = response.get()
5 discard adjusted
6

APIエクスポートを開始 Internal Link

パラメータ

名前必須説明
textSearchstring任意
byIPFromCommentstring任意
filtersstring任意
searchFiltersstring任意
sortsstring任意
ssostring任意

レスポンス

戻り値: Option[ModerationExportResponse]

postApiExport の例
Copy Copy
1
2let (response, httpResponse) = client.postApiExport(
3 textSearch = "offensive language and spam",
4 byIPFromComment = "203.0.113.45",
5 filters = "{\"status\":\"pending\",\"severity\":\"high\"}",
6 searchFilters = "authorEmail:editor@news-site.com",
7 sorts = "-createdAt",
8 sso = "sso-session-token-9f8b7c"
9)
10if response.isSome:
11 let exportResp = response.get()
12 echo "Moderation export received:", exportResp
13else:
14 echo "No export returned, HTTP status:", httpResponse.status.code
15

コメントからユーザーを禁止 Internal Link

パラメータ

名前必須説明
commentIdstringはい
banEmailboolいいえ
banEmailDomainboolいいえ
banIPboolいいえ
deleteAllUsersCommentsboolいいえ
bannedUntilstringいいえ
isShadowBanboolいいえ
updateIdstringいいえ
banReasonstringいいえ
ssostringいいえ

レスポンス

戻り値: Option[BanUserFromCommentResult]

postBanUserFromComment の例
Copy Copy
1
2let (response, httpResponse) = client.postBanUserFromComment(
3 commentId = "cmt-8f3a1b",
4 banEmail = false,
5 banEmailDomain = false,
6 banIP = false,
7 deleteAllUsersComments = false,
8 bannedUntil = "",
9 isShadowBan = false,
10 updateId = "",
11 banReason = "",
12 sso = ""
13)
14if response.isSome:
15 let banResult = response.get()
16 discard banResult
17else:
18 echo "No ban result returned"
19

ユーザー禁止を取り消し Internal Link


パラメータ

名前必須説明
banUserUndoParamsBanUserUndoParamsいいえ
ssostringいいえ

レスポンス

戻り値: Option[APIEmptyResponse]

postBanUserUndo の例
Copy Copy
1
2let banParams = BanUserUndoParams(
3 tenantId = "my-tenant-123",
4 userId = "user-987",
5 undoneBy = "moderator-42",
6 reason = "Reinstated after manual review"
7)
8let (response, httpResponse) = client.postBanUserUndo(banUserUndoParams = banParams, sso = "sso-jwt-abc123")
9if response.isSome:
10 let apiResp = response.get()
11 echo "Ban undo succeeded, http status: " & $httpResponse.status
12else:
13 echo "Ban undo failed, http status: " & $httpResponse.status
14

一括事前禁止の概要を作成 Internal Link


パラメータ

名前必須説明
bulkPreBanParamsBulkPreBanParams任意
includeByUserIdAndEmailbool任意
includeByIPbool任意
includeByEmailDomainbool任意
ssostring任意

レスポンス

戻り値: Option[BulkPreBanSummary]

postBulkPreBanSummary の例
Copy Copy
1
2let bulkParams = BulkPreBanParams(
3 tenantId = "my-tenant-123",
4 userIds = @["user-456", "user-789"],
5 emails = @["spammer@example.com", "bot@malicious.org"],
6 ipAddresses = @["203.0.113.5", "198.51.100.42"],
7 emailDomains = @["malicious.org"]
8)
9
10let (response, httpResponse) = client.postBulkPreBanSummary(
11 bulkPreBanParams = bulkParams,
12 includeByUserIdAndEmail = true,
13 includeByIP = true,
14 includeByEmailDomain = false,
15 sso = "sso-token-abc123"
16)
17
18if response.isSome:
19 let summary = response.get()
20 echo "Pre-ban summary:", summary
21

IDでコメントを取得(POST) Internal Link

パラメータ

NameTypeRequiredDescription
commentsByIdsParamsCommentsByIdsParamsいいえ
ssostringいいえ

戻り値

Returns: Option[ModerationAPIChildCommentsResponse]

postCommentsByIds の例
Copy Copy
1
2let commentsParams = CommentsByIdsParams(ids = @["cmt-1001", "cmt-1002"], includeReplies = true, maxDepth = 2)
3let (response, httpResponse) = client.postCommentsByIds(commentsByIdsParams = commentsParams, sso = "sso-user-7f3a9b")
4if response.isSome:
5 let result = response.get()
6 echo "Received child comments response: ", result
7

コメントを通報(POST) Internal Link

パラメータ

NameTypeRequiredDescription
commentIdstringはい
ssostringいいえ

レスポンス

戻り値: Option[APIEmptyResponse]

postFlagComment の例
Copy Copy
1
2let (response, httpResponse) = client.postFlagComment(commentId = "comment-742", sso = "")
3if response.isSome:
4 let apiResp = response.get()
5 echo "Comment flagged successfully"
6else:
7 echo "Failed to flag comment"
8

コメントを削除(POST) Internal Link

パラメータ

NameTypeRequiredDescription
commentIdstringはい
ssostringいいえ

レスポンス

戻り値: Option[PostRemoveCommentResponse]

postRemoveComment の例
Copy Copy
1
2let (response, httpResponse) = client.postRemoveComment(commentId = "cmt-987654321", sso = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.abc123.signature")
3if response.isSome:
4 let removed = response.get()
5 echo "Comment removed:", removed
6else:
7 echo "Failed to remove comment, HTTP response:", httpResponse
8

削除済みコメントを復元 Internal Link

パラメータ

名前必須説明
commentIdstringはい
ssostringいいえ

レスポンス

戻り値: Option[APIEmptyResponse]

postRestoreDeletedComment の例
Copy Copy
1
2let (response, httpResponse) = client.postRestoreDeletedComment(commentId = "comment-8a7b6c5d", sso = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.SAMPLE_SIGNATURE")
3if response.isSome:
4 let apiResp = response.get()
5 echo "Comment restored:", apiResp
6else:
7 echo "Restore request failed"
8

コメント承認状態を設定 Internal Link

パラメータ

名前必須説明
commentIdstringはい
approvedboolいいえ
ssostringいいえ

レスポンス

戻り値: Option[SetCommentApprovedResponse]

postSetCommentApprovalStatus の例
Copy Copy
1
2let (response, httpResponse) = client.postSetCommentApprovalStatus(commentId = "cmt-7890", approved = false, sso = "")
3if response.isSome:
4 let setResp = response.get()
5 discard setResp
6

コメントレビュー状態を設定 Internal Link

パラメータ

名前必須説明
commentIdstringはい
reviewedboolいいえ
ssostringいいえ

レスポンス

戻り値: Option[APIEmptyResponse]

postSetCommentReviewStatus の例
Copy Copy
1
2let (response, httpResponse) = client.postSetCommentReviewStatus(
3 commentId = "cmt-98765-news-article",
4 reviewed = false,
5 sso = ""
6)
7if response.isSome:
8 let apiResp = response.get()
9 echo "Review status updated"
10else:
11 echo "Failed to update review status: " & $httpResponse.status
12

コメントのスパム状態を設定 Internal Link

パラメータ

名前必須説明
commentIdstringはい
spamboolいいえ
permNotSpamboolいいえ
ssostringいいえ

レスポンス

戻り値: Option[APIEmptyResponse]

postSetCommentSpamStatus の例
Copy Copy
1
2let (response, httpResponse) = client.postSetCommentSpamStatus(
3 commentId = "cmt-20250619-842",
4 spam = false,
5 permNotSpam = false,
6 sso = ""
7)
8if response.isSome:
9 let apiEmpty = response.get()
10 discard apiEmpty
11

コメント本文を設定(POST) Internal Link

パラメータ

名前必須説明
commentIdstringはい
setCommentTextParamsSetCommentTextParamsいいえ
ssostringいいえ

レスポンス

戻り値: Option[SetCommentTextResponse]

postSetCommentText の例
Copy Copy
1
2let (response, httpResponse) = client.postSetCommentText(commentId = "comment-4821",
3 setCommentTextParams = SetCommentTextParams(text = "Updated comment to clarify the main point and fix a typo."),
4 sso = "sso-user-8f3b9c")
5
6if response.isSome:
7 let setCommentResp = response.get()
8 echo "Received SetCommentTextResponse"
9

通報を解除(POST) Internal Link

パラメータ

名前必須説明
commentIdstringはい
ssostringいいえ

レスポンス

戻り値: Option[APIEmptyResponse]

postUnFlagComment の例
Copy Copy
1
2let (response, httpResponse) = client.postUnFlagComment(commentId = "comment-8f3a2b4e", sso = "")
3if response.isSome:
4 let apiEmpty = response.get()
5 echo "Comment unflagged successfully, response: ", apiEmpty
6else:
7 echo "Failed to unflag comment. HTTP response: ", httpResponse
8

投票を投稿 Internal Link

パラメータ

名前必須説明
commentIdstringはい
directionstringいいえ
ssostringいいえ

レスポンス

戻り値: Option[VoteResponse]

postVote の例
Copy Copy
1
2let (response, httpResponse) = client.postVote(commentId = "comment-4f3a9e", direction = "up", sso = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjoidXNlci0xMjMifQ.signedPart")
3if response.isSome:
4 let vote = response.get()
5 echo "Vote recorded:", vote
6else:
7 echo "No vote returned"
8

バッジを付与 Internal Link


パラメータ

NameTypeRequiredDescription
badgeIdstringNo
userIdstringNo
commentIdstringYes
broadcastIdstringNo
ssostringNo

レスポンス

返却: Option[AwardUserBadgeResponse]

putAwardBadge の例
Copy Copy
1
2let (response, httpResponse) = client.putAwardBadge(
3 badgeId = "gold-contributor",
4 userId = "user-8723",
5 commentId = "cmt-54a3b2",
6 broadcastId = "",
7 sso = ""
8)
9if response.isSome:
10 let award = response.get()
11 echo "Awarded badge received"
12else:
13 echo "No award response"
14

スレッドを閉鎖 Internal Link

パラメータ

NameTypeRequiredDescription
urlIdstringはい
ssostringいいえ

レスポンス

戻り値: Option[APIEmptyResponse]

putCloseThread の例
Copy Copy
1
2let (response, httpResponse) = client.putCloseThread(urlId = "news/article-title", sso = "")
3if response.isSome:
4 let apiResp = response.get()
5 echo "Thread closed successfully:", $apiResp
6else:
7 echo "Failed to close thread, HTTP response:", $httpResponse
8

バッジを削除 Internal Link

パラメータ

名前必須説明
badgeIdstringいいえ
userIdstringいいえ
commentIdstringはい
broadcastIdstringいいえ
ssostringいいえ

レスポンス

戻り値: Option[RemoveUserBadgeResponse]

putRemoveBadge の例
Copy Copy
1
2let (response, httpResponse) = client.putRemoveBadge(badgeId = "verified-journalist",
3 userId = "user-7890",
4 commentId = "comment-98765",
5 broadcastId = "",
6 sso = "")
7
8if response.isSome:
9 let removeResp = response.get()
10 discard removeResp
11else:
12 discard httpResponse
13

スレッドを再開 Internal Link

パラメータ

名前必須説明
urlIdstringはい
ssostringいいえ

レスポンス

返却: Option[APIEmptyResponse]

putReopenThread の例
Copy Copy
1
2let (response, httpResponse) = client.putReopenThread(urlId = "news/2026-election-analysis", sso = "")
3if response.isSome:
4 let apiResp = response.get()
5 echo "Reopen succeeded, response: ", apiResp
6else:
7 echo "Reopen failed, HTTP status: ", httpResponse.status
8

信頼係数を設定 Internal Link

パラメータ

名前必須説明
userIdstringいいえ
trustFactorstringいいえ
ssostringいいえ

レスポンス

戻り値: Option[SetUserTrustFactorResponse]

setTrustFactor の例
Copy Copy
1
2let (response, httpResponse) = client.setTrustFactor(userId = "user-9876", trustFactor = "high", sso = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c2VyLTk4NzYiLCJpYXQiOjE2MjQwMDAwMDB9.signature")
3if response.isSome:
4 let resultObj = response.get()
5 echo resultObj
6else:
7 echo "No response received"
8

モデレーターを作成 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
createModeratorBodyCreateModeratorBodyいいえ

レスポンス

戻り値: Option[CreateModeratorResponse]

createModerator の例
Copy Copy
1
2var body: CreateModeratorBody
3body.username = "alice.moderator"
4body.displayName = "Alice Moderator"
5body.email = "alice@news-site.com"
6body.enabled = true
7body.roles = @["moderator"]
8body.notes = ""
9
10let (response, httpResponse) = client.createModerator(tenantId = "my-tenant-123", createModeratorBody = body)
11if response.isSome:
12 let created = response.get()
13 echo "Created moderator ID: ", created.id
14

モデレーターを削除 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ
sendEmailstringいいえ

レスポンス

戻り値: Option[APIEmptyResponse]

deleteModerator の例
Copy Copy
1
2let (response, httpResponse) = client.deleteModerator(tenantId = "my-tenant-123", id = "", sendEmail = "")
3if response.isSome:
4 let apiEmpty = response.get()
5 echo "Moderator deleted successfully for tenant my-tenant-123"
6else:
7 echo "No response returned; inspect httpResponse"
8

モデレーターを取得 Internal Link


パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ

レスポンス

戻り値: Option[GetModeratorResponse]

getModerator の例
Copy Copy
1
2let (response, httpResponse) = client.getModerator(tenantId = "my-tenant-123", id = "mod-456")
3if response.isSome:
4 let moderator = response.get()
5 echo moderator
6else:
7 echo "Moderator not found, HTTP status: ", $httpResponse.status
8

モデレーター一覧を取得 Internal Link

パラメータ

NameTypeRequiredDescription
tenantIdstringはい
skipfloat64いいえ

レスポンス

戻り値: Option[GetModeratorsResponse]

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 "Received moderators response:", moderators
6else:
7 echo "No moderators returned"
8

モデレーターを更新 Internal Link


パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ
updateModeratorBodyUpdateModeratorBodyいいえ

レスポンス

戻り値: Option[APIEmptyResponse]

updateModerator の例
Copy Copy
1
2let modBody: UpdateModeratorBody = UpdateModeratorBody(
3 displayName = "Alice Moderator",
4 email = "alice@newsdaily.com",
5 isActive = true,
6 permissions = @["delete_comments", "ban_users"]
7)
8
9let (response, httpResponse) = client.updateModerator(tenantId = "news-tenant-456", id = "moderator-789", updateModeratorBody = modBody)
10
11if response.isSome:
12 let apiEmpty = response.get()
13 echo "Moderator updated successfully. HTTP status: ", httpResponse.status
14else:
15 echo "Failed to update moderator. HTTP status: ", httpResponse.status
16

通知カウントを削除 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ

レスポンス

返却値: Option[APIEmptyResponse]

deleteNotificationCount の例
Copy Copy
1
2let (response, httpResponse) = client.deleteNotificationCount(tenantId = "my-tenant-123", id = "notification-789")
3if response.isSome:
4 let emptyResp = response.get()
5 echo "Notification count deleted for tenant: ", "my-tenant-123"
6else:
7 echo "Failed to delete notification count, status: ", $httpResponse.statusCode
8

キャッシュされた通知カウントを取得 Internal Link

パラメーター

名前必須説明
tenantIdstringはい
idstringいいえ

レスポンス

戻り値: Option[GetCachedNotificationCountResponse]

getCachedNotificationCount の例
Copy Copy
1
2let (response, httpResponse) = client.getCachedNotificationCount(tenantId = "my-tenant-123", id = "notification-789")
3if response.isSome:
4 let cached = response.get()
5 echo "Cached notification count: ", $cached
6else:
7 echo "No cached notification count"
8

通知カウントを取得 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
userIdstringいいえ
urlIdstringはい
fromCommentIdstringいいえ
viewedboolいいえ

レスポンス

戻り値: Option[GetNotificationCountResponse]

getNotificationCount の例
Copy Copy
1
2let (response, httpResponse) = client.getNotificationCount(tenantId = "my-tenant-123", userId = "user-987", urlId = "news/2026/06/election-results", fromCommentId = "", viewed = false)
3if response.isSome:
4 let notifyData = response.get()
5 echo notifyData
6

通知を取得 Internal Link


パラメータ

名称必須説明
tenantIdstringはい
userIdstringいいえ
urlIdstringはい
fromCommentIdstringいいえ
viewedboolいいえ
skipfloat64いいえ

レスポンス

戻り値: Option[GetNotificationsResponse]

getNotifications の例
Copy Copy
1
2let (response, httpResponse) = client.getNotifications(tenantId = "my-tenant-123", userId = "user-456", urlId = "news/article-title", fromCommentId = "cmt-789", viewed = false, skip = 0.0)
3if response.isSome:
4 let notifications = response.get()
5 echo notifications
6

通知を更新 Internal Link


パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ
updateNotificationBodyUpdateNotificationBodyいいえ
userIdstringいいえ

レスポンス

返却値: Option[APIEmptyResponse]

updateNotification の例
Copy Copy
1
2let (response, httpResponse) = client.updateNotification(
3 tenantId = "my-tenant-123",
4 id = "notif-456",
5 updateNotificationBody = UpdateNotificationBody(
6 enabled = true,
7 channels = @["email", "push"],
8 frequency = "immediate"
9 ),
10 userId = "user-789"
11)
12
13if response.isSome:
14 let apiEmpty = response.get()
15 discard apiEmpty
16

V1ページリアクトを作成 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
urlIdstringはい
titlestringいいえ

レスポンス

戻り値: Option[CreateV1PageReact]

createV1PageReact の例
Copy Copy
1
2let (response, httpResponse) = client.createV1PageReact(
3 tenantId = "my-tenant-123",
4 urlId = "news/2026/market-rally",
5 title = "Breaking News: Markets Rally Today"
6)
7
8if response.isSome:
9 let pageReact = response.get()
10 echo "Page react created: ", pageReact
11else:
12 echo "Failed to create page react: ", httpResponse
13

V2ページリアクトを作成 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
urlIdstringはい
idstringいいえ
titlestringいいえ

レスポンス

戻り値: Option[CreateV1PageReact]

createV2PageReact の例
Copy Copy
1
2let (response, httpResponse) = client.createV2PageReact(
3 tenantId = "my-tenant-123",
4 urlId = "news/2026/06/fastcomments-release",
5 id = "",
6 title = ""
7)
8if response.isSome:
9 let react = response.get()
10 echo "Created page react: ", $react
11else:
12 echo "No react returned, HTTP status: ", $httpResponse.statusCode
13

V1ページリアクトを削除 Internal Link


パラメータ

NameTypeRequiredDescription
tenantIdstringはい
urlIdstringはい

レスポンス

戻り値: Option[CreateV1PageReact]

deleteV1PageReact の例
Copy Copy
1
2let (response, httpResponse) = client.deleteV1PageReact(tenantId = "my-tenant-123", urlId = "news/article-title")
3if response.isSome:
4 let deletedReact = response.get()
5 echo "Deleted react:", deletedReact
6else:
7 echo "No react returned for tenant: my-tenant-123, url: news/article-title"
8

V2ページリアクトを削除 Internal Link


パラメータ

名前必須説明
tenantIdstringはい
urlIdstringはい
idstringいいえ

レスポンス

戻り値: Option[CreateV1PageReact]

deleteV2PageReact の例
Copy Copy
1
2let (response, httpResponse) = client.deleteV2PageReact(tenantId = "my-tenant-123", urlId = "news/2026/politics-election", id = "react-456")
3if response.isSome:
4 let react = response.get()
5 echo react
6else:
7 echo "No reaction returned, status: ", httpResponse.status
8

V1ページいいねを取得 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
urlIdstringはい

レスポンス

返却: Option[GetV1PageLikes]

getV1PageLikes の例
Copy Copy
1
2let (response, httpResponse) = client.getV1PageLikes(tenantId = "my-tenant-123", urlId = "news/how-to-train-your-dragon")
3if response.isSome:
4 let pageLikes = response.get()
5 echo "Fetched page likes for url:", "news/how-to-train-your-dragon"
6else:
7 echo "No likes returned for url:", "news/how-to-train-your-dragon"
8

V2ページリアクトを取得 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
urlIdstringはい

レスポンス

戻り値: Option[GetV2PageReacts]

getV2PageReacts の例
Copy Copy
1
2let (response, httpResponse) = client.getV2PageReacts(tenantId = "my-tenant-123", urlId = "news/elections/2026/us-primary-results")
3if response.isSome:
4 let reacts = response.get()
5 echo "Received reacts: ", $reacts
6else:
7 echo "No reacts available"
8

V2ページリアクトユーザーを取得 Internal Link


パラメータ

名前必須説明
tenantIdstringはい
urlIdstringはい
idstringいいえ

レスポンス

戻り値: Option[GetV2PageReactUsersResponse]

getV2PageReactUsers の例
Copy Copy
1
2let (response, httpResponse) = client.getV2PageReactUsers(tenantId = "my-tenant-123", urlId = "news/article-title", id = "")
3if response.isSome:
4 let usersResp = response.get()
5 echo repr(usersResp)
6else:
7 echo "No page react users returned. HTTP response: ", repr(httpResponse)
8

ページを追加 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
createAPIPageDataCreateAPIPageDataいいえ

レスポンス

戻り値: 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


パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ

レスポンス

戻り値: 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

オフラインユーザーを取得 Internal Link

現在オンラインではない、ページ上の過去のコメント投稿者。displayNameでソートされています。 /users/online を使い切った後に、"Members" セクションをレンダリングするために使用します。 commenterName によるカーソルページネーション: サーバーは部分インデックス {tenantId, urlId, commenterName} を afterName 以降へ $gt で順に走査し、$skip のコストは発生しません。

パラメータ

名前必須説明
tenantIdstringはい
urlIdstringはい
afterNamestringいいえ
afterUserIdstringいいえ

レスポンス

返却: Option[PageUsersOfflineResponse]

getOfflineUsers の例
Copy Copy
1
2let (response, httpResponse) = client.getOfflineUsers(
3 tenantId = "my-tenant-123",
4 urlId = "news/article-how-to-code",
5 afterName = "",
6 afterUserId = ""
7)
8
9if response.isSome:
10 let offlinePage = response.get()
11 echo "Received offline users page"
12 discard httpResponse.statusCode
13

オンラインユーザーを取得 Internal Link


ページの現在オンラインの閲覧者: 今まさにそのページに対してWebSocketセッションがサブスクライブされているユーザー。
anonCount + totalCount を返します(ルーム全体の購読者数。個々に列挙しない匿名閲覧者を含む)。

パラメーター

NameTypeRequiredDescription
tenantIdstringはい
urlIdstringはい
afterNamestringいいえ
afterUserIdstringいいえ

レスポンス

返却値: Option[PageUsersOnlineResponse]

getOnlineUsers の例
Copy Copy
1
2let (response, httpResponse) = client.getOnlineUsers(tenantId = "my-tenant-123", urlId = "news/politics/top-story", afterName = "", afterUserId = "")
3if response.isSome:
4 let page = response.get()
5 echo "Received online users page:"
6 echo page
7else:
8 echo "No online users returned. HTTP status: ", httpResponse.statusCode
9

URL IDでページを取得 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
urlIdstringはい

レスポンス

戻り値: 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

パラメータ

名前必須説明
tenantIdstringはい

レスポンス

戻り値: 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

テナントのページを一覧表示します。FChat デスクトップクライアントがルームリストを生成するために使用します。 各ページの解決済みカスタム設定で enableFChat が true である必要があります。 SSO を必要とするページは、リクエスト元ユーザーのグループアクセスに対してフィルタされます。

パラメータ

名前必須説明
tenantIdstringはい
cursorstringいいえ
limitintいいえ
qstringいいえ
sortByPagesSortByいいえ
hasCommentsboolいいえ

レスポンス

戻り値: Option[GetPublicPagesResponse]

getPagesPublic の例
Copy Copy
1
2let (response, httpResponse) = client.getPagesPublic(
3 tenantId = "my-tenant-123",
4 cursor = "",
5 limit = 0,
6 q = "",
7 sortBy = PagesSortBy(0),
8 hasComments = false
9)
10
11if response.isSome:
12 let pages = response.get()
13 echo "Retrieved public pages: ", $pages
14else:
15 echo "No pages returned, HTTP status: ", $httpResponse.status
16

ユーザー情報を取得 Internal Link


テナントの大量ユーザー情報。userIds を指定すると、User / SSOUser から表示用情報を返します。 コメントウィジェットが、プレゼンスイベントでちょうど出現したユーザーを補完するために使用します。 ページコンテキストなし:プライバシーは一律に適用されます(非公開プロファイルはマスクされます)。

パラメータ

名前必須説明
tenantIdstringはい
idsstringいいえ

レスポンス

戻り値: Option[PageUsersInfoResponse]

getUsersInfo の例
Copy Copy
1
2let (response, httpResponse) = client.getUsersInfo(tenantId = "my-tenant-123", ids = "user-42,user-87")
3if response.isSome:
4 let usersInfo = response.get()
5 echo "Retrieved users info:", usersInfo
6else:
7 echo "No users info returned. HTTP status:", httpResponse.status
8

ページを部分更新 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ
updateAPIPageDataUpdateAPIPageDataいいえ

レスポンス

戻り値: 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

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ

レスポンス

戻り値: Option[APIEmptyResponse]

deletePendingWebhookEvent の例
Copy Copy
1
2let (response, httpResponse) = client.deletePendingWebhookEvent(tenantId = "my-tenant-123", id = "wh_evt_9f8b7a6c")
3if response.isSome:
4 let apiEmpty = response.get()
5 echo "Pending webhook event deleted for tenant my-tenant-123"
6else:
7 echo "Failed to delete pending webhook event"
8

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

パラメータ

名前必須説明
tenantIdstringはい
commentIdstringはい
externalIdstringいいえ
eventTypestringいいえ
domainstringいいえ
attemptCountGTfloat64いいえ

レスポンス

戻り値: Option[GetPendingWebhookEventCountResponse]

getPendingWebhookEventCount の例
Copy Copy
1
2let (response, httpResponse) = client.getPendingWebhookEventCount(
3 tenantId = "my-tenant-123",
4 commentId = "cmt-456abc",
5 externalId = "ext-7890",
6 eventType = "comment_created",
7 domain = "news.example.com",
8 attemptCountGT = 2.0
9)
10
11if response.isSome:
12 let pending = response.get()
13 echo pending
14else:
15 echo "No pending webhook event count returned; HTTP status: ", httpResponse.status
16

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

パラメータ

名前必須説明
tenantIdstringはい
commentIdstringはい
externalIdstringいいえ
eventTypestringいいえ
domainstringいいえ
attemptCountGTfloat64いいえ
skipfloat64いいえ

レスポンス

戻り値: Option[GetPendingWebhookEventsResponse]

getPendingWebhookEvents の例
Copy Copy
1
2let (response, httpResponse) = client.getPendingWebhookEvents(
3 tenantId = "my-tenant-123",
4 commentId = "cmt-987654",
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

質問設定を作成 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
createQuestionConfigBodyCreateQuestionConfigBodyいいえ

レスポンス

戻り値: Option[CreateQuestionConfigResponse]

createQuestionConfig の例
Copy Copy
1
2let (response, httpResponse) = client.createQuestionConfig(
3 tenantId = "my-tenant-123",
4 createQuestionConfigBody = CreateQuestionConfigBody(
5 label = "Article Question",
6 required = true,
7 minLength = 20,
8 maxLength = 1000,
9 allowedTags = @["comment","question","feedback"],
10 notifyModerators = false
11 )
12)
13if response.isSome:
14 let cfg = response.get()
15 echo "Created question config id: ", cfg.id
16

質問設定を削除 Internal Link


パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ

レスポンス

戻り値: Option[APIEmptyResponse]

deleteQuestionConfig の例
Copy Copy
1
2let (response, httpResponse) = client.deleteQuestionConfig(tenantId = "my-tenant-123", id = "")
3
4if response.isSome:
5 let deleted = response.get()
6 echo "Question config deleted for tenant: ", "my-tenant-123"
7else:
8 echo "Failed to delete question config"
9

質問設定を取得 Internal Link

パラメータ

NameTypeRequiredDescription
tenantIdstringはい
idstringいいえ

レスポンス

戻り値: Option[GetQuestionConfigResponse]

getQuestionConfig の例
Copy Copy
1
2let (response, httpResponse) = client.getQuestionConfig(tenantId = "my-tenant-123", id = "qst-456")
3if response.isSome:
4 let cfg = response.get()
5 discard cfg
6

質問設定一覧を取得 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
skipfloat64いいえ

レスポンス

返り値: Option[GetQuestionConfigsResponse]

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 echo "Received question configs for tenant my-tenant-123"
6 echo configs
7else:
8 echo "No question configs returned"
9

質問設定を更新 Internal Link

Parameters

NameTypeRequiredDescription
tenantIdstringはい
idstringいいえ
updateQuestionConfigBodyUpdateQuestionConfigBodyいいえ

Response

戻り値: Option[APIEmptyResponse]

Example

updateQuestionConfig の例
Copy Copy
1
2let (response, httpResponse) = client.updateQuestionConfig(tenantId = "my-tenant-123", id = "question-config-456", updateQuestionConfigBody = default(UpdateQuestionConfigBody))
3if response.isSome:
4 let apiEmpty = response.get()
5 discard apiEmpty
6

質問結果を作成 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
createQuestionResultBodyCreateQuestionResultBodyいいえ

レスポンス

戻り値: Option[CreateQuestionResultResponse]

createQuestionResult の例
Copy Copy
1
2let (response, httpResponse) = client.createQuestionResult(
3 tenantId = "my-tenant-123",
4 createQuestionResultBody = CreateQuestionResultBody(
5 questionId = "q-2026-001",
6 userId = "user-42",
7 correct = true,
8 score = 95,
9 tags = @["news","reader-question"]
10 )
11)
12if response.isSome:
13 let result = response.get()
14 echo "Created question result id: ", result.id
15 echo "HTTP status: ", httpResponse.status.code
16

質問結果を削除 Internal Link


パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ

レスポンス

返却値: Option[APIEmptyResponse]

deleteQuestionResult の例
Copy Copy
1
2let tenantId = "my-tenant-123"
3let resultId = "question-result-456"
4let (response, httpResponse) = client.deleteQuestionResult(tenantId = tenantId, id = resultId)
5if response.isSome:
6 let emptyResp = response.get()
7 echo "Deleted question result:", resultId
8

質問結果を取得 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ

レスポンス

返り値: Option[GetQuestionResultResponse]

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 "Question result received:"
6 echo result
7else:
8 echo "No question result returned, HTTP status: ", $httpResponse.status
9

質問結果一覧を取得 Internal Link


パラメータ

NameTypeRequiredDescription
tenantIdstringはい
urlIdstringはい
userIdstringいいえ
startDatestringいいえ
questionIdstringいいえ
questionIdsstringいいえ
skipfloat64いいえ

レスポンス

戻り値: Option[GetQuestionResultsResponse]

getQuestionResults の例
Copy Copy
1
2let (response, httpResponse) = client.getQuestionResults(
3 tenantId = "my-tenant-123",
4 urlId = "news/2026/election-analysis",
5 userId = "user-42",
6 startDate = "2026-06-01T00:00:00Z",
7 questionId = "q-6789",
8 questionIds = @["q-6789", "q-6790"],
9 skip = 0.0
10)
11if response.isSome:
12 let results = response.get()
13 echo "Received question results"
14else:
15 echo "No results returned"
16

質問結果を更新 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ
updateQuestionResultBodyUpdateQuestionResultBodyいいえ

レスポンス

返却値: Option[APIEmptyResponse]

updateQuestionResult の例
Copy Copy
1
2let (response, httpResponse) = client.updateQuestionResult(
3 tenantId = "my-tenant-123",
4 id = "question-result-456",
5 updateQuestionResultBody = UpdateQuestionResultBody(
6 questionId: "q-789",
7 userId: "user-42",
8 score: 92,
9 passed: true,
10 tags: @["quiz", "math"]
11 )
12)
13if response.isSome:
14 let apiResp = response.get()
15 echo "Question result updated successfully"
16else:
17 echo "No response body; HTTP status: ", httpResponse.status.code
18

質問結果を集計 Internal Link


パラメータ

名前必須説明
tenantIdstringはい
questionIdstringいいえ
questionIdsseq[string]いいえ
urlIdstringはい
timeBucketAggregateTimeBucketいいえ
startDatestringいいえ
forceRecalculateboolいいえ

レスポンス

戻り値: Option[AggregateQuestionResultsResponse]

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

質問結果を一括集計 Internal Link

パラメータ

名前必須説明
tenantIdstringYes
bulkAggregateQuestionResultsRequestBulkAggregateQuestionResultsRequestNo
forceRecalculateboolNo

レスポンス

戻り値: Option[BulkAggregateQuestionResultsResponse]

bulkAggregateQuestionResults の例
Copy Copy
1
2let (response, httpResponse) = client.bulkAggregateQuestionResults(
3 tenantId = "my-tenant-123",
4 bulkAggregateQuestionResultsRequest = BulkAggregateQuestionResultsRequest(),
5 forceRecalculate = false
6)
7
8if response.isSome:
9 let aggregated = response.get()
10 echo "Aggregated question results received"
11

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

パラメータ

名前必須説明
tenantIdstringはい
questionIdstringいいえ
questionIdsseq[string]いいえ
urlIdstringはい
startDatestringいいえ
forceRecalculateboolいいえ
minValuefloat64いいえ
maxValuefloat64いいえ
limitfloat64いいえ

レスポンス

戻り値: Option[CombineQuestionResultsWithCommentsResponse]

combineCommentsWithQuestionResults の例
Copy Copy
1
2let (response, httpResponse) = client.combineCommentsWithQuestionResults(
3 tenantId = "my-tenant-123",
4 questionId = "",
5 questionIds = @[],
6 urlId = "news/article-2026-climate-change",
7 startDate = "",
8 forceRecalculate = false,
9 minValue = 0.0,
10 maxValue = 0.0,
11 limit = 0.0
12)
13
14if response.isSome:
15 let combined = response.get()
16 echo "Combined results received for tenant:", " my-tenant-123"
17else:
18 echo "No combined results returned"
19

SSOユーザーを追加 Internal Link


パラメータ

名前必須説明
tenantIdstringはい
createAPISSOUserDataCreateAPISSOUserDataいいえ

レスポンス

戻り値: 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

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ
deleteCommentsboolいいえ
commentDeleteModestringいいえ

レスポンス

返却値: 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

パラメータ

名前必須説明
tenantIdstringはい
emailstringいいえ

レスポンス

戻り値: 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

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ

レスポンス

戻り値: 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

パラメータ

名前必須説明
tenantIdstringはい
skipintいいえ

レスポンス

戻り値: Option[GetSSOUsersResponse]

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 ssoUsers
6else:
7 echo "No SSO users returned; HTTP response:", httpResponse
8

SSOユーザーを部分更新 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ
updateAPISSOUserDataUpdateAPISSOUserDataいいえ
updateCommentsboolいいえ

レスポンス

返却値: 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

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ
updateAPISSOUserDataUpdateAPISSOUserDataいいえ
updateCommentsboolいいえ

レスポンス

戻り値: 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

パラメータ

名前必須説明
tenantIdstringはい
createAPIUserSubscriptionDataCreateAPIUserSubscriptionDataいいえ

レスポンス

戻り値: 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

パラメータ

NameTypeRequiredDescription
tenantIdstringはい
idstringいいえ
userIdstringいいえ

レスポンス

戻り値: 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

パラメータ

名前必須説明
tenantIdstringはい
userIdstringいいえ

レスポンス

戻り値: 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

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ
updateAPIUserSubscriptionDataUpdateAPIUserSubscriptionDataいいえ
userIdstringいいえ

レスポンス

戻り値: Option[UpdateSubscriptionAPIResponse]

updateSubscription の例
Copy Copy
1
2let (response, httpResponse) = client.updateSubscription(
3 tenantId = "my-tenant-123",
4 id = "sub-456",
5 updateAPIUserSubscriptionData = UpdateAPIUserSubscriptionData(
6 subscribed = true,
7 channels = @["email", "push"]
8 ),
9 userId = "user-789"
10)
11
12if response.isSome:
13 let updated = response.get()
14 echo "Subscription updated:", updated
15else:
16 echo "Update failed, HTTP response:", httpResponse
17

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

パラメータ

名前必須説明
tenantIdstringはい
yearNumberfloat64いいえ
monthNumberfloat64いいえ
dayNumberfloat64いいえ
skipfloat64いいえ

レスポンス

戻り値: Option[GetTenantDailyUsagesResponse]

getTenantDailyUsages の例
Copy Copy
1
2let (response, httpResponse) = client.getTenantDailyUsages(
3 tenantId = "my-tenant-123",
4 yearNumber = 2026.0,
5 monthNumber = 6.0,
6 dayNumber = 19.0,
7 skip = 0.0
8)
9
10if response.isSome:
11 let usage = response.get()
12 discard usage
13

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

パラメータ

名前必須説明
tenantIdstringはい
createTenantPackageBodyCreateTenantPackageBodyいいえ

レスポンス

返却値: Option[CreateTenantPackageResponse]

createTenantPackage の例
Copy Copy
1
2let (response, httpResponse) = client.createTenantPackage(tenantId = "my-tenant-123", createTenantPackageBody = CreateTenantPackageBody())
3
4if response.isSome:
5 let pkg = response.get()
6 echo "Created tenant package: ", $pkg
7else:
8 echo "Failed to create tenant package, HTTP response: ", $httpResponse
9

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

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ

レスポンス

返却値: Option[APIEmptyResponse]

deleteTenantPackage の例
Copy Copy
1
2let (response, httpResponse) = client.deleteTenantPackage(tenantId = "my-tenant-123", id = "package-987")
3if response.isSome:
4 let emptyResp = response.get()
5 echo emptyResp
6else:
7 echo "Failed to delete tenant package"
8

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


パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ

レスポンス

戻り値: Option[GetTenantPackageResponse]

getTenantPackage の例
Copy Copy
1
2let (response, httpResponse) = client.getTenantPackage(tenantId = "my-tenant-123", id = "premium-2026")
3if response.isSome:
4 let pkg = response.get()
5 echo "Retrieved tenant package:"
6 echo pkg
7else:
8 echo "Tenant package not found"
9

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

パラメータ

名前必須説明
tenantIdstringはい
skipfloat64いいえ

レスポンス

返却値: Option[GetTenantPackagesResponse]

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 tenant packages:"
6 echo packages
7else:
8 echo "No packages found for tenant 'my-tenant-123'"
9

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

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ
replaceTenantPackageBodyReplaceTenantPackageBodyいいえ

レスポンス

戻り値: Option[APIEmptyResponse]

replaceTenantPackage の例
Copy Copy
1
2let (response, httpResponse) = client.replaceTenantPackage(
3 tenantId = "my-tenant-123",
4 id = "pkg-987",
5 replaceTenantPackageBody = ReplaceTenantPackageBody(
6 name = "Premium Plan",
7 priceCents = 999,
8 seats = 50,
9 enabled = true,
10 features = @["moderation", "analytics", "priority-support"]
11 )
12)
13
14if response.isSome:
15 let apiEmpty = response.get()
16 discard apiEmpty
17

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

パラメーター

名前必須説明
tenantIdstringはい
idstringいいえ
updateTenantPackageBodyUpdateTenantPackageBodyいいえ

レスポンス

戻り値: Option[APIEmptyResponse]

updateTenantPackage の例
Copy Copy
1
2let packageBody = UpdateTenantPackageBody(
3 name: "Pro Plan",
4 priceCents: 1999,
5 active: true,
6 features: @["priority-support", "advanced-moderation"]
7)
8
9let (response, httpResponse) = client.updateTenantPackage(
10 tenantId = "my-tenant-123",
11 id = "pkg-789",
12 updateTenantPackageBody = packageBody
13)
14
15if response.isSome:
16 let apiEmpty = response.get()
17 echo "Tenant package updated successfully, HTTP status: " & $httpResponse.status
18

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

パラメータ

NameTypeRequiredDescription
tenantIdstringYes
createTenantUserBodyCreateTenantUserBodyNo

レスポンス

返り値: Option[CreateTenantUserResponse]

createTenantUser の例
Copy Copy
1
2let (response, httpResponse) = client.createTenantUser(tenantId = "my-tenant-123",
3 createTenantUserBody = CreateTenantUserBody(userId = "user-456",
4 email = "jane.doe@example.com",
5 displayName = "Jane Doe",
6 roles = @["editor"],
7 isAdmin = false))
8if response.isSome:
9 let created = response.get()
10 discard created
11

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

パラメータ

Name必須説明
tenantIdstringはい
idstringいいえ
deleteCommentsstringいいえ
commentDeleteModestringいいえ

レスポンス

戻り値: Option[APIEmptyResponse]

deleteTenantUser の例
Copy Copy
1
2let (response, httpResponse) = client.deleteTenantUser(tenantId = "my-tenant-123", id = "user-789", deleteComments = "true", commentDeleteMode = "soft")
3if response.isSome:
4 let apiResp = response.get()
5 echo "Tenant user deleted, response: ", apiResp
6else:
7 echo "Failed to delete tenant user, HTTP status: ", $httpResponse.status
8

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

パラメータ

NameTypeRequiredDescription
tenantIdstringはい
idstringいいえ

レスポンス

返却値: Option[GetTenantUserResponse]

getTenantUser の例
Copy Copy
1
2let (response, httpResponse) = client.getTenantUser(tenantId = "my-tenant-123", id = "user-789")
3if response.isSome:
4 let tenantUser = response.get()
5 echo "User fetched:", tenantUser
6else:
7 echo "No user found, HTTP status:", httpResponse.status
8

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

パラメータ

名前必須説明
tenantIdstringはい
skipfloat64いいえ

レスポンス

戻り値: Option[GetTenantUsersResponse]

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

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


パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ
replaceTenantUserBodyReplaceTenantUserBodyいいえ
updateCommentsstringいいえ

レスポンス

戻り値: Option[APIEmptyResponse]

replaceTenantUser の例
Copy Copy
1
2let body = ReplaceTenantUserBody(
3 displayName = "Jane Doe",
4 email = "jane.doe@example.com",
5 externalId = "jdoe-789",
6 admin = false,
7 enabled = true,
8 tags = @["editor", "subscriber"]
9)
10
11let (response, httpResponse) = client.replaceTenantUser(
12 tenantId = "my-tenant-123",
13 id = "user-456",
14 replaceTenantUserBody = body,
15 updateComments = "true"
16)
17
18if response.isSome:
19 let apiEmpty = response.get()
20 echo "ReplaceTenantUser succeeded, http status:", httpResponse.status
21

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ
redirectURLstringいいえ

レスポンス

戻り値: Option[APIEmptyResponse]

sendLoginLink の例
Copy Copy
1
2let (response, httpResponse) = client.sendLoginLink(tenantId = "my-tenant-123", id = "user-456", redirectURL = "https://app.newsportal.com/welcome")
3if response.isSome:
4 let apiResp = response.get()
5 echo "Login link sent successfully"
6else:
7 echo "Failed to send login link, HTTP status: ", $httpResponse.status
8

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

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ
updateTenantUserBodyUpdateTenantUserBodyいいえ
updateCommentsstringいいえ

レスポンス

戻り値: Option[APIEmptyResponse]

updateTenantUser の例
Copy Copy
1
2let (response, httpResponse) = client.updateTenantUser(
3 tenantId = "my-tenant-123",
4 id = "user-987",
5 updateTenantUserBody = UpdateTenantUserBody(
6 displayName = "Jane Doe",
7 email = "jane.doe@example.com",
8 roles = @["moderator", "editor"],
9 isActive = true
10 ),
11 updateComments = "true"
12)
13
14if response.isSome:
15 let apiEmpty = response.get()
16 discard apiEmpty
17

テナントを作成 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
createTenantBodyCreateTenantBodyいいえ

レスポンス

戻り値: Option[CreateTenantResponse]

createTenant の例
Copy Copy
1
2let (response, httpResponse) = client.createTenant(
3 tenantId = "my-tenant-123",
4 createTenantBody = CreateTenantBody(
5 name = "My Tenant 123",
6 domain = "news.example.com",
7 allowAnonymous = false,
8 allowedOrigins = @["https://news.example.com", "https://api.news.example.com"],
9 description = "Comments for News Example"
10 )
11)
12if response.isSome:
13 let created = response.get()
14 echo "Created tenant: ", created.tenantId
15else:
16 echo "Failed to create tenant, status: ", httpResponse.status
17

テナントを削除 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ
surestringいいえ

レスポンス

返却値: Option[APIEmptyResponse]

deleteTenant の例
Copy Copy
1
2let (response, httpResponse) = client.deleteTenant(tenantId = "my-tenant-123", id = "", sure = "")
3if response.isSome:
4 let emptyResp = response.get()
5else:
6 discard httpResponse
7

テナントを取得 Internal Link


パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ

レスポンス

戻り値: Option[GetTenantResponse]

getTenant の例
Copy Copy
1
2let (response, httpResponse) = client.getTenant(tenantId = "my-tenant-123", id = "tenant-789")
3if response.isSome:
4 let tenant = response.get()
5 discard tenant
6else:
7 discard httpResponse
8

テナント一覧を取得 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
metastringいいえ
skipfloat64いいえ

レスポンス

戻り値: Option[GetTenantsResponse]

getTenants の例
Copy Copy
1
2let (response, httpResponse) = client.getTenants(tenantId = "my-tenant-123", meta = "env=production", skip = 0.0)
3if response.isSome:
4 let tenantsResp = response.get()
5 discard tenantsResp
6 echo "Tenants fetched successfully"
7else:
8 echo "Request failed with status ", httpResponse.status
9

テナントを更新 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ
updateTenantBodyUpdateTenantBodyいいえ

レスポンス

戻り値: Option[APIEmptyResponse]

updateTenant の例
Copy Copy
1
2let (response, httpResponse) = client.updateTenant(
3 tenantId = "my-tenant-123",
4 id = "settings",
5 updateTenantBody = UpdateTenantBody(
6 name = "My Tenant 123",
7 enableModeration = true,
8 allowedDomains = @["news.example.com", "blog.example.org"],
9 maxCommentLength = 1000
10 )
11)
12
13if response.isSome:
14 let apiResp = response.get()
15 echo "Tenant updated successfully: ", apiResp
16else:
17 echo "Failed to update tenant, HTTP status: ", httpResponse.status
18

チケット状態を変更 Internal Link


パラメータ

名前必須説明
tenantIdstringはい
userIdstringいいえ
idstringいいえ
changeTicketStateBodyChangeTicketStateBodyいいえ

レスポンス

戻り値: Option[ChangeTicketStateResponse]

changeTicketState の例
Copy Copy
1
2let body = ChangeTicketStateBody()
3let (response, httpResponse) = client.changeTicketState(tenantId = "my-tenant-123", userId = "user-456", id = "ticket-789", changeTicketStateBody = body)
4if response.isSome:
5 let ticketResp = response.get()
6 echo "Ticket state changed:", ticketResp
7

チケットを作成 Internal Link

パラメータ

NameTypeRequiredDescription
tenantIdstringはい
userIdstringいいえ
createTicketBodyCreateTicketBodyいいえ

レスポンス

戻り値: Option[CreateTicketResponse]

createTicket の例
Copy Copy
1
2let body = CreateTicketBody(
3 subject = "Comment moderation issue",
4 message = "Several abusive comments reported on article, please review and moderate.",
5 tags = @["moderation", "abuse", "urgent"],
6 url = "https://news.example.com/world/2026-election",
7 priority = "high"
8)
9
10let (response, httpResponse) = client.createTicket(tenantId = "my-tenant-123", userId = "user-789", createTicketBody = body)
11
12if response.isSome:
13 let ticket = response.get()
14 echo "Created ticket ID: ", ticket.id
15

チケットを取得 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ
userIdstringいいえ

レスポンス

戻り値: Option[GetTicketResponse]

getTicket の例
Copy Copy
1
2let (response, httpResponse) = client.getTicket(tenantId = "my-tenant-123", id = "ticket-456", userId = "user-789")
3if response.isSome:
4 let ticket = response.get()
5 echo "Got ticket:", ticket
6else:
7 echo "No ticket returned; HTTP response:", httpResponse
8

チケット一覧を取得 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
userIdstringいいえ
statefloat64いいえ
skipfloat64いいえ
limitfloat64いいえ

レスポンス

戻り値: Option[GetTicketsResponse]

getTickets の例
Copy Copy
1
2let (response, httpResponse) = client.getTickets(tenantId = "my-tenant-123", userId = "user-789", state = 1.0, skip = 0.0, limit = 50.0)
3if response.isSome:
4 let tickets = response.get()
5 echo tickets
6

翻訳を取得 Internal Link

パラメータ

名前必須説明
namespacestring任意
componentstring任意
localestring任意
useFullTranslationIdsbool任意

レスポンス

戻り値: Option[GetTranslationsResponse]

getTranslations の例
Copy Copy
1
2let (response, httpResponse) = client.getTranslations(
3 namespace = "news-site",
4 component = "article-comments",
5 locale = "en-US",
6 useFullTranslationIds = false
7)
8if response.isSome:
9 let translations = response.get()
10 discard translations
11else:
12 echo "No translations available"
13

画像をアップロード Internal Link

パラメータ

名前必須説明
tenantIdstringはい
filestringいいえ
sizePresetSizePresetいいえ
urlIdstringはい

レスポンス

戻り値: 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

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ

レスポンス

戻り値: Option[APIGetUserBadgeProgressResponse]

getUserBadgeProgressById の例
Copy Copy
1
2let (response, httpResponse) = client.getUserBadgeProgressById(tenantId = "my-tenant-123", id = "")
3if response.isSome:
4 let badgeProgress = response.get()
5 echo badgeProgress
6else:
7 echo "No badge progress found"
8

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

パラメータ

名前必須説明
tenantIdstringはい
userIdstringいいえ

レスポンス

戻り値: Option[APIGetUserBadgeProgressResponse]

getUserBadgeProgressByUserId の例
Copy Copy
1
2let tenantId = "my-tenant-123"
3let userId = "user-456"
4let (response, httpResponse) = client.getUserBadgeProgressByUserId(tenantId = tenantId, userId = userId)
5if response.isSome:
6 let badgeProgress = response.get()
7 echo "Badge progress retrieved for ", userId
8 discard badgeProgress
9

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

パラメータ

名前必須説明
tenantIdstringはい
userIdstringいいえ
limitfloat64いいえ
skipfloat64いいえ

レスポンス

戻り値: Option[APIGetUserBadgeProgressListResponse]

getUserBadgeProgressList の例
Copy Copy
1
2let (response, httpResponse) = client.getUserBadgeProgressList(
3 tenantId = "my-tenant-123",
4 userId = "user-789",
5 limit = 25.0,
6 skip = 0.0
7)
8
9if response.isSome:
10 let badgeProgress = response.get()
11 echo "Received badge progress:", badgeProgress
12else:
13 echo "No badge progress; HTTP status: ", $httpResponse.status
14

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

パラメータ

NameTypeRequiredDescription
tenantIdstringはい
createUserBadgeParamsCreateUserBadgeParamsいいえ

レスポンス

戻り値: Option[APICreateUserBadgeResponse]

createUserBadge の例
Copy Copy
1
2let (response, httpResponse) = client.createUserBadge(
3 tenantId = "my-tenant-123",
4 createUserBadgeParams = CreateUserBadgeParams(
5 userId = "user-456",
6 badgeId = "top-commenter",
7 reason = "Top commenter for June 2026",
8 awardedBy = "mod-team",
9 metadata = @["news","engagement"]
10 )
11)
12if response.isSome:
13 let badgeResp = response.get()
14 discard badgeResp
15

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

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ

レスポンス

返却値: Option[APIEmptySuccessResponse]

deleteUserBadge の例
Copy Copy
1
2let tenantId = "my-tenant-123"
3let badgeId = "badge-456"
4
5let (response, httpResponse) = client.deleteUserBadge(tenantId = tenantId, id = badgeId)
6
7if response.isSome:
8 let success = response.get()
9 echo "Badge deleted successfully for tenant: ", tenantId, " id: ", badgeId
10else:
11 echo "Failed to delete badge. HTTP status: ", $httpResponse.status
12

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

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ

レスポンス

戻り値: Option[APIGetUserBadgeResponse]

getUserBadge の例
Copy Copy
1
2let (response, httpResponse) = client.getUserBadge(tenantId = "my-tenant-123", id = "badge-9876")
3if response.isSome:
4 let badge = response.get()
5 echo "Fetched badge:"
6 echo badge
7else:
8 echo "No badge found"
9 echo httpResponse
10

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

パラメータ

名前必須説明
tenantIdstringはい
userIdstringいいえ
badgeIdstringいいえ
displayedOnCommentsboolいいえ
limitfloat64いいえ
skipfloat64いいえ

レスポンス

戻り値: Option[APIGetUserBadgesResponse]

getUserBadges の例
Copy Copy
1
2let (response, httpResponse) = client.getUserBadges(
3 tenantId = "my-tenant-123",
4 userId = "user-9876",
5 badgeId = "top-commenter",
6 displayedOnComments = true,
7 limit = 20.0,
8 skip = 0.0
9)
10
11if response.isSome:
12 let badges = response.get()
13 echo "Badges response:", badges
14else:
15 echo "No badges found (HTTP status: ", httpResponse.status, ")"
16

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

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ
updateUserBadgeParamsUpdateUserBadgeParamsいいえ

レスポンス

戻り値: Option[APIEmptySuccessResponse]

updateUserBadge の例
Copy Copy
1
2let (response, httpResponse) = client.updateUserBadge(
3 tenantId = "my-tenant-123",
4 id = "user-456",
5 updateUserBadgeParams = UpdateUserBadgeParams()
6)
7
8if response.isSome:
9 let success = response.get()
10 echo "Badge updated successfully"
11else:
12 echo "Badge update failed"
13

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


パラメータ

名前必須説明
tenantIdstringはい
ssostringいいえ

レスポンス

戻り値: Option[GetUserNotificationCountResponse]

getUserNotificationCount の例
Copy Copy
1
2let (response, httpResponse) = client.getUserNotificationCount(tenantId = "news-tenant-123", sso = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c2VyLTI0NyIsImlhdCI6MTYw945600fQ.sflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c")
3if response.isSome:
4 let countResp = response.get()
5 echo "Received user notification count response: ", countResp
6else:
7 echo "No notification count returned"
8

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

パラメータ

名前必須説明
tenantIdstringはい
urlIdstringはい
pageSizeintいいえ
afterIdstringいいえ
includeContextboolいいえ
afterCreatedAtint64いいえ
unreadOnlyboolいいえ
dmOnlyboolいいえ
noDmboolいいえ
includeTranslationsboolいいえ
includeTenantNotificationsboolいいえ
ssostringいいえ

レスポンス

戻り値: Option[GetMyNotificationsResponse]

getUserNotifications の例
Copy Copy
1
2let (response, httpResponse) = client.getUserNotifications(
3 tenantId = "my-tenant-123",
4 urlId = "news/article-title",
5 pageSize = 0,
6 afterId = "",
7 includeContext = false,
8 afterCreatedAt = 0,
9 unreadOnly = false,
10 dmOnly = false,
11 noDm = false,
12 includeTranslations = false,
13 includeTenantNotifications = false,
14 sso = ""
15)
16
17if response.isSome:
18 let notifications = response.get()
19 echo notifications
20

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

パラメータ

名前必須説明
tenantIdstringはい
ssostringいいえ

レスポンス

戻り値: Option[ResetUserNotificationsResponse]

resetUserNotificationCount の例
Copy Copy
1
2let (response, httpResponse) = client.resetUserNotificationCount(tenantId = "my-tenant-123", sso = "user-sso-token-456")
3if response.isSome:
4 let result = response.get()
5 echo "ResetUserNotificationsResponse:", result
6else:
7 echo "Reset failed, HTTP response:", httpResponse
8

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

パラメータ

名前必須説明
tenantIdstringはい
afterIdstringいいえ
afterCreatedAtint64いいえ
unreadOnlyboolいいえ
dmOnlyboolいいえ
noDmboolいいえ
ssostringいいえ

レスポンス

戻り値: Option[ResetUserNotificationsResponse]

resetUserNotifications の例
Copy Copy
1
2let (response, httpResponse) = client.resetUserNotifications(
3 tenantId = "my-tenant-123",
4 afterId = "",
5 afterCreatedAt = 0'i64,
6 unreadOnly = false,
7 dmOnly = false,
8 noDm = false,
9 sso = ""
10)
11if response.isSome:
12 let resetResp = response.get()
13 echo "ResetUserNotificationsResponse received"
14else:
15 echo "No ResetUserNotificationsResponse"
16

コメント購読の通知設定を更新 Internal Link

特定のコメントの通知を有効または無効にします。

パラメータ

名前必須説明
tenantIdstringはい
notificationIdstringいいえ
optedInOrOutstringいいえ
commentIdstringはい
ssostringいいえ

レスポンス

戻り値: Option[UpdateUserNotificationCommentSubscriptionStatusResponse]

updateUserNotificationCommentSubscriptionStatus の例
Copy Copy
1
2let (response, httpResponse) = client.updateUserNotificationCommentSubscriptionStatus(
3 tenantId = "my-tenant-123",
4 notificationId = "",
5 optedInOrOut = "",
6 commentId = "cmt-789",
7 sso = ""
8)
9
10if response.isSome:
11 let updateResp = response.get()
12 echo "Subscription update response: ", updateResp
13

ページ購読の通知設定を更新 Internal Link


ページの通知を有効または無効にします。ユーザーがページを購読していると、通知は作成され 新しいルートコメントに対して、また

Parameters

名前必須説明
tenantIdstringYes
urlIdstringYes
urlstringNo
pageTitlestringNo
subscribedOrUnsubscribedstringNo
ssostringNo

Response

戻り値: Option[UpdateUserNotificationPageSubscriptionStatusResponse]

updateUserNotificationPageSubscriptionStatus の例
Copy Copy
1
2let (response, httpResponse) = client.updateUserNotificationPageSubscriptionStatus(
3 tenantId = "my-tenant-123",
4 urlId = "news/economy/market-rally-2026-06-19",
5 url = "",
6 pageTitle = "",
7 subscribedOrUnsubscribed = "",
8 sso = ""
9)
10
11if response.isSome:
12 let updateResp = response.get()
13 echo "Subscription update received: ", updateResp
14else:
15 echo "No subscription update returned."
16

ユーザー通知の状態を更新 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
notificationIdstringいいえ
newStatusstringいいえ
ssostringいいえ

レスポンス

戻り値: Option[UpdateUserNotificationStatusResponse]

updateUserNotificationStatus の例
Copy Copy
1
2let (response, httpResponse) = client.updateUserNotificationStatus(
3 tenantId = "my-tenant-123",
4 notificationId = "notif-456",
5 newStatus = "read",
6 sso = "sso-token-abc123"
7)
8if response.isSome:
9 let updated = response.get()
10 echo "Notification status updated successfully"
11else:
12 echo "No update response received"
13

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

パラメータ

名前必須説明
tenantIdstringはい
urlIdWSstringいいえ
userIdsstringいいえ

レスポンス

戻り値: Option[GetUserPresenceStatusesResponse]

getUserPresenceStatuses の例
Copy Copy
1
2let (response, httpResponse) = client.getUserPresenceStatuses(tenantId = "my-tenant-123", urlIdWS = "news/article-title", userIds = "user-123,user-456")
3if response.isSome:
4 let presenceStatuses = response.get()
5 echo presenceStatuses
6else:
7 echo "No presence data"
8

ユーザー検索 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
urlIdstringはい
usernameStartsWithstringいいえ
mentionGroupIdsseq[string]いいえ
ssostringいいえ
searchSectionstringいいえ

レスポンス

戻り値: Option[SearchUsersResult]

searchUsers の例
Copy Copy
1
2let (response, httpResponse) = client.searchUsers(
3 tenantId = "my-tenant-123",
4 urlId = "news/top-story",
5 usernameStartsWith = "",
6 mentionGroupIds = @[],
7 sso = "",
8 searchSection = ""
9)
10
11if response.isSome:
12 let searchResult = response.get()
13 echo "SearchUsersResult:", searchResult
14else:
15 echo "No result or error. HTTP response:", httpResponse
16

ユーザーを取得 Internal Link


パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ

レスポンス

戻り値: Option[GetUserResponse]

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

投票を作成 Internal Link

パラメータ

NameTypeRequiredDescription
tenantIdstringはい
commentIdstringはい
directionstringいいえ
userIdstringいいえ
anonUserIdstringいいえ

レスポンス

戻り値: Option[VoteResponse]

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

投票を削除 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
idstringいいえ
editKeystringいいえ

レスポンス

戻り値: Option[VoteDeleteResponse]

deleteVote の例
Copy Copy
1
2let (response, httpResponse) = client.deleteVote(tenantId = "my-tenant-123", id = "vote-7f3b2a", editKey = "")
3if response.isSome:
4 let voteDelete = response.get()
5 echo "Vote deleted successfully"
6else:
7 echo "Failed to delete vote"
8

投票一覧を取得 Internal Link

パラメータ

名前必須説明
tenantIdstringはい
urlIdstringはい

レスポンス

返却値: Option[GetVotesResponse]

getVotes の例
Copy Copy
1
2let (response, httpResponse) = client.getVotes(tenantId = "my-tenant-123", urlId = "news/breaking-article-456")
3if response.isSome:
4 let votesResp = response.get()
5 echo "Received votes response:", $votesResp
6else:
7 echo "No votes returned, HTTP response:", $httpResponse
8

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

パラメータ

名前必須説明
tenantIdstringはい
urlIdstringはい
userIdstringいいえ
anonUserIdstringいいえ

レスポンス

戻り値: Option[GetVotesForUserResponse]

getVotesForUserの例
Copy Copy
1
2let (response, httpResponse) = client.getVotesForUser(
3 tenantId = "my-tenant-123",
4 urlId = "news/article-title",
5 userId = "user-789",
6 anonUserId = ""
7)
8if response.isSome:
9 let votes = response.get()
10 echo "User votes retrieved"
11else:
12 echo "No votes found"
13

ヘルプが必要ですか?

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

貢献

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