FastComments.com

FastComments PHP SDK


这是 FastComments 的官方 PHP SDK。

FastComments API 的官方 PHP SDK

仓库

在 GitHub 上查看


AI 编码代理 Internal Link

skills.sh

为您的编码代理提供 FastComments 所需的上下文——小部件、配置、Secure SSO、REST API 和 SDK:

npx skills add fastcomments/skills

兼容 Claude Code、Codex、Cursor、Copilot、Gemini,以及所有其他由 skills CLI 支持的代理。

安装与使用 Internal Link

要求

PHP 7.4 及更高版本。 也应适用于 PHP 8.0。

Composer

要通过 Composer 安装绑定库,请将以下内容添加到 composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/fastcomments/fastcomments-php.git"
    }
  ],
  "require": {
    "fastcomments/fastcomments-php": "*@dev"
  }
}

然后运行 composer install

手动安装

下载文件并包含 autoload.php:

<?php
require_once('/path/to/fastcomments/client/vendor/autoload.php');

入门指南 Internal Link

请按照 安装步骤 然后运行以下内容:

<?php
require_once(__DIR__ . '/vendor/autoload.php');



// Configure API key authorization: api_key
// 配置 API 密钥授权: api_key
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// 如有需要,取消下面的注释以为 API 密钥设置前缀(例如 Bearer)
// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');


$apiInstance = new FastComments\Client\Api\DefaultApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // 如果想使用自定义的 HTTP 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
    // This is optional, `GuzzleHttp\Client` will be used as default.
    // 这是可选的,默认会使用 `GuzzleHttp\Client`。
    new GuzzleHttp\Client(),
    $config
);
$tenant_id = 'tenant_id_example'; // string
$tenant_id = 'tenant_id_example'; // 字符串
$add_domain_config_params = new \FastComments\Client\Model\AddDomainConfigParams(); // \FastComments\Client\Model\AddDomainConfigParams

try {
    $result = $apiInstance->addDomainConfig($tenant_id, $add_domain_config_params);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->addDomainConfig: ', $e->getMessage(), PHP_EOL;
}

API 客户端 Internal Link

The SDK 提供了三个 API 客户端类:

  • DefaultApi - 用于服务器端的 API 密钥认证方法。按照 Getting Started 中的示例配置 API 密钥。
  • PublicApi - 不需要 API 密钥的公共方法,可安全地在浏览器和移动应用中调用。
  • ModerationApi - 一个包括实时和快速审查功能的完整套件。每个 ModerationApi 方法都接受 $sso 参数,并可通过 SSO 或 FastComments.com 会话 Cookie 进行身份验证。

使用 PublicApi

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// 公共方法不需要 API 密钥。
$apiInstance = new FastComments\Client\Api\PublicApi(
    new GuzzleHttp\Client()
);
$tenant_id = 'tenant_id_example'; // string
$url_id = 'url_id_example'; // string

try {
    $result = $apiInstance->getCommentsPublic($tenant_id, $url_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PublicApi->getCommentsPublic: ', $e->getMessage(), PHP_EOL;
}

使用 ModerationApi

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new FastComments\Client\Api\ModerationApi(
    new GuzzleHttp\Client()
);
$sso = 'sso_example'; // string - 用于验证审查员的 SSO 负载

try {
    $result = $apiInstance->getCount([
        'sso' => $sso,
    ]);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ModerationApi->getCount: ', $e->getMessage(), PHP_EOL;
}

模型 Internal Link

授权 Internal Link


为该 API 定义的身份验证方案:

api_key

  • 类型: API 密钥
  • API 密钥参数名称: x-api-key
  • 位置: HTTP header

作者 Internal Link

support@fastcomments.com

聚合 Internal Link

Aggregates documents by grouping them (if groupBy is provided) and applying multiple operations.
Different operations (e.g. sum, countDistinct, avg, etc.) are supported.

聚合文档通过对其进行分组(如果提供了 groupBy)并应用多个操作来实现。
支持不同的操作(例如 sum、countDistinct、avg 等)。

参数

名称类型位置必填描述
tenantIdstringquery是
parentTenantIdstringquery否
includeStatsbooleanquery否

响应

返回:AggregateResponse

示例

聚合 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5// 配置 API 密钥授权:api_key
6$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
7// 取消注释以下代码以为 API 密钥设置前缀(例如 Bearer),如有需要
8// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
9
10// 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
11// 这是可选的,默认将使用 `GuzzleHttp\Client`。
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
14 // This is optional, `GuzzleHttp\Client` will be used as default.
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$aggregation_request = new \FastComments\Client\Model\AggregationRequest(); // \FastComments\Client\Model\AggregationRequest
21$options = [
22 'parent_tenant_id' => 'parent_tenant_id_example', // string
23 'include_stats' => True, // bool
24];
25
26try {
27 $result = $apiInstance->aggregate($tenant_id, $aggregation_request, $options);
28 print_r($result);
29} catch (Exception $e) {
30 echo 'Exception when calling DefaultApi->aggregate: ', $e->getMessage(), PHP_EOL;
31}
32

获取审计日志 Internal Link

参数

名称类型位置必需描述
tenantIdstringqueryYes
limitnumberqueryNo
skipnumberqueryNo
orderstringqueryNo
afternumberqueryNo
beforenumberqueryNo

响应

返回:GetAuditLogsResponse

示例

getAuditLogs 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下代码以设置 API 密钥的前缀(例如 Bearer),如果需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是一项可选设置,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$options = [
21 'limit' => 3.4, // float
22 'skip' => 3.4, // float
23 'order' => new \FastComments\Client\Model\\FastComments\Client\Model\SORTDIR(), // \FastComments\Client\Model\SORTDIR
24 'after' => 3.4, // float
25 'before' => 3.4, // float
26];
27
28
29try {
30 $result = $apiInstance->getAuditLogs($tenant_id, $options);
31 print_r($result);
32} catch (Exception $e) {
33 echo 'Exception when calling DefaultApi->getAuditLogs: ', $e->getMessage(), PHP_EOL;
34}
35

公开登出 Internal Link

响应

返回:APIEmptyResponse

示例

logoutPublic 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 http 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13
14
15try {
16 $result = $apiInstance->logoutPublic();
17 print_r($result);
18} catch (Exception $e) {
19 echo 'Exception when calling PublicApi->logoutPublic: ', $e->getMessage(), PHP_EOL;
20}
21

公开阻止评论 Internal Link


参数

名称类型位置必填描述
tenantIdstringquery是
commentIdstringpath是
ssostringquery否

响应

返回:BlockSuccess

示例

blockFromCommentPublic 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$comment_id = 'comment_id_example'; // string
15$public_block_from_comment_params = new \FastComments\Client\Model\PublicBlockFromCommentParams(); // \FastComments\Client\Model\PublicBlockFromCommentParams
16$sso = 'sso_example'; // string
17
18
19try {
20 $result = $apiInstance->blockFromCommentPublic($tenant_id, $comment_id, $public_block_from_comment_params, $sso);
21 print_r($result);
22} catch (Exception $e) {
23 echo 'Exception when calling PublicApi->blockFromCommentPublic: ', $e->getMessage(), PHP_EOL;
24}
25

公开解除阻止评论 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
commentIdstringpathYes
ssostringqueryNo

响应

返回:UnblockSuccess

示例

unBlockCommentPublic 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$comment_id = 'comment_id_example'; // string
15$public_block_from_comment_params = new \FastComments\Client\Model\PublicBlockFromCommentParams(); // \FastComments\Client\Model\PublicBlockFromCommentParams
16$sso = 'sso_example'; // string
17
18
19try {
20 $result = $apiInstance->unBlockCommentPublic($tenant_id, $comment_id, $public_block_from_comment_params, $sso);
21 print_r($result);
22} catch (Exception $e) {
23 echo 'Exception when calling PublicApi->unBlockCommentPublic: ', $e->getMessage(), PHP_EOL;
24}
25

已检查阻止的评论 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
commentIdsstringquery是逗号分隔的评论 ID 列表。
ssostringquery否

响应

返回:CheckBlockedCommentsResponse

示例

checkedCommentsForBlocked 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$comment_ids = 'comment_ids_example'; // string | 逗号分隔的评论 ID 列表。
15$sso = 'sso_example'; // string
16
17
18try {
19 $result = $apiInstance->checkedCommentsForBlocked($tenant_id, $comment_ids, $sso);
20 print_r($result);
21} catch (Exception $e) {
22 echo 'Exception when calling PublicApi->checkedCommentsForBlocked: ', $e->getMessage(), PHP_EOL;
23}
24

阻止用户评论 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
idstringpathYes
userIdstringqueryNo
anonUserIdstringqueryNo

响应

返回: BlockSuccess

示例

blockUserFromComment 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如有需要,取消注释以下行以设置 API 密钥前缀(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这一步是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$id = 'id_example'; // string
21$block_from_comment_params = new \FastComments\Client\Model\BlockFromCommentParams(); // \FastComments\Client\Model\BlockFromCommentParams
22$options = [
23 'user_id' => 'user_id_example', // string
24 'anon_user_id' => 'anon_user_id_example', // string
25];
26
27
28try {
29 $result = $apiInstance->blockUserFromComment($tenant_id, $id, $block_from_comment_params, $options);
30 print_r($result);
31} catch (Exception $e) {
32 echo 'Exception when calling DefaultApi->blockUserFromComment: ', $e->getMessage(), PHP_EOL;
33}
34

公开创建评论 Internal Link

参数

名称类型位置必填描述
tenantIdstringpathYes
urlIdstringqueryYes
broadcastIdstringqueryYes
sessionIdstringqueryNo
ssostringqueryNo

响应

返回:SaveCommentsResponseWithPresence

示例

createCommentPublic 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$url_id = 'url_id_example'; // string
15$broadcast_id = 'broadcast_id_example'; // string
16$comment_data = new \FastComments\Client\Model\CommentData(); // \FastComments\Client\Model\CommentData
17$options = [
18 'session_id' => 'session_id_example', // string
19 'sso' => 'sso_example', // string
20];
21
22
23try {
24 $result = $apiInstance->createCommentPublic($tenant_id, $url_id, $broadcast_id, $comment_data, $options);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling PublicApi->createCommentPublic: ', $e->getMessage(), PHP_EOL;
28}
29

删除评论 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
idstringpathYes
contextUserIdstringqueryNo
isLivebooleanqueryNo

响应

返回:DeleteCommentResult

示例

deleteComment 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如有需要,取消注释以下行来为 API 密钥设置前缀(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$id = 'id_example'; // string
21$options = [
22 'context_user_id' => 'context_user_id_example', // string
23 'is_live' => True, // bool
24];
25
26
27try {
28 $result = $apiInstance->deleteComment($tenant_id, $id, $options);
29 print_r($result);
30} catch (Exception $e) {
31 echo 'Exception when calling DefaultApi->deleteComment: ', $e->getMessage(), PHP_EOL;
32}
33

公开删除评论 Internal Link

参数

名称类型位置必填描述
tenantIdstringpath是
commentIdstringpath是
broadcastIdstringquery是
editKeystringquery否
ssostringquery否

响应

返回: PublicAPIDeleteCommentResponse

示例

deleteCommentPublic 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // 字符串
14$comment_id = 'comment_id_example'; // 字符串
15$broadcast_id = 'broadcast_id_example'; // 字符串
16$options = [
17 'edit_key' => 'edit_key_example', // 字符串
18 'sso' => 'sso_example', // 字符串
19];
20
21
22try {
23 $result = $apiInstance->deleteCommentPublic($tenant_id, $comment_id, $broadcast_id, $options);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling PublicApi->deleteCommentPublic: ', $e->getMessage(), PHP_EOL;
27}
28

删除评论投票 Internal Link

参数

NameTypeLocationRequiredDescription
tenantIdstringpathYes
commentIdstringpathYes
voteIdstringpathYes
urlIdstringqueryYes
broadcastIdstringqueryYes
editKeystringqueryNo
ssostringqueryNo

响应

Returns: VoteDeleteResponse

示例

deleteCommentVote 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$comment_id = 'comment_id_example'; // string
15$vote_id = 'vote_id_example'; // string
16$url_id = 'url_id_example'; // string
17$broadcast_id = 'broadcast_id_example'; // string
18$options = [
19 'edit_key' => 'edit_key_example', // string
20 'sso' => 'sso_example', // string
21];
22
23
24try {
25 $result = $apiInstance->deleteCommentVote($tenant_id, $comment_id, $vote_id, $url_id, $broadcast_id, $options);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling PublicApi->deleteCommentVote: ', $e->getMessage(), PHP_EOL;
29}
30

标记评论 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
idstringpath是
userIdstringquery否
anonUserIdstringquery否

响应

返回:FlagCommentResponse

示例

flagComment 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下内容以为 API 密钥设置前缀(例如 Bearer),如有需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // 字符串
20$id = 'id_example'; // 字符串
21$options = [
22 'user_id' => 'user_id_example', // 字符串
23 'anon_user_id' => 'anon_user_id_example', // 字符串
24];
25
26
27try {
28 $result = $apiInstance->flagComment($tenant_id, $id, $options);
29 print_r($result);
30} catch (Exception $e) {
31 echo 'Exception when calling DefaultApi->flagComment: ', $e->getMessage(), PHP_EOL;
32}
33

获取评论 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是
idstringpath是

响应

返回: APIGetCommentResponse

示例

getComment 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 配置 API 密钥授权: api_key
8$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
9// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
10// 取消注释下面以设置前缀(例如 Bearer)用于 API 密钥,如有需要
11// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
12
13
14$apiInstance = new FastComments\Client\Api\DefaultApi(
15 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
16 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
17 // This is optional, `GuzzleHttp\Client` will be used as default.
18 // 这是可选的,默认使用 `GuzzleHttp\Client`。
19 new GuzzleHttp\Client(),
20 $config
21);
22
23$tenant_id = 'tenant_id_example'; // string
24$id = 'id_example'; // string
25
26
27try {
28 $result = $apiInstance->getComment($tenant_id, $id);
29 print_r($result);
30} catch (Exception $e) {
31 echo 'Exception when calling DefaultApi->getComment: ', $e->getMessage(), PHP_EOL;
32}
33

获取评论列表 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
pageintegerqueryNo
limitintegerqueryNo
skipintegerqueryNo
asTreebooleanqueryNo
skipChildrenintegerqueryNo
limitChildrenintegerqueryNo
maxTreeDepthintegerqueryNo
urlIdstringqueryNo
userIdstringqueryNo
anonUserIdstringqueryNo
contextUserIdstringqueryNo
hashTagstringqueryNo
parentIdstringqueryNo
directionstringqueryNo
fromDateintegerqueryNo
toDateintegerqueryNo

响应

返回:APIGetCommentsResponse

示例

getComments 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如有需要,取消注释以下代码以设置 API 密钥前缀(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$options = [
21 'page' => 56, // int
22 'limit' => 56, // int
23 'skip' => 56, // int
24 'as_tree' => True, // bool
25 'skip_children' => 56, // int
26 'limit_children' => 56, // int
27 'max_tree_depth' => 56, // int
28 'url_id' => 'url_id_example', // string
29 'user_id' => 'user_id_example', // string
30 'anon_user_id' => 'anon_user_id_example', // string
31 'context_user_id' => 'context_user_id_example', // string
32 'hash_tag' => 'hash_tag_example', // string
33 'parent_id' => 'parent_id_example', // string
34 'direction' => new \FastComments\Client\Model\\FastComments\Client\Model\SortDirections(), // \FastComments\Client\Model\SortDirections
35 'from_date' => 56, // int
36 'to_date' => 56, // int
37];
38
39
40try {
41 $result = $apiInstance->getComments($tenant_id, $options);
42 print_r($result);
43} catch (Exception $e) {
44 echo 'Exception when calling DefaultApi->getComments: ', $e->getMessage(), PHP_EOL;
45}
46

公开获取评论 Internal Link

req tenantId urlId

参数

名称类型位置必填描述
tenantIdstringpath是
urlIdstringquery是
pageintegerquery否
directionstringquery否
ssostringquery否
skipintegerquery否
skipChildrenintegerquery否
limitintegerquery否
limitChildrenintegerquery否
countChildrenbooleanquery否
fetchPageForCommentIdstringquery否
includeConfigbooleanquery否
countAllbooleanquery否
includei10nbooleanquery否
localestringquery否
modulesstringquery否
isCrawlerbooleanquery否
includeNotificationCountbooleanquery否
asTreebooleanquery否
maxTreeDepthintegerquery否
useFullTranslationIdsbooleanquery否
parentIdstringquery否
searchTextstringquery否
hashTagsarrayquery否
userIdstringquery否
customConfigStrstringquery否
afterCommentIdstringquery否
beforeCommentIdstringquery否

响应

返回: GetCommentsResponseWithPresencePublicComment

示例

getCommentsPublic 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$url_id = 'url_id_example'; // string
15$options = [
16 'page' => 56, // int
17 'direction' => new \FastComments\Client\Model\\FastComments\Client\Model\SortDirections(), // \FastComments\Client\Model\SortDirections
18 'sso' => 'sso_example', // string
19 'skip' => 56, // int
20 'skip_children' => 56, // int
21 'limit' => 56, // int
22 'limit_children' => 56, // int
23 'count_children' => True, // bool
24 'fetch_page_for_comment_id' => 'fetch_page_for_comment_id_example', // string
25 'include_config' => True, // bool
26 'count_all' => True, // bool
27 'includei10n' => True, // bool
28 'locale' => 'locale_example', // string
29 'modules' => 'modules_example', // string
30 'is_crawler' => True, // bool
31 'include_notification_count' => True, // bool
32 'as_tree' => True, // bool
33 'max_tree_depth' => 56, // int
34 'use_full_translation_ids' => True, // bool
35 'parent_id' => 'parent_id_example', // string
36 'search_text' => 'search_text_example', // string
37 'hash_tags' => array('hash_tags_example'), // string[]
38 'user_id' => 'user_id_example', // string
39 'custom_config_str' => 'custom_config_str_example', // string
40 'after_comment_id' => 'after_comment_id_example', // string
41 'before_comment_id' => 'before_comment_id_example', // string
42];
43
44
45try {
46 $result = $apiInstance->getCommentsPublic($tenant_id, $url_id, $options);
47 print_r($result);
48} catch (Exception $e) {
49 echo 'Exception when calling PublicApi->getCommentsPublic: ', $e->getMessage(), PHP_EOL;
50}
51

获取评论文本 Internal Link

参数

名称类型位置必填描述
tenantIdstringpath是
commentIdstringpath是
editKeystringquery否
ssostringquery否

响应

返回:PublicAPIGetCommentTextResponse

示例

getCommentText 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$comment_id = 'comment_id_example'; // string
15$options = [
16 'edit_key' => 'edit_key_example', // string
17 'sso' => 'sso_example', // string
18];
19
20
21try {
22 $result = $apiInstance->getCommentText($tenant_id, $comment_id, $options);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling PublicApi->getCommentText: ', $e->getMessage(), PHP_EOL;
26}
27

获取评论投票用户名 Internal Link

参数

名称类型位置必需描述
tenantIdstringpath是
commentIdstringpath是
dirintegerquery是
ssostringquery否

响应

返回: GetCommentVoteUserNamesSuccessResponse

示例

获取评论投票用户名 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // 字符串
14$comment_id = 'comment_id_example'; // 字符串
15$dir = 56; // 整数
16$sso = 'sso_example'; // 字符串
17
18
19try {
20 $result = $apiInstance->getCommentVoteUserNames($tenant_id, $comment_id, $dir, $sso);
21 print_r($result);
22} catch (Exception $e) {
23 echo 'Exception when calling PublicApi->getCommentVoteUserNames: ', $e->getMessage(), PHP_EOL;
24}
25

锁定评论 Internal Link

参数

名称类型位置必需描述
tenantIdstringpathYes
commentIdstringpathYes
broadcastIdstringqueryYes
ssostringqueryNo

响应

返回:APIEmptyResponse

示例

lockComment 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 http 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$comment_id = 'comment_id_example'; // string
15$broadcast_id = 'broadcast_id_example'; // string
16$sso = 'sso_example'; // string
17
18
19try {
20 $result = $apiInstance->lockComment($tenant_id, $comment_id, $broadcast_id, $sso);
21 print_r($result);
22} catch (Exception $e) {
23 echo 'Exception when calling PublicApi->lockComment: ', $e->getMessage(), PHP_EOL;
24}
25

置顶评论 Internal Link

参数

名称类型位置必填描述
tenantIdstringpath是
commentIdstringpath是
broadcastIdstringquery是
ssostringquery否

响应

返回:ChangeCommentPinStatusResponse

示例

pinComment 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义的 HTTP 客户端,传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认会使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$comment_id = 'comment_id_example'; // string
15$broadcast_id = 'broadcast_id_example'; // string
16$sso = 'sso_example'; // string
17
18
19try {
20 $result = $apiInstance->pinComment($tenant_id, $comment_id, $broadcast_id, $sso);
21 print_r($result);
22} catch (Exception $e) {
23 echo 'Exception when calling PublicApi->pinComment: ', $e->getMessage(), PHP_EOL;
24}
25

保存评论 Internal Link

参数

名称类型位置必需描述
tenantIdstringqueryYes
isLivebooleanqueryNo
doSpamCheckbooleanqueryNo
sendEmailsbooleanqueryNo
populateNotificationsbooleanqueryNo

响应

返回:APISaveCommentResponse

示例

saveComment 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5// 配置 API 密钥授权: api_key
6$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
7// 取消注释以下内容以设置 API 密钥前缀(例如 Bearer),如果需要的话
8// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
9
10
11$apiInstance = new FastComments\Client\Api\DefaultApi(
12 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
13 // 这是可选的,默认使用 `GuzzleHttp\Client`。
14 new GuzzleHttp\Client(),
15 $config
16);
17
18$tenant_id = 'tenant_id_example'; // string
19$create_comment_params = new \FastComments\Client\Model\CreateCommentParams(); // \FastComments\Client\Model\CreateCommentParams
20$options = [
21 'is_live' => True, // bool
22 'do_spam_check' => True, // bool
23 'send_emails' => True, // bool
24 'populate_notifications' => True, // bool
25];
26
27
28try {
29 $result = $apiInstance->saveComment($tenant_id, $create_comment_params, $options);
30 print_r($result);
31} catch (Exception $e) {
32 echo 'Exception when calling DefaultApi->saveComment: ', $e->getMessage(), PHP_EOL;
33}
34

批量保存评论 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
isLivebooleanqueryNo
doSpamCheckbooleanqueryNo
sendEmailsbooleanqueryNo
populateNotificationsbooleanqueryNo

响应

返回: SaveCommentsBulkResponse

示例

saveCommentsBulk 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5// Configure API key authorization: api_key
6$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
7// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
8// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
9
10$apiInstance = new FastComments\Client\Api\DefaultApi(
11 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
12 // This is optional, `GuzzleHttp\Client` will be used as default.
13 new GuzzleHttp\Client(),
14 $config
15);
16
17$tenant_id = 'tenant_id_example'; // string
18$create_comment_params = array(new \FastComments\Client\Model\CreateCommentParams()); // \FastComments\Client\Model\CreateCommentParams[]
19$options = [
20 'is_live' => True, // bool
21 'do_spam_check' => True, // bool
22 'send_emails' => True, // bool
23 'populate_notifications' => True, // bool
24];
25
26try {
27 $result = $apiInstance->saveCommentsBulk($tenant_id, $create_comment_params, $options);
28 print_r($result);
29} catch (Exception $e) {
30 echo 'Exception when calling DefaultApi->saveCommentsBulk: ', $e->getMessage(), PHP_EOL;
31}
32

设置评论文本 Internal Link

参数

名称类型位置必需描述
tenantIdstringpath是
commentIdstringpath是
broadcastIdstringquery是
editKeystringquery否
ssostringquery否

响应

返回:PublicAPISetCommentTextResponse

示例

setCommentText 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // 字符串
14$comment_id = 'comment_id_example'; // 字符串
15$broadcast_id = 'broadcast_id_example'; // 字符串
16$comment_text_update_request = new \FastComments\Client\Model\CommentTextUpdateRequest(); // \FastComments\Client\Model\CommentTextUpdateRequest
17$options = [
18 'edit_key' => 'edit_key_example', // 字符串
19 'sso' => 'sso_example', // 字符串
20];
21
22
23try {
24 $result = $apiInstance->setCommentText($tenant_id, $comment_id, $broadcast_id, $comment_text_update_request, $options);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling PublicApi->setCommentText: ', $e->getMessage(), PHP_EOL;
28}
29

解除用户评论阻止 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
idstringpathYes
userIdstringqueryNo
anonUserIdstringqueryNo

响应

返回:UnblockSuccess

示例

unBlockUserFromComment 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下代码以设置 API 密钥的前缀(例如 Bearer),如果需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$id = 'id_example'; // string
21$un_block_from_comment_params = new \FastComments\Client\Model\UnBlockFromCommentParams(); // \FastComments\Client\Model\UnBlockFromCommentParams
22$options = [
23 'user_id' => 'user_id_example', // string
24 'anon_user_id' => 'anon_user_id_example', // string
25];
26
27
28try {
29 $result = $apiInstance->unBlockUserFromComment($tenant_id, $id, $un_block_from_comment_params, $options);
30 print_r($result);
31} catch (Exception $e) {
32 echo 'Exception when calling DefaultApi->unBlockUserFromComment: ', $e->getMessage(), PHP_EOL;
33}
34

取消标记评论 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
idstringpathYes
userIdstringqueryNo
anonUserIdstringqueryNo

响应

返回: FlagCommentResponse

示例

unFlagComment 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如有需要,取消注释以下行以设置 API 密钥前缀(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // 字符串
20$id = 'id_example'; // 字符串
21$options = [
22 'user_id' => 'user_id_example', // 字符串
23 'anon_user_id' => 'anon_user_id_example', // 字符串
24];
25
26
27try {
28 $result = $apiInstance->unFlagComment($tenant_id, $id, $options);
29 print_r($result);
30} catch (Exception $e) {
31 echo 'Exception when calling DefaultApi->unFlagComment: ', $e->getMessage(), PHP_EOL;
32}
33

解锁评论 Internal Link

参数

名称类型位置必填描述
tenantIdstringpathYes
commentIdstringpathYes
broadcastIdstringqueryYes
ssostringqueryNo

响应

返回:APIEmptyResponse

示例

unLockComment 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果你想使用自定义 HTTP 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // 字符串
14$comment_id = 'comment_id_example'; // 字符串
15$broadcast_id = 'broadcast_id_example'; // 字符串
16$sso = 'sso_example'; // 字符串
17
18
19try {
20 $result = $apiInstance->unLockComment($tenant_id, $comment_id, $broadcast_id, $sso);
21 print_r($result);
22} catch (Exception $e) {
23 echo 'Exception when calling PublicApi->unLockComment: ', $e->getMessage(), PHP_EOL;
24}
25

取消置顶评论 Internal Link

参数

名称类型位置必填描述
tenantIdstringpathYes
commentIdstringpathYes
broadcastIdstringqueryYes
ssostringqueryNo

响应

返回:ChangeCommentPinStatusResponse

示例

unPinComment 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义的 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$comment_id = 'comment_id_example'; // string
15$broadcast_id = 'broadcast_id_example'; // string
16$sso = 'sso_example'; // string
17
18
19try {
20 $result = $apiInstance->unPinComment($tenant_id, $comment_id, $broadcast_id, $sso);
21 print_r($result);
22} catch (Exception $e) {
23 echo 'Exception when calling PublicApi->unPinComment: ', $e->getMessage(), PHP_EOL;
24}
25

更新评论 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
idstringpath是
contextUserIdstringquery否
doSpamCheckbooleanquery否
isLivebooleanquery否

响应

返回: APIEmptyResponse

示例

updateComment 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 配置 API 密钥授权:api_key
8$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
9// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
10// 取消注释下面以为 API 密钥设置前缀(例如 Bearer),如有需要
11// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
12
13
14$apiInstance = new FastComments\Client\Api\DefaultApi(
15 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
16 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
17 // This is optional, `GuzzleHttp\Client` will be used as default.
18 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
19 new GuzzleHttp\Client(),
20 $config
21);
22
23$tenant_id = 'tenant_id_example'; // string
24$id = 'id_example'; // string
25$updatable_comment_params = new \FastComments\Client\Model\UpdatableCommentParams(); // \FastComments\Client\Model\UpdatableCommentParams
26$options = [
27 'context_user_id' => 'context_user_id_example', // string
28 'do_spam_check' => True, // bool
29 'is_live' => True, // bool
30];
31
32
33try {
34 $result = $apiInstance->updateComment($tenant_id, $id, $updatable_comment_params, $options);
35 print_r($result);
36} catch (Exception $e) {
37 echo 'Exception when calling DefaultApi->updateComment: ', $e->getMessage(), PHP_EOL;
38}
39

评论投票 Internal Link

参数

名称类型位置必需描述
tenantIdstringpath是
commentIdstringpath是
urlIdstringquery是
broadcastIdstringquery是
sessionIdstringquery否
ssostringquery否

响应

返回: VoteResponse

示例

voteComment 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 http 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认会使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$comment_id = 'comment_id_example'; // string
15$url_id = 'url_id_example'; // string
16$broadcast_id = 'broadcast_id_example'; // string
17$vote_body_params = new \FastComments\Client\Model\VoteBodyParams(); // \FastComments\Client\Model\VoteBodyParams
18$options = [
19 'session_id' => 'session_id_example', // string
20 'sso' => 'sso_example', // string
21];
22
23
24try {
25 $result = $apiInstance->voteComment($tenant_id, $comment_id, $url_id, $broadcast_id, $vote_body_params, $options);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling PublicApi->voteComment: ', $e->getMessage(), PHP_EOL;
29}
30

获取用户评论 Internal Link

参数

名称类型位置必填描述
userIdstringqueryNo
directionstringqueryNo
repliesToUserIdstringqueryNo
pagenumberqueryNo
includei10nbooleanqueryNo
localestringqueryNo
isCrawlerbooleanqueryNo

响应

返回:GetCommentsForUserResponse

示例

获取用户评论 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$options = [
14 'user_id' => 'user_id_example', // 字符串
15 'direction' => new \FastComments\Client\Model\\FastComments\Client\Model\SortDirections(), // \FastComments\Client\Model\SortDirections
16 'replies_to_user_id' => 'replies_to_user_id_example', // 字符串
17 'page' => 3.4, // 浮点数
18 'includei10n' => True, // 布尔值
19 'locale' => 'locale_example', // 字符串
20 'is_crawler' => True, // 布尔值
21];
22
23
24try {
25 $result = $apiInstance->getCommentsForUser($options);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling PublicApi->getCommentsForUser: ', $e->getMessage(), PHP_EOL;
29}
30

添加域配置 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是

响应

返回: AddDomainConfigResponse

示例

addDomainConfig 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5// 配置 API 密钥授权:api_key
6$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
7// 取消注释以下行以设置 API 密钥的前缀(例如 Bearer),如果需要
8// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
9
10
11$apiInstance = new FastComments\Client\Api\DefaultApi(
12 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
13 // 这是可选的,默认使用 `GuzzleHttp\Client`。
14 new GuzzleHttp\Client(),
15 $config
16);
17
18$tenant_id = 'tenant_id_example'; // string
19$add_domain_config_params = new \FastComments\Client\Model\AddDomainConfigParams(); // \FastComments\Client\Model\AddDomainConfigParams
20
21
22try {
23 $result = $apiInstance->addDomainConfig($tenant_id, $add_domain_config_params);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling DefaultApi->addDomainConfig: ', $e->getMessage(), PHP_EOL;
27}
28

删除域配置 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
domainstringpathYes

响应

返回:DeleteDomainConfigResponse

示例

deleteDomainConfig 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
14 // This is optional, `GuzzleHttp\Client` will be used as default.
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$domain = 'domain_example'; // string
21
22
23try {
24 $result = $apiInstance->deleteDomainConfig($tenant_id, $domain);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->deleteDomainConfig: ', $e->getMessage(), PHP_EOL;
28}
29

获取域配置 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
domainstringpathYes

响应

返回:GetDomainConfigResponse

示例

getDomainConfig 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 配置 API 密钥授权: api_key
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// 如有需要,取消下面的注释以设置前缀(例如 Bearer)用于 API 密钥
10// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
11
12
13$apiInstance = new FastComments\Client\Api\DefaultApi(
14 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
15 // 如果你想使用自定义 HTTP 客户端,传入实现 `GuzzleHttp\ClientInterface` 的客户端。
16 // This is optional, `GuzzleHttp\Client` will be used as default.
17 // 这是可选的,默认使用 `GuzzleHttp\Client`。
18 new GuzzleHttp\Client(),
19 $config
20);
21
22$tenant_id = 'tenant_id_example'; // string
23$domain = 'domain_example'; // string
24
25
26try {
27 $result = $apiInstance->getDomainConfig($tenant_id, $domain);
28 print_r($result);
29} catch (Exception $e) {
30 echo 'Exception when calling DefaultApi->getDomainConfig: ', $e->getMessage(), PHP_EOL;
31}
32

获取域配置列表 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是

响应

返回: GetDomainConfigsResponse

示例

getDomainConfigs 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下行以设置前缀(例如 Bearer)用于 API 密钥,如有需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果想使用自定义 HTTP 客户端,传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20
21
22try {
23 $result = $apiInstance->getDomainConfigs($tenant_id);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling DefaultApi->getDomainConfigs: ', $e->getMessage(), PHP_EOL;
27}
28

修补域配置 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
domainToUpdatestringpathYes

响应

返回: PatchDomainConfigResponse

示例

patchDomainConfig 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5// 配置 API 密钥授权: api_key
6$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
7// 如有需要,取消注释以下代码以设置前缀(例如 Bearer)用于 API 密钥
8// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
9
10
11$apiInstance = new FastComments\Client\Api\DefaultApi(
12 // 如果要使用自定义 HTTP 客户端,传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
13 // 这是可选的,默认使用 `GuzzleHttp\Client`。
14 new GuzzleHttp\Client(),
15 $config
16);
17
18$tenant_id = 'tenant_id_example'; // string
19$domain_to_update = 'domain_to_update_example'; // string
20$patch_domain_config_params = new \FastComments\Client\Model\PatchDomainConfigParams(); // \FastComments\Client\Model\PatchDomainConfigParams
21
22
23try {
24 $result = $apiInstance->patchDomainConfig($tenant_id, $domain_to_update, $patch_domain_config_params);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->patchDomainConfig: ', $e->getMessage(), PHP_EOL;
28}
29

放置域配置 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是
domainToUpdatestringpath是

响应

返回: PutDomainConfigResponse

示例

putDomainConfig 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下代码以设置前缀(例如 Bearer)用于 API 密钥(如有需要)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果你想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$domain_to_update = 'domain_to_update_example'; // string
21$update_domain_config_params = new \FastComments\Client\Model\UpdateDomainConfigParams(); // \FastComments\Client\Model\UpdateDomainConfigParams
22
23
24try {
25 $result = $apiInstance->putDomainConfig($tenant_id, $domain_to_update, $update_domain_config_params);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling DefaultApi->putDomainConfig: ', $e->getMessage(), PHP_EOL;
29}
30

创建邮件模板 Internal Link

参数

NameTypeLocationRequiredDescription
tenantIdstringqueryYes

响应

Returns: CreateEmailTemplateResponse

示例

createEmailTemplate 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 配置 API 密钥授权: api_key
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// 取消注释以下内容以设置前缀(例如 Bearer)用于 API 密钥,如有需要
10// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
11
12
13$apiInstance = new FastComments\Client\Api\DefaultApi(
14 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
15 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
16 // This is optional, `GuzzleHttp\Client` will be used as default.
17 // 这是一项可选设置,默认使用 `GuzzleHttp\Client`。
18 new GuzzleHttp\Client(),
19 $config
20);
21
22$tenant_id = 'tenant_id_example'; // string
23$create_email_template_body = new \FastComments\Client\Model\CreateEmailTemplateBody(); // \FastComments\Client\Model\CreateEmailTemplateBody
24
25
26try {
27 $result = $apiInstance->createEmailTemplate($tenant_id, $create_email_template_body);
28 print_r($result);
29} catch (Exception $e) {
30 echo 'Exception when calling DefaultApi->createEmailTemplate: ', $e->getMessage(), PHP_EOL;
31}
32

删除邮件模板 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
idstringpathYes

响应

返回:APIEmptyResponse

示例

deleteEmailTemplate 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下内容以为 API 密钥设置前缀(例如 Bearer),如有需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,`GuzzleHttp\Client` 将作为默认使用。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // 字符串
20$id = 'id_example'; // 字符串
21
22
23try {
24 $result = $apiInstance->deleteEmailTemplate($tenant_id, $id);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->deleteEmailTemplate: ', $e->getMessage(), PHP_EOL;
28}
29

删除邮件模板渲染错误 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
idstringpathYes
errorIdstringpathYes

响应

返回:APIEmptyResponse

示例

deleteEmailTemplateRenderError 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 配置 API 密钥授权:api_key
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// 取消注释以下行以为 API 密钥设置前缀(例如 Bearer),如果需要的话
10// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
11
12
13$apiInstance = new FastComments\Client\Api\DefaultApi(
14 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
15 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
16 // This is optional, `GuzzleHttp\Client` will be used as default.
17 // 这是可选的,默认使用 `GuzzleHttp\Client`。
18 new GuzzleHttp\Client(),
19 $config
20);
21
22$tenant_id = 'tenant_id_example'; // string
23$id = 'id_example'; // string
24$error_id = 'error_id_example'; // string
25
26
27try {
28 $result = $apiInstance->deleteEmailTemplateRenderError($tenant_id, $id, $error_id);
29 print_r($result);
30} catch (Exception $e) {
31 echo 'Exception when calling DefaultApi->deleteEmailTemplateRenderError: ', $e->getMessage(), PHP_EOL;
32}
33

获取邮件模板 Internal Link

参数

名称类型位置必需描述
tenantIdstringqueryYes
idstringpathYes

响应

返回: GetEmailTemplateResponse

示例

getEmailTemplate 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如有需要,取消注释以下行以设置 API 密钥前缀(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$id = 'id_example'; // string
21
22
23try {
24 $result = $apiInstance->getEmailTemplate($tenant_id, $id);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->getEmailTemplate: ', $e->getMessage(), PHP_EOL;
28}
29

获取邮件模板定义 Internal Link

参数

名称类型位置必需描述
tenantIdstringqueryYes

响应

返回:GetEmailTemplateDefinitionsResponse

示例

getEmailTemplateDefinitions 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 配置 API 密钥授权:api_key
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// 如有需要,取消注释以下代码以设置 API 密钥的前缀(例如 Bearer)
10
11$apiInstance = new FastComments\Client\Api\DefaultApi(
12 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // This is optional, `GuzzleHttp\Client` will be used as default.
15 // 这是可选的,默认使用 `GuzzleHttp\Client`。
16 new GuzzleHttp\Client(),
17 $config
18);
19
20$tenant_id = 'tenant_id_example'; // string
21// 字符串
22
23
24try {
25 $result = $apiInstance->getEmailTemplateDefinitions($tenant_id);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling DefaultApi->getEmailTemplateDefinitions: ', $e->getMessage(), PHP_EOL;
29}
30

获取邮件模板渲染错误 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
idstringpathYes
skipnumberqueryNo

响应

返回:GetEmailTemplateRenderErrorsResponse

示例

getEmailTemplateRenderErrors 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如有需要,取消注释以下代码以设置 API 密钥前缀(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$id = 'id_example'; // string
21$skip = 3.4; // float
22
23
24try {
25 $result = $apiInstance->getEmailTemplateRenderErrors($tenant_id, $id, $skip);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling DefaultApi->getEmailTemplateRenderErrors: ', $e->getMessage(), PHP_EOL;
29}
30

获取邮件模板列表 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是
skipnumberquery否

响应

返回:GetEmailTemplatesResponse

示例

获取邮件模板 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 配置 API 密钥授权: api_key
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// 取消注释以下代码以为 API 密钥设置前缀(例如 Bearer),如果需要的话
10$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
11// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
12
13
14$apiInstance = new FastComments\Client\Api\DefaultApi(
15 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
16 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
17 // This is optional, `GuzzleHttp\Client` will be used as default.
18 // 这是可选的,默认使用 `GuzzleHttp\Client`。
19 new GuzzleHttp\Client(),
20 $config
21);
22
23$tenant_id = 'tenant_id_example'; // string
24// 字符串
25$skip = 3.4; // float
26// 浮点数
27
28
29try {
30 $result = $apiInstance->getEmailTemplates($tenant_id, $skip);
31 print_r($result);
32} catch (Exception $e) {
33 echo 'Exception when calling DefaultApi->getEmailTemplates: ', $e->getMessage(), PHP_EOL;
34}
35

渲染邮件模板 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
localestringqueryNo

响应

Returns: RenderEmailTemplateResponse

示例

renderEmailTemplate 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 配置 API 密钥授权: api_key
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// 取消注释以下内容以为 API 密钥设置前缀(例如 Bearer),如有需要
10// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
11
12
13$apiInstance = new FastComments\Client\Api\DefaultApi(
14 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
15 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
16 // This is optional, `GuzzleHttp\Client` will be used as default.
17 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
18 new GuzzleHttp\Client(),
19 $config
20);
21
22$tenant_id = 'tenant_id_example'; // string
23$render_email_template_body = new \FastComments\Client\Model\RenderEmailTemplateBody(); // \FastComments\Client\Model\RenderEmailTemplateBody
24$locale = 'locale_example'; // string
25
26
27try {
28 $result = $apiInstance->renderEmailTemplate($tenant_id, $render_email_template_body, $locale);
29 print_r($result);
30} catch (Exception $e) {
31 echo 'Exception when calling DefaultApi->renderEmailTemplate: ', $e->getMessage(), PHP_EOL;
32}
33

更新邮件模板 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
idstringpath是

响应

返回:APIEmptyResponse

示例

updateEmailTemplate 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 配置 API 密钥授权: api_key
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// 如有需要,取消下行的注释以设置前缀(例如 Bearer)用于 API 密钥
10// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
11
12
13$apiInstance = new FastComments\Client\Api\DefaultApi(
14 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
15 // 如果您想使用自定义的 HTTP 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
16 // This is optional, `GuzzleHttp\Client` will be used as default.
17 // 这不是必需的,默认将使用 `GuzzleHttp\Client`。
18 new GuzzleHttp\Client(),
19 $config
20);
21
22$tenant_id = 'tenant_id_example'; // 字符串
23$id = 'id_example'; // 字符串
24$update_email_template_body = new \FastComments\Client\Model\UpdateEmailTemplateBody(); // \FastComments\Client\Model\UpdateEmailTemplateBody
25
26
27try {
28 $result = $apiInstance->updateEmailTemplate($tenant_id, $id, $update_email_template_body);
29 print_r($result);
30} catch (Exception $e) {
31 echo 'Exception when calling DefaultApi->updateEmailTemplate: ', $e->getMessage(), PHP_EOL;
32}
33

获取事件日志 Internal Link

req tenantId urlId userIdWS

参数

名称类型位置必填描述
tenantIdstringpath是
urlIdstringquery是
userIdWSstringquery是
startTimeintegerquery是
endTimeintegerquery否

响应

返回:GetEventLogResponse

示例

getEventLog 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果想使用自定义 HTTP 客户端,传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$url_id = 'url_id_example'; // string
15$user_id_ws = 'user_id_ws_example'; // string
16$start_time = 56; // int
17$end_time = 56; // int
18
19
20try {
21 $result = $apiInstance->getEventLog($tenant_id, $url_id, $user_id_ws, $start_time, $end_time);
22 print_r($result);
23} catch (Exception $e) {
24 echo 'Exception when calling PublicApi->getEventLog: ', $e->getMessage(), PHP_EOL;
25}
26

获取全局事件日志 Internal Link

req tenantId urlId userIdWS

参数

名称类型位置必填描述
tenantIdstringpath是
urlIdstringquery是
userIdWSstringquery是
startTimeintegerquery是
endTimeintegerquery否

响应

返回:GetEventLogResponse

示例

getGlobalEventLog 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$url_id = 'url_id_example'; // string
15$user_id_ws = 'user_id_ws_example'; // string
16$start_time = 56; // int
17$end_time = 56; // int
18
19
20try {
21 $result = $apiInstance->getGlobalEventLog($tenant_id, $url_id, $user_id_ws, $start_time, $end_time);
22 print_r($result);
23} catch (Exception $e) {
24 echo 'Exception when calling PublicApi->getGlobalEventLog: ', $e->getMessage(), PHP_EOL;
25}
26

创建动态帖子 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
broadcastIdstringquery否
isLivebooleanquery否
doSpamCheckbooleanquery否
skipDupCheckbooleanquery否

响应

返回:CreateFeedPostResponse

示例

createFeedPost 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如有需要,取消注释以下内容以设置 API 密钥的前缀(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$create_feed_post_params = new \FastComments\Client\Model\CreateFeedPostParams(); // \FastComments\Client\Model\CreateFeedPostParams
21$options = [
22 'broadcast_id' => 'broadcast_id_example', // string
23 'is_live' => True, // bool
24 'do_spam_check' => True, // bool
25 'skip_dup_check' => True, // bool
26];
27
28
29try {
30 $result = $apiInstance->createFeedPost($tenant_id, $create_feed_post_params, $options);
31 print_r($result);
32} catch (Exception $e) {
33 echo 'Exception when calling DefaultApi->createFeedPost: ', $e->getMessage(), PHP_EOL;
34}
35

公开创建动态帖子 Internal Link

参数

名称类型位置必填描述
tenantIdstringpathYes
broadcastIdstringqueryNo
ssostringqueryNo

响应

返回:CreateFeedPostResponse

示例

createFeedPostPublic 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认会使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // 字符串
14$create_feed_post_params = new \FastComments\Client\Model\CreateFeedPostParams(); // \FastComments\Client\Model\CreateFeedPostParams
15$options = [
16 'broadcast_id' => 'broadcast_id_example', // 字符串
17 'sso' => 'sso_example', // 字符串
18];
19
20
21try {
22 $result = $apiInstance->createFeedPostPublic($tenant_id, $create_feed_post_params, $options);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling PublicApi->createFeedPostPublic: ', $e->getMessage(), PHP_EOL;
26}
27

公开删除动态帖子 Internal Link

参数

名称类型位置必填描述
tenantIdstringpath是
postIdstringpath是
broadcastIdstringquery否
ssostringquery否

响应

返回: DeleteFeedPostPublicResponse

示例

deleteFeedPostPublic 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 http 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$post_id = 'post_id_example'; // string
15$options = [
16 'broadcast_id' => 'broadcast_id_example', // string
17 'sso' => 'sso_example', // string
18];
19
20
21try {
22 $result = $apiInstance->deleteFeedPostPublic($tenant_id, $post_id, $options);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling PublicApi->deleteFeedPostPublic: ', $e->getMessage(), PHP_EOL;
26}
27

获取动态帖子 Internal Link

req tenantId afterId

参数

名称类型位置必需描述
tenantIdstringqueryYes
afterIdstringqueryNo
limitintegerqueryNo
tagsarrayqueryNo

响应

返回: GetFeedPostsResponse

示例

getFeedPosts 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如有需要,取消注释以下内容以设置 API 密钥的前缀(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$options = [
21 'after_id' => 'after_id_example', // string
22 'limit' => 56, // int
23 'tags' => array('tags_example'), // string[]
24];
25
26
27try {
28 $result = $apiInstance->getFeedPosts($tenant_id, $options);
29 print_r($result);
30} catch (Exception $e) {
31 echo 'Exception when calling DefaultApi->getFeedPosts: ', $e->getMessage(), PHP_EOL;
32}
33

公开获取动态帖子 Internal Link

req tenantId afterId

参数

名称类型位置必填描述
tenantIdstringpath是
afterIdstringquery否
limitintegerquery否
tagsarrayquery否
ssostringquery否
isCrawlerbooleanquery否
includeUserInfobooleanquery否

响应

Returns: PublicFeedPostsResponse

示例

getFeedPostsPublic 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // 字符串
14$options = [
15 'after_id' => 'after_id_example', // 字符串
16 'limit' => 56, // 整数
17 'tags' => array('tags_example'), // 字符串[]
18 'sso' => 'sso_example', // 字符串
19 'is_crawler' => True, // 布尔
20 'include_user_info' => True, // 布尔
21];
22
23
24try {
25 $result = $apiInstance->getFeedPostsPublic($tenant_id, $options);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling PublicApi->getFeedPostsPublic: ', $e->getMessage(), PHP_EOL;
29}
30

获取动态帖子统计 Internal Link

参数

名称类型位置必填描述
tenantIdstringpathYes
postIdsarrayqueryYes
ssostringqueryNo

响应

返回:FeedPostsStatsResponse

示例

getFeedPostsStats 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认会使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$post_ids = array('post_ids_example'); // string[]
15$sso = 'sso_example'; // string
16
17
18try {
19 $result = $apiInstance->getFeedPostsStats($tenant_id, $post_ids, $sso);
20 print_r($result);
21} catch (Exception $e) {
22 echo 'Exception when calling PublicApi->getFeedPostsStats: ', $e->getMessage(), PHP_EOL;
23}
24

公开获取用户反应 Internal Link

参数

名称类型位置必填描述
tenantIdstringpath是
postIdsarrayquery否
ssostringquery否

响应

返回:UserReactsResponse

示例

getUserReactsPublic 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$options = [
15 'post_ids' => array('post_ids_example'), // string[]
16 'sso' => 'sso_example', // string
17];
18
19
20try {
21 $result = $apiInstance->getUserReactsPublic($tenant_id, $options);
22 print_r($result);
23} catch (Exception $e) {
24 echo 'Exception when calling PublicApi->getUserReactsPublic: ', $e->getMessage(), PHP_EOL;
25}
26

公开对动态帖子反应 Internal Link

参数

名称类型位置必需描述
tenantIdstringpath是
postIdstringpath是
isUndobooleanquery否
broadcastIdstringquery否
ssostringquery否

响应

返回: ReactFeedPostResponse

示例

reactFeedPostPublic 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 http 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$post_id = 'post_id_example'; // string
15$react_body_params = new \FastComments\Client\Model\ReactBodyParams(); // \FastComments\Client\Model\ReactBodyParams
16$options = [
17 'is_undo' => True, // bool
18 'broadcast_id' => 'broadcast_id_example', // string
19 'sso' => 'sso_example', // string
20];
21
22
23try {
24 $result = $apiInstance->reactFeedPostPublic($tenant_id, $post_id, $react_body_params, $options);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling PublicApi->reactFeedPostPublic: ', $e->getMessage(), PHP_EOL;
28}
29

更新动态帖子 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
idstringpath是

响应

返回: APIEmptyResponse

示例

updateFeedPost 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下代码以设置前缀(例如 Bearer)用于 API 密钥,如有需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // 字符串
20$id = 'id_example'; // 字符串
21$feed_post = new \FastComments\Client\Model\FeedPost(); // \FastComments\Client\Model\FeedPost
22
23
24try {
25 $result = $apiInstance->updateFeedPost($tenant_id, $id, $feed_post);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling DefaultApi->updateFeedPost: ', $e->getMessage(), PHP_EOL;
29}
30

公开更新动态帖子 Internal Link

参数

名称类型位置必填描述
tenantIdstringpathYes
postIdstringpathYes
broadcastIdstringqueryNo
ssostringqueryNo

响应

返回: CreateFeedPostResponse

示例

updateFeedPostPublic 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$post_id = 'post_id_example'; // string
15$update_feed_post_params = new \FastComments\Client\Model\UpdateFeedPostParams(); // \FastComments\Client\Model\UpdateFeedPostParams
16$options = [
17 'broadcast_id' => 'broadcast_id_example', // string
18 'sso' => 'sso_example', // string
19];
20
21
22try {
23 $result = $apiInstance->updateFeedPostPublic($tenant_id, $post_id, $update_feed_post_params, $options);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling PublicApi->updateFeedPostPublic: ', $e->getMessage(), PHP_EOL;
27}
28

公开标记评论 Internal Link

参数

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
commentIdstringpathYes
isFlaggedbooleanqueryYes
ssostringqueryNo

响应

返回:APIEmptyResponse

示例

flagCommentPublic 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // 字符串
14$comment_id = 'comment_id_example'; // 字符串
15$is_flagged = True; // 布尔值
16$sso = 'sso_example'; // 字符串
17
18
19try {
20 $result = $apiInstance->flagCommentPublic($tenant_id, $comment_id, $is_flagged, $sso);
21 print_r($result);
22} catch (Exception $e) {
23 echo 'Exception when calling PublicApi->flagCommentPublic: ', $e->getMessage(), PHP_EOL;
24}
25

获取大尺寸 GIF Internal Link

参数

名称类型位置必填描述
tenantIdstring路径是
largeInternalURLSanitizedstring查询是

响应

返回: GifGetLargeResponse

示例

getGifLarge 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // 字符串
14$large_internal_url_sanitized = 'large_internal_url_sanitized_example'; // 字符串
15
16
17try {
18 $result = $apiInstance->getGifLarge($tenant_id, $large_internal_url_sanitized);
19 print_r($result);
20} catch (Exception $e) {
21 echo 'Exception when calling PublicApi->getGifLarge: ', $e->getMessage(), PHP_EOL;
22}
23

搜索 GIF Internal Link

参数

名称类型位置必填描述
tenantIdstringpathYes
searchstringqueryYes
localestringqueryNo
ratingstringqueryNo
pagenumberqueryNo

响应

返回:GetGifsSearchResponse

示例

getGifsSearch 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7// $apiInstance = new FastComments\Client\Api\PublicApi(
8// // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9// // 这不是必需的,默认会使用 `GuzzleHttp\Client`。
10// new GuzzleHttp\Client()
11// );
12
13$tenant_id = 'tenant_id_example'; // string
14$search = 'search_example'; // string
15$options = [
16 'locale' => 'locale_example', // string
17 'rating' => 'rating_example', // string
18 'page' => 3.4, // float
19];
20
21
22try {
23 $result = $apiInstance->getGifsSearch($tenant_id, $search, $options);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling PublicApi->getGifsSearch: ', $e->getMessage(), PHP_EOL;
27}
28

获取热门 GIF Internal Link

参数

名称类型位置必需描述
tenantIdstringpathYes
localestringqueryNo
ratingstringqueryNo
pagenumberqueryNo

响应

返回: GetGifsTrendingResponse

示例

getGifsTrending 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$options = [
15 'locale' => 'locale_example', // string
16 'rating' => 'rating_example', // string
17 'page' => 3.4, // float
18];
19
20
21try {
22 $result = $apiInstance->getGifsTrending($tenant_id, $options);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling PublicApi->getGifsTrending: ', $e->getMessage(), PHP_EOL;
26}
27

添加标签 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是

响应

返回:CreateHashTagResponse

示例

addHashTag 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如有需要,取消注释以下代码为 API 密钥设置前缀(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // 字符串
20$create_hash_tag_body = new \FastComments\Client\Model\CreateHashTagBody(); // \FastComments\Client\Model\CreateHashTagBody
21
22
23try {
24 $result = $apiInstance->addHashTag($tenant_id, $create_hash_tag_body);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->addHashTag: ', $e->getMessage(), PHP_EOL;
28}
29

批量添加标签 Internal Link

参数

名称类型位置必需描述
tenantIdstringqueryYes

响应

返回:BulkCreateHashTagsResponse

示例

addHashTagsBulk 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
14 // This is optional, `GuzzleHttp\Client` will be used as default.
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$bulk_create_hash_tags_body = new \FastComments\Client\Model\BulkCreateHashTagsBody(); // \FastComments\Client\Model\BulkCreateHashTagsBody
21
22
23try {
24 $result = $apiInstance->addHashTagsBulk($tenant_id, $bulk_create_hash_tags_body);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->addHashTagsBulk: ', $e->getMessage(), PHP_EOL;
28}
29

删除标签 Internal Link

参数

名称类型位置必需描述
tenantIdstringqueryYes
tagstringpathYes

响应

返回:APIEmptyResponse

示例

deleteHashTag 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如有需要,取消注释以下代码以设置 API 密钥的前缀(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // 字符串
20$tag = 'tag_example'; // 字符串
21$delete_hash_tag_request_body = new \FastComments\Client\Model\DeleteHashTagRequestBody(); // \FastComments\Client\Model\DeleteHashTagRequestBody
22
23
24try {
25 $result = $apiInstance->deleteHashTag($tenant_id, $tag, $delete_hash_tag_request_body);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling DefaultApi->deleteHashTag: ', $e->getMessage(), PHP_EOL;
29}
30

获取标签 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
pagenumberqueryNo

响应

返回: GetHashTagsResponse

示例

getHashTags 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下代码以设置 API 密钥的前缀(例如 Bearer),如有需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$page = 3.4; // float
21
22
23try {
24 $result = $apiInstance->getHashTags($tenant_id, $page);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->getHashTags: ', $e->getMessage(), PHP_EOL;
28}
29

修补标签 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是
tagstringpath是

响应

返回: UpdateHashTagResponse

示例

patchHashTag 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下行以设置前缀(例如 Bearer)用于 API 密钥,如有需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果想使用自定义 HTTP 客户端,传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$tag = 'tag_example'; // string
21$update_hash_tag_body = new \FastComments\Client\Model\UpdateHashTagBody(); // \FastComments\Client\Model\UpdateHashTagBody
22
23
24try {
25 $result = $apiInstance->patchHashTag($tenant_id, $tag, $update_hash_tag_body);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling DefaultApi->patchHashTag: ', $e->getMessage(), PHP_EOL;
29}
30

删除审核投票 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是
commentIdstringpath是
voteIdstringpath是
broadcastIdstringquery否
ssostringquery否

响应

返回: VoteDeleteResponse

示例

deleteModerationVote 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // 字符串
14$comment_id = 'comment_id_example'; // 字符串
15$vote_id = 'vote_id_example'; // 字符串
16$options = [
17 'broadcast_id' => 'broadcast_id_example', // 字符串
18 'sso' => 'sso_example', // 字符串
19];
20
21
22try {
23 $result = $apiInstance->deleteModerationVote($tenant_id, $comment_id, $vote_id, $options);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling ModerationApi->deleteModerationVote: ', $e->getMessage(), PHP_EOL;
27}
28

获取 API 评论 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
pagenumberqueryNo
countnumberqueryNo
text-searchstringqueryNo
byIPFromCommentstringqueryNo
filtersstringqueryNo
searchFiltersstringqueryNo
sortsstringqueryNo
demobooleanqueryNo
ssostringqueryNo

响应

返回:ModerationAPIGetCommentsResponse

示例

getApiComments 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这一步是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$options = [
15 'page' => 3.4, // float
16 'count' => 3.4, // float
17 'text_search' => 'text_search_example', // string
18 'by_ip_from_comment' => 'by_ip_from_comment_example', // string
19 'filters' => 'filters_example', // string
20 'search_filters' => 'search_filters_example', // string
21 'sorts' => 'sorts_example', // string
22 'demo' => True, // bool
23 'sso' => 'sso_example', // string
24];
25
26
27try {
28 $result = $apiInstance->getApiComments($tenant_id, $options);
29 print_r($result);
30} catch (Exception $e) {
31 echo 'Exception when calling ModerationApi->getApiComments: ', $e->getMessage(), PHP_EOL;
32}
33

获取 API 导出状态 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是
batchJobIdstringquery否
ssostringquery否

响应

返回:ModerationExportStatusResponse

示例

getApiExportStatus 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // 字符串
14$options = [
15 'batch_job_id' => 'batch_job_id_example', // 字符串
16 'sso' => 'sso_example', // 字符串
17];
18
19
20try {
21 $result = $apiInstance->getApiExportStatus($tenant_id, $options);
22 print_r($result);
23} catch (Exception $e) {
24 echo 'Exception when calling ModerationApi->getApiExportStatus: ', $e->getMessage(), PHP_EOL;
25}
26

获取 API ID Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
text-searchstringqueryNo
byIPFromCommentstringqueryNo
filtersstringqueryNo
searchFiltersstringqueryNo
afterIdstringqueryNo
demobooleanqueryNo
ssostringqueryNo

响应

返回: ModerationAPIGetCommentIdsResponse

示例

getApiIds 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$options = [
15 'text_search' => 'text_search_example', // string
16 'by_ip_from_comment' => 'by_ip_from_comment_example', // string
17 'filters' => 'filters_example', // string
18 'search_filters' => 'search_filters_example', // string
19 'after_id' => 'after_id_example', // string
20 'demo' => True, // bool
21 'sso' => 'sso_example', // string
22];
23
24
25try {
26 $result = $apiInstance->getApiIds($tenant_id, $options);
27 print_r($result);
28} catch (Exception $e) {
29 echo 'Exception when calling ModerationApi->getApiIds: ', $e->getMessage(), PHP_EOL;
30}
31

获取因评论被封禁的用户 Internal Link

参数

名称类型位置必需描述
tenantIdstringqueryYes
commentIdstringpathYes
ssostringqueryNo

响应

Returns: GetBannedUsersFromCommentResponse

示例

getBanUsersFromComment 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果想使用自定义的 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认会使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$comment_id = 'comment_id_example'; // string
15$sso = 'sso_example'; // string
16
17
18try {
19 $result = $apiInstance->getBanUsersFromComment($tenant_id, $comment_id, $sso);
20 print_r($result);
21} catch (Exception $e) {
22 echo 'Exception when calling ModerationApi->getBanUsersFromComment: ', $e->getMessage(), PHP_EOL;
23}
24

获取评论封禁状态 Internal Link

参数

名称类型位置必需描述
tenantIdstringqueryYes
commentIdstringpathYes
ssostringqueryNo

响应

返回:GetCommentBanStatusResponse

示例

getCommentBanStatus 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$comment_id = 'comment_id_example'; // string
15$sso = 'sso_example'; // string
16
17
18try {
19 $result = $apiInstance->getCommentBanStatus($tenant_id, $comment_id, $sss);
20 print_r($result);
21} catch (Exception $e) {
22 echo 'Exception when calling ModerationApi->getCommentBanStatus: ', $e->getMessage(), PHP_EOL;
23}
24

获取评论子项 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
commentIdstringpathYes
ssostringqueryNo

响应

返回: ModerationAPIChildCommentsResponse

示例

getCommentChildren 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 http 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // 字符串
14$comment_id = 'comment_id_example'; // 字符串
15$sso = 'sso_example'; // 字符串
16
17
18try {
19 $result = $apiInstance->getCommentChildren($tenant_id, $comment_id, $sso);
20 print_r($result);
21} catch (Exception $e) {
22 echo 'Exception when calling ModerationApi->getCommentChildren: ', $e->getMessage(), PHP_EOL;
23}
24

获取计数 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
text-searchstringqueryNo
byIPFromCommentstringqueryNo
filterstringqueryNo
searchFiltersstringqueryNo
demobooleanqueryNo
ssostringqueryNo

响应

返回:ModerationAPICountCommentsResponse

示例

getCount 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // 字符串
14$options = [
15 'text_search' => 'text_search_example', // 字符串
16 'by_ip_from_comment' => 'by_ip_from_comment_example', // 字符串
17 'filter' => 'filter_example', // 字符串
18 'search_filters' => 'search_filters_example', // 字符串
19 'demo' => True, // 布尔
20 'sso' => 'sso_example', // 字符串
21];
22
23
24try {
25 $result = $apiInstance->getCount($tenant_id, $options);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling ModerationApi->getCount: ', $e->getMessage(), PHP_EOL;
29}
30

获取计数列表 Internal Link

参数

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
ssostringqueryNo

响应

Returns: GetBannedUsersCountResponse

示例

getCounts 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这不是必需的,默认将使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$sso = 'sso_example'; // string
15
16
17try {
18 $result = $apiInstance->getCounts($tenant_id, $sso);
19 print_r($result);
20} catch (Exception $e) {
21 echo 'Exception when calling ModerationApi->getCounts: ', $e->getMessage(), PHP_EOL;
22}
23

获取日志 Internal Link

参数

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
commentIdstringpathYes
ssostringqueryNo

响应

返回: ModerationAPIGetLogsResponse

示例

getLogs 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // 字符串
14$comment_id = 'comment_id_example'; // 字符串
15$sso = 'sso_example'; // 字符串
16
17
18try {
19 $result = $apiInstance->getLogs($tenant_id, $comment_id, $sso);
20 print_r($result);
21} catch (Exception $e) {
22 echo 'Exception when calling ModerationApi->getLogs: ', $e->getMessage(), PHP_EOL;
23}
24

获取手动徽章 Internal Link

参数

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
ssostringqueryNo

响应

返回:GetTenantManualBadgesResponse

示例

getManualBadges 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 http 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是一项可选项,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$sso = 'sso_example'; // string
15
16
17try {
18 $result = $apiInstance->getManualBadges($tenant_id, $sso);
19 print_r($result);
20} catch (Exception $e) {
21 echo 'Exception when calling ModerationApi->getManualBadges: ', $e->getMessage(), PHP_EOL;
22}
23

获取用户手动徽章 Internal Link

参数

名称类型位置必需描述
tenantIdstringqueryYes
badgesUserIdstringqueryNo
commentIdstringqueryNo
ssostringqueryNo

响应

返回:GetUserManualBadgesResponse

示例

getManualBadgesForUser 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$options = [
15 'badges_user_id' => 'badges_user_id_example', // string
16 'comment_id' => 'comment_id_example', // string
17 'sso' => 'sso_example', // string
18];
19
20
21try {
22 $result = $apiInstance->getManualBadgesForUser($tenant_id, $options);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling ModerationApi->getManualBadgesForUser: ', $e->getMessage(), PHP_EOL;
26}
27

获取审核评论 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是
commentIdstringpath是
includeEmailbooleanquery否
includeIPbooleanquery否
sSOstringquery否

响应

返回:ModerationAPICommentResponse

示例

getModerationComment 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认会使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$comment_id = 'comment_id_example'; // string
15$options = [
16 'include_email' => True, // bool
17 'include_ip' => True, // bool
18 'sso' => 'sso_example', // string
19];
20
21
22try {
23 $result = $apiInstance->getModerationComment($tenant_id, $comment_id, $options);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling ModerationApi->getModerationComment: ', $e->getMessage(), PHP_EOL;
27}
28

获取审核评论文本 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是
commentIdstringpath是
ssostringquery否

响应

返回: GetCommentTextResponse

示例

getModerationCommentText 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$comment_id = 'comment_id_example'; // string
15$sso = 'sso_example'; // string
16
17
18try {
19 $result = $apiInstance->getModerationCommentText($tenant_id, $comment_id, $sso);
20 print_r($result);
21} catch (Exception $e) {
22 echo 'Exception when calling ModerationApi->getModerationCommentText: ', $e->getMessage(), PHP_EOL;
23}
24

获取预封禁摘要 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
commentIdstringpath是
includeByUserIdAndEmailbooleanquery否
includeByIPbooleanquery否
includeByEmailDomainbooleanquery否
ssostringquery否

响应

返回: PreBanSummary

示例

getPreBanSummary 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$comment_id = 'comment_id_example'; // string
15$options = [
16 'include_by_user_id_and_email' => True, // bool
17 'include_by_ip' => True, // bool
18 'include_by_email_domain' => True, // bool
19 'sso' => 'sso_example', // string
20];
21
22
23try {
24 $result = $apiInstance->getPreBanSummary($tenant_id, $comment_id, $options);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling ModerationApi->getPreBanSummary: ', $e->getMessage(), PHP_EOL;
28}
29

获取搜索评论摘要 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
valuestringqueryNo
filtersstringqueryNo
searchFiltersstringqueryNo
ssostringqueryNo

响应

返回:ModerationCommentSearchResponse

示例

getSearchCommentsSummary 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这不是必需的,默认将使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$options = [
15 'value' => 'value_example', // string
16 'filters' => 'filters_example', // string
17 'search_filters' => 'search_filters_example', // string
18 'sso' => 'sso_example', // string
19];
20
21
22try {
23 $result = $apiInstance->getSearchCommentsSummary($tenant_id, $options);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling ModerationApi->getSearchCommentsSummary: ', $e->getMessage(), PHP_EOL;
27}
28

获取搜索页面 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
valuestringqueryNo
ssostringqueryNo

响应

返回: ModerationPageSearchResponse

示例

getSearchPages 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // 字符串
14$options = [
15 'value' => 'value_example', // 字符串
16 'sso' => 'sso_example', // 字符串
17];
18
19
20try {
21 $result = $apiInstance->getSearchPages($tenant_id, $options);
22 print_r($result);
23} catch (Exception $e) {
24 echo 'Exception when calling ModerationApi->getSearchPages: ', $e->getMessage(), PHP_EOL;
25}
26

获取搜索站点 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
valuestringquery否
ssostringquery否

响应

返回: ModerationSiteSearchResponse

示例

getSearchSites 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$options = [
15 'value' => 'value_example', // string
16 'sso' => 'sso_example', // string
17];
18
19
20try {
21 $result = $apiInstance->getSearchSites($tenant_id, $options);
22 print_r($result);
23} catch (Exception $e) {
24 echo 'Exception when calling ModerationApi->getSearchSites: ', $e->getMessage(), PHP_EOL;
25}
26

获取搜索建议 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
text-searchstringqueryNo
ssostringqueryNo

响应

返回: ModerationSuggestResponse

示例

getSearchSuggest 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$options = [
15 'text_search' => 'text_search_example', // string
16 'sso' => 'sso_example', // string
17];
18
19
20try {
21 $result = $apiInstance->getSearchSuggest($tenant_id, $options);
22 print_r($result);
23} catch (Exception $e) {
24 echo 'Exception when calling ModerationApi->getSearchSuggest: ', $e->getMessage(), PHP_EOL;
25}
26

获取搜索用户 Internal Link

参数

名称类型位置必需描述
tenantIdstringqueryYes
valuestringqueryNo
ssostringqueryNo

响应

返回: ModerationUserSearchResponse

示例

getSearchUsers 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认会使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$options = [
15 'value' => 'value_example', // string
16 'sso' => 'sso_example', // string
17];
18
19
20try {
21 $result = $apiInstance->getSearchUsers($tenant_id, $options);
22 print_r($result);
23} catch (Exception $e) {
24 echo 'Exception when calling ModerationApi->getSearchUsers: ', $e->getMessage(), PHP_EOL;
25}
26

获取信任因子 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
userIdstringqueryNo
ssostringqueryNo

响应

返回:GetUserTrustFactorResponse

示例

getTrustFactor 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // 字符串
14$options = [
15 'user_id' => 'user_id_example', // 字符串
16 'sso' => 'sso_example', // 字符串
17];
18
19
20try {
21 $result = $apiInstance->getTrustFactor($tenant_id, $options);
22 print_r($result);
23} catch (Exception $e) {
24 echo 'Exception when calling ModerationApi->getTrustFactor: ', $e->getMessage(), PHP_EOL;
25}
26

获取用户封禁偏好 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
ssostringqueryNo

响应

返回:APIModerateGetUserBanPreferencesResponse

示例

getUserBanPreference 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,传入实现了 `GuzzleHttp\ClientInterface` 的客户端实例。
9 // 这是可选的,默认会使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$sso = 'sso_example'; // string
15
16
17try {
18 $result = $apiInstance->getUserBanPreference($tenant_id, $sso);
19 print_r($result);
20} catch (Exception $e) {
21 echo 'Exception when calling ModerationApi->getUserBanPreference: ', $e->getMessage(), PHP_EOL;
22}
23

获取用户内部资料 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
commentIdstringqueryNo
ssostringqueryNo

响应

返回: GetUserInternalProfileResponse

示例

getUserInternalProfile 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$options = [
15 'comment_id' => 'comment_id_example', // string
16 'sso' => 'sso_example', // string
17];
18
19
20try {
21 $result = $apiInstance->getUserInternalProfile($tenant_id, $options);
22 print_r($result);
23} catch (Exception $e) {
24 echo 'Exception when calling ModerationApi->getUserInternalProfile: ', $e->getMessage(), PHP_EOL;
25}
26

调整评论投票 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
commentIdstringpath是
broadcastIdstringquery否
ssostringquery否

响应

返回: AdjustVotesResponse

示例

postAdjustCommentVotes 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 http 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$comment_id = 'comment_id_example'; // string
15$adjust_comment_votes_params = new \FastComments\Client\Model\AdjustCommentVotesParams(); // \FastComments\Client\Model\AdjustCommentVotesParams
16$options = [
17 'broadcast_id' => 'broadcast_id_example', // string
18 'sso' => 'sso_example', // string
19];
20
21
22try {
23 $result = $apiInstance->postAdjustCommentVotes($tenant_id, $comment_id, $adjust_comment_votes_params, $options);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling ModerationApi->postAdjustCommentVotes: ', $e->getMessage(), PHP_EOL;
27}
28

API 导出 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
text-searchstringquery否
byIPFromCommentstringquery否
filtersstringquery否
searchFiltersstringquery否
sortsstringquery否
ssostringquery否

响应

返回:ModerationExportResponse

示例

postApiExport 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$options = [
15 'text_search' => 'text_search_example', // string
16 'by_ip_from_comment' => 'by_ip_from_comment_example', // string
17 'filters' => 'filters_example', // string
18 'search_filters' => 'search_filters_example', // string
19 'sorts' => 'sorts_example', // string
20 'sso' => 'sso_example', // string
21];
22
23
24try {
25 $result = $apiInstance->postApiExport($tenant_id, $options);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling ModerationApi->postApiExport: ', $e->getMessage(), PHP_EOL;
29}
30

封禁用户评论 Internal Link

参数

名称类型位置必填描述
tenantIdstring查询是
commentIdstring路径是
banEmailboolean查询否
banEmailDomainboolean查询否
banIPboolean查询否
deleteAllUsersCommentsboolean查询否
bannedUntilstring查询否
isShadowBanboolean查询否
updateIdstring查询否
banReasonstring查询否
ssostring查询否

响应

返回:BanUserFromCommentResult

示例

postBanUserFromComment 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这不是必需的,默认将使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$comment_id = 'comment_id_example'; // string
15$options = [
16 'ban_email' => True, // bool
17 'ban_email_domain' => True, // bool
18 'ban_ip' => True, // bool
19 'delete_all_users_comments' => True, // bool
20 'banned_until' => 'banned_until_example', // string
21 'is_shadow_ban' => True, // bool
22 'update_id' => 'update_id_example', // string
23 'ban_reason' => 'ban_reason_example', // string
24 'sso' => 'sso_example', // string
25];
26
27
28try {
29 $result = $apiInstance->postBanUserFromComment($tenant_id, $comment_id, $options);
30 print_r($result);
31} catch (Exception $e) {
32 echo 'Exception when calling ModerationApi->postBanUserFromComment: ', $e->getMessage(), PHP_EOL;
33}
34

撤销封禁用户 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
ssostringquery否

响应

返回:APIEmptyResponse

示例

postBanUserUndo 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // 字符串
14$ban_user_undo_params = new \FastComments\Client\Model\BanUserUndoParams(); // \FastComments\Client\Model\BanUserUndoParams
15$sso = 'sso_example'; // 字符串
16
17
18try {
19 $result = $apiInstance->postBanUserUndo($tenant_id, $ban_user_undo_params, $sso);
20 print_r($result);
21} catch (Exception $e) {
22 echo 'Exception when calling ModerationApi->postBanUserUndo: ', $e->getMessage(), PHP_EOL;
23}
24

批量预封禁摘要 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
includeByUserIdAndEmailbooleanquery否
includeByIPbooleanquery否
includeByEmailDomainbooleanquery否
ssostringquery否

响应

返回:BulkPreBanSummary

示例

postBulkPreBanSummary 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 http 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,`GuzzleHttp\Client` 将作为默认使用。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$bulk_pre_ban_params = new \FastComments\Client\Model\BulkPreBanParams(); // \FastComments\Client\Model\BulkPreBanParams
15$options = [
16 'include_by_user_id_and_email' => True, // bool
17 'include_by_ip' => True, // bool
18 'include_by_email_domain' => True, // bool
19 'sso' => 'sso_example', // string
20];
21
22
23try {
24 $result = $apiInstance->postBulkPreBanSummary($tenant_id, $bulk_pre_ban_params, $options);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling ModerationApi->postBulkPreBanSummary: ', $e->getMessage(), PHP_EOL;
28}
29

按 ID 获取评论 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
ssostringqueryNo

响应

返回: ModerationAPIChildCommentsResponse

示例

postCommentsByIds 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 http 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这不是必需的,默认将使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$comments_by_ids_params = new \FastComments\Client\Model\CommentsByIdsParams(); // \FastComments\Client\Model\CommentsByIdsParams
15$sso = 'sso_example'; // string
16
17
18try {
19 $result = $apiInstance->postCommentsByIds($tenant_id, $comments_by_ids_params, $sso);
20 print_r($result);
21} catch (Exception $e) {
22 echo 'Exception when calling ModerationApi->postCommentsByIds: ', $e->getMessage(), PHP_EOL;
23}
24

标记评论 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是
commentIdstringpath是
broadcastIdstringquery否
ssostringquery否

响应

返回: APIEmptyResponse

示例

postFlagComment 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认会使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$comment_id = 'comment_id_example'; // string
15$options = [
16 'broadcast_id' => 'broadcast_id_example', // string
17 'sso' => 'sso_example', // string
18];
19
20
21try {
22 $result = $apiInstance->postFlagComment($tenant_id, $comment_id, $options);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling ModerationApi->postFlagComment: ', $e->getMessage(), PHP_EOL;
26}
27

移除评论 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
commentIdstringpath是
broadcastIdstringquery否
ssostringquery否

响应

返回: PostRemoveCommentApiResponse

示例

postRemoveComment 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$comment_id = 'comment_id_example'; // string
15$options = [
16 'broadcast_id' => 'broadcast_id_example', // string
17 'sso' => 'sso_example', // string
18];
19
20
21try {
22 $result = $apiInstance->postRemoveComment($tenant_id, $comment_id, $options);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling ModerationApi->postRemoveComment: ', $e->getMessage(), PHP_EOL;
26}
27

恢复已删除评论 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是
commentIdstringpath是
broadcastIdstringquery否
ssostringquery否

响应

返回:APIEmptyResponse

示例

postRestoreDeletedComment 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认会使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string (字符串)
14$comment_id = 'comment_id_example'; // string (字符串)
15$options = [
16 'broadcast_id' => 'broadcast_id_example', // string (字符串)
17 'sso' => 'sso_example', // string (字符串)
18];
19
20
21try {
22 $result = $apiInstance->postRestoreDeletedComment($tenant_id, $comment_id, $options);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling ModerationApi->postRestoreDeletedComment: ', $e->getMessage(), PHP_EOL;
26}
27

设置评论批准状态 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是
commentIdstringpath是
approvedbooleanquery否
broadcastIdstringquery否
ssostringquery否

响应

返回:SetCommentApprovedResponse

示例

postSetCommentApprovalStatus 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$comment_id = 'comment_id_example'; // string
15$options = [
16 'approved' => True, // bool
17 'broadcast_id' => 'broadcast_id_example', // string
18 'sso' => 'sso_example', // string
19];
20
21
22try {
23 $result = $apiInstance->postSetCommentApprovalStatus($tenant_id, $comment_id, $options);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling ModerationApi->postSetCommentApprovalStatus: ', $e->getMessage(), PHP_EOL;
27}
28

设置评论审查状态 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
commentIdstringpath是
reviewedbooleanquery否
broadcastIdstringquery否
ssostringquery否

响应

返回:APIEmptyResponse

示例

postSetCommentReviewStatus 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$comment_id = 'comment_id_example'; // string
15$options = [
16 'reviewed' => True, // bool
17 'broadcast_id' => 'broadcast_id_example', // string
18 'sso' => 'sso_example', // string
19];
20
21
22try {
23 $result = $apiInstance->postSetCommentReviewStatus($tenant_id, $comment_id, $options);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling ModerationApi->postSetCommentReviewStatus: ', $e->getMessage(), PHP_EOL;
27}
28

设置评论垃圾状态 Internal Link

参数

名称类型位置必需描述
tenantIdstringqueryYes
commentIdstringpathYes
spambooleanqueryNo
permNotSpambooleanqueryNo
broadcastIdstringqueryNo
ssostringqueryNo

响应

返回: APIEmptyResponse

示例

postSetCommentSpamStatus 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7// 创建 Moderation API 实例
8$apiInstance = new FastComments\Client\Api\ModerationApi(
9 // 如果想使用自定义的 HTTP 客户端,传入实现了 `GuzzleHttp\ClientInterface` 的客户端实例。
10 // 这是可选的,默认会使用 `GuzzleHttp\Client`。
11 new GuzzleHttp\Client()
12);
13
14$tenant_id = 'tenant_id_example'; // string
15$comment_id = 'comment_id_example'; // string
16$options = [
17 'spam' => True, // bool
18 'perm_not_spam' => True, // bool
19 'broadcast_id' => 'broadcast_id_example', // string
20 'sso' => 'sso_example', // string
21];
22
23
24try {
25 $result = $apiInstance->postSetCommentSpamStatus($tenant_id, $comment_id, $options);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling ModerationApi->postSetCommentSpamStatus: ', $e->getMessage(), PHP_EOL;
29}
30

设置评论文本 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
commentIdstringpathYes
broadcastIdstringqueryNo
ssostringqueryNo

响应

返回: SetCommentTextResponse

示例

postSetCommentText 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$comment_id = 'comment_id_example'; // string
15$set_comment_text_params = new \FastComments\Client\Model\SetCommentTextParams(); // \FastComments\Client\Model\SetCommentTextParams
16$options = [
17 'broadcast_id' => 'broadcast_id_example', // string
18 'sso' => 'sso_example', // string
19];
20
21
22try {
23 $result = $apiInstance->postSetCommentText($tenant_id, $comment_id, $set_comment_text_params, $options);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling ModerationApi->postSetCommentText: ', $e->getMessage(), PHP_EOL;
27}
28

取消标记评论 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
commentIdstringpathYes
broadcastIdstringqueryNo
ssostringqueryNo

响应

返回:APIEmptyResponse

示例

postUnFlagComment 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认会使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$comment_id = 'comment_id_example'; // string
15$options = [
16 'broadcast_id' => 'broadcast_id_example', // string
17 'sso' => 'sso_example', // string
18];
19
20
21try {
22 $result = $apiInstance->postUnFlagComment($tenant_id, $comment_id, $options);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling ModerationApi->postUnFlagComment: ', $e->getMessage(), PHP_EOL;
26}
27

投票 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
commentIdstringpath是
directionstringquery否
broadcastIdstringquery否
ssostringquery否

响应

返回: VoteResponse

示例

postVote 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果想使用自定义 HTTP 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认会使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$comment_id = 'comment_id_example'; // string
15$options = [
16 'direction' => 'direction_example', // string
17 'broadcast_id' => 'broadcast_id_example', // string
18 'sso' => 'sso_example', // string
19];
20
21
22try {
23 $result = $apiInstance->postVote($tenant_id, $comment_id, $options);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling ModerationApi->postVote: ', $e->getMessage(), PHP_EOL;
27}
28

授予徽章 Internal Link


参数

名称类型位置必填描述
tenantIdstringquery是
badgeIdstringquery是
userIdstringquery否
commentIdstringquery否
broadcastIdstringquery否
ssostringquery否

响应

返回:AwardUserBadgeResponse

示例

putAwardBadge 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // 字符串
14$badge_id = 'badge_id_example'; // 字符串
15$options = [
16 'user_id' => 'user_id_example', // 字符串
17 'comment_id' => 'comment_id_example', // 字符串
18 'broadcast_id' => 'broadcast_id_example', // 字符串
19 'sso' => 'sso_example', // 字符串
20];
21
22
23try {
24 $result = $apiInstance->putAwardBadge($tenant_id, $badge_id, $options);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling ModerationApi->putAwardBadge: ', $e->getMessage(), PHP_EOL;
28}
29

关闭线程 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
urlIdstringquery是
ssostringquery否

响应

返回:APIEmptyResponse

示例

putCloseThread 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果你想使用自定义的 http 客户端,传入实现了 `GuzzleHttp\ClientInterface` 的客户端实例。
9 // 这是可选的,默认会使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$url_id = 'url_id_example'; // string
15$sso = 'sso_example'; // string
16
17
18try {
19 $result = $apiInstance->putCloseThread($tenant_id, $url_id, $sso);
20 print_r($result);
21} catch (Exception $e) {
22 echo 'Exception when calling ModerationApi->putCloseThread: ', $e->getMessage(), PHP_EOL;
23}
24

移除徽章 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
badgeIdstringqueryYes
userIdstringqueryNo
commentIdstringqueryNo
broadcastIdstringqueryNo
ssostringqueryNo

响应

返回: RemoveUserBadgeResponse

示例

putRemoveBadge 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$badge_id = 'badge_id_example'; // string
15$options = [
16 'user_id' => 'user_id_example', // string
17 'comment_id' => 'comment_id_example', // string
18 'broadcast_id' => 'broadcast_id_example', // string
19 'sso' => 'sso_example', // string
20];
21
22
23try {
24 $result = $apiInstance->putRemoveBadge($tenant_id, $badge_id, $options);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling ModerationApi->putRemoveBadge: ', $e->getMessage(), PHP_EOL;
28}
29

重新打开线程 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
urlIdstringqueryYes
ssostringqueryNo

响应

Returns: APIEmptyResponse

示例

putReopenThread 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // 字符串
14$url_id = 'url_id_example'; // 字符串
15$sso = 'sso_example'; // 字符串
16
17
18try {
19 $result = $apiInstance->putReopenThread($tenant_id, $url_id, $sso);
20 print_r($result);
21} catch (Exception $e) {
22 echo 'Exception when calling ModerationApi->putReopenThread: ', $e->getMessage(), PHP_EOL;
23}
24

设置信任因子 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
userIdstringquery否
trustFactorstringquery否
ssostringquery否

响应

返回:SetUserTrustFactorResponse

示例

setTrustFactor 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // 字符串
14$options = [
15 'user_id' => 'user_id_example', // 字符串
16 'trust_factor' => 'trust_factor_example', // 字符串
17 'sso' => 'sso_example', // 字符串
18];
19
20
21try {
22 $result = $apiInstance->setTrustFactor($tenant_id, $options);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling ModerationApi->setTrustFactor: ', $e->getMessage(), PHP_EOL;
26}
27

创建版主 Internal Link

参数

名称类型位置必需描述
tenantIdstringqueryYes

响应

返回:CreateModeratorResponse

示例

createModerator 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 配置 API 密钥授权:api_key
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// 取消注释以下代码以设置 API 密钥的前缀(例如 Bearer),如果需要
10$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
11// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
12
13
14$apiInstance = new FastComments\Client\Api\DefaultApi(
15 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
16 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
17 // This is optional, `GuzzleHttp\Client` will be used as default.
18 // 这是可选的,默认使用 `GuzzleHttp\Client`。
19 new GuzzleHttp\Client(),
20 $config
21);
22
23$tenant_id = 'tenant_id_example'; // string
24$create_moderator_body = new \FastComments\Client\Model\CreateModeratorBody(); // \FastComments\Client\Model\CreateModeratorBody
25
26
27try {
28 $result = $apiInstance->createModerator($tenant_id, $create_moderator_body);
29 print_r($result);
30} catch (Exception $e) {
31 echo 'Exception when calling DefaultApi->createModerator: ', $e->getMessage(), PHP_EOL;
32}
33

删除版主 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是
idstringpath是
sendEmailstringquery否

响应

返回:APIEmptyResponse

示例

deleteModerator 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如有需要,取消注释以下代码以设置 API 密钥前缀(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$id = 'id_example'; // string
21$send_email = 'send_email_example'; // string
22
23
24try {
25 $result = $apiInstance->deleteModerator($tenant_id, $id, $send_email);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling DefaultApi->deleteModerator: ', $e->getMessage(), PHP_EOL;
29}
30

获取版主 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
idstringpath是

响应

返回:GetModeratorResponse

示例

getModerator 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5// 配置 API 密钥授权:api_key
6// 取消注释以下内容以设置 API 密钥前缀(例如 Bearer),如有需要
7// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
8
9
10$apiInstance = new FastComments\Client\Api\DefaultApi(
11 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
12 // 这是可选的,`GuzzleHttp\Client` 将作为默认使用。
13 new GuzzleHttp\Client(),
14 $config
15);
16
17$tenant_id = 'tenant_id_example'; // string
18$id = 'id_example'; // string
19
20
21try {
22 $result = $apiInstance->getModerator($tenant_id, $id);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling DefaultApi->getModerator: ', $e->getMessage(), PHP_EOL;
26}
27

获取版主列表 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是
skipnumberquery否

响应

返回:GetModeratorsResponse

示例

getModerators 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下代码以设置前缀(例如 Bearer)用于 API 密钥,如有需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果要使用自定义 HTTP 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // 字符串
20$skip = 3.4; // 浮点数
21
22
23try {
24 $result = $apiInstance->getModerators($tenant_id, $skip);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->getModerators: ', $e->getMessage(), PHP_EOL;
28}
29

发送邀请 Internal Link

参数

名称类型位置必需描述
tenantIdstringqueryYes
idstringpathYes
fromNamestringqueryYes

响应

返回: APIEmptyResponse

示例

sendInvite 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如有需要,取消注释以下代码以设置 API 密钥的前缀(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
14 // This is optional, `GuzzleHttp\Client` will be used as default.
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$id = 'id_example'; // string
21$from_name = 'from_name_example'; // string
22
23
24try {
25 $result = $apiInstance->sendInvite($tenant_id, $id, $from_name);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling DefaultApi->sendInvite: ', $e->getMessage(), PHP_EOL;
29}
30

更新版主 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是
idstringpath是

响应

返回: APIEmptyResponse

示例

updateModerator 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下行以在需要时为 API 密钥设置前缀(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是一项可选设置,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$id = 'id_example'; // string
21$update_moderator_body = new \FastComments\Client\Model\UpdateModeratorBody(); // \FastComments\Client\Model\UpdateModeratorBody
22
23
24try {
25 $result = $apiInstance->updateModerator($tenant_id, $id, $update_moderator_body);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling DefaultApi->updateModerator: ', $e->getMessage(), PHP_EOL;
29}
30

删除通知计数 Internal Link

参数

名称类型位置必需描述
tenantIdstringqueryYes
idstringpathYes

响应

返回: APIEmptyResponse

示例

deleteNotificationCount 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
8// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
9
10
11$apiInstance = new FastComments\Client\Api\DefaultApi(
12 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
13 // This is optional, `GuzzleHttp\Client` will be used as default.
14 new GuzzleHttp\Client(),
15 $config
16);
17
18$tenant_id = 'tenant_id_example'; // string
19$id = 'id_example'; // string
20
21
22try {
23 $result = $apiInstance->deleteNotificationCount($tenant_id, $id);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling DefaultApi->deleteNotificationCount: ', $e->getMessage(), PHP_EOL;
27}
28

获取缓存的通知计数 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
idstringpathYes

响应

返回: GetCachedNotificationCountResponse

示例

getCachedNotificationCount 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下内容以设置前缀(例如 Bearer)用于 API 密钥,如有需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,`GuzzleHttp\Client` 将作为默认使用。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$id = 'id_example'; // string
21
22
23try {
24 $result = $apiInstance->getCachedNotificationCount($tenant_id, $id);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->getCachedNotificationCount: ', $e->getMessage(), PHP_EOL;
28}
29

获取通知计数 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
userIdstringquery否
urlIdstringquery否
fromCommentIdstringquery否
viewedbooleanquery否
typestringquery否

响应

Returns: GetNotificationCountResponse

示例

getNotificationCount 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5// 配置 API 密钥授权:api_key
6$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
7// 取消注释以下代码以在需要时为 API 密钥设置前缀(例如 Bearer)
8// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
9
10
11$apiInstance = new FastComments\Client\Api\DefaultApi(
12 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
13 // 这是可选的,默认使用 `GuzzleHttp\Client`。
14 new GuzzleHttp\Client(),
15 $config
16);
17
18$tenant_id = 'tenant_id_example'; // string
19$options = [
20 'user_id' => 'user_id_example', // string
21 'url_id' => 'url_id_example', // string
22 'from_comment_id' => 'from_comment_id_example', // string
23 'viewed' => True, // bool
24 'type' => 'type_example', // string
25];
26
27
28try {
29 $result = $apiInstance->getNotificationCount($tenant_id, $options);
30 print_r($result);
31} catch (Exception $e) {
32 echo 'Exception when calling DefaultApi->getNotificationCount: ', $e->getMessage(), PHP_EOL;
33}
34

获取通知 Internal Link

参数

名称类型位置必需描述
tenantIdstringqueryYes
userIdstringqueryNo
urlIdstringqueryNo
fromCommentIdstringqueryNo
viewedbooleanqueryNo
typestringqueryNo
skipnumberqueryNo

响应

返回:GetNotificationsResponse

示例

getNotifications 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5// 配置 API 密钥授权:api_key
6$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
7// 取消注释以下内容以为 API 密钥设置前缀(例如 Bearer),如有需要
8// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
9
10
11$apiInstance = new FastComments\Client\Api\DefaultApi(
12 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
13 // 这是可选的,默认使用 `GuzzleHttp\Client`。
14 new GuzzleHttp\Client(),
15 $config
16);
17
18$tenant_id = 'tenant_id_example'; // 字符串
19$options = [
20 'user_id' => 'user_id_example', // 字符串
21 'url_id' => 'url_id_example', // 字符串
22 'from_comment_id' => 'from_comment_id_example', // 字符串
23 'viewed' => True, // 布尔
24 'type' => 'type_example', // 字符串
25 'skip' => 3.4, // 浮点数
26];
27
28
29try {
30 $result = $apiInstance->getNotifications($tenant_id, $options);
31 print_r($result);
32} catch (Exception $e) {
33 echo 'Exception when calling DefaultApi->getNotifications: ', $e->getMessage(), PHP_EOL;
34}
35

更新通知 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是
idstringpath是
userIdstringquery否

响应

返回:APIEmptyResponse

示例

updateNotification 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 配置 API 密钥授权:api_key
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// 取消注释以下行以设置 API 密钥的前缀(例如 Bearer),如果需要
10// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
11
12
13$apiInstance = new FastComments\Client\Api\DefaultApi(
14 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
15 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
16 // This is optional, `GuzzleHttp\Client` will be used as default.
17 // 这是可选的,`GuzzleHttp\Client` 将作为默认使用。
18 new GuzzleHttp\Client(),
19 $config
20);
21
22$tenant_id = 'tenant_id_example'; // 字符串
23$id = 'id_example'; // 字符串
24$update_notification_body = new \FastComments\Client\Model\UpdateNotificationBody(); // \FastComments\Client\Model\UpdateNotificationBody
25$user_id = 'user_id_example'; // 字符串
26
27
28try {
29 $result = $apiInstance->updateNotification($tenant_id, $id, $update_notification_body, $user_id);
30 print_r($result);
31} catch (Exception $e) {
32 echo 'Exception when calling DefaultApi->updateNotification: ', $e->getMessage(), PHP_EOL;
33}
34

创建 V1 页面反应 Internal Link

参数

名称类型位置必需描述
tenantIdstringpath是
urlIdstringquery是
titlestringquery否

响应

返回: CreateV1PageReact

示例

createV1PageReact 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这一步是可选的,默认会使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // 字符串
14$url_id = 'url_id_example'; // 字符串
15$title = 'title_example'; // 字符串
16
17
18try {
19 $result = $apiInstance->createV1PageReact($tenant_id, $url_id, $title);
20 print_r($result);
21} catch (Exception $e) {
22 echo 'Exception when calling PublicApi->createV1PageReact: ', $e->getMessage(), PHP_EOL;
23}
24

创建 V2 页面反应 Internal Link

参数

名称类型位置必填描述
tenantIdstringpath是
urlIdstringquery是
idstringquery是
titlestringquery否

响应

返回:CreateV1PageReact

示例

createV2PageReact 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认会使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$url_id = 'url_id_example'; // string
15$id = 'id_example'; // string
16$title = 'title_example'; // string
17
18
19try {
20 $result = $apiInstance->createV2PageReact($tenant_id, $url_id, $id, $title);
21 print_r($result);
22} catch (Exception $e) {
23 echo 'Exception when calling PublicApi->createV2PageReact: ', $e->getMessage(), PHP_EOL;
24}
25

删除 V1 页面反应 Internal Link

参数

名称类型位置必填描述
tenantIdstringpath是
urlIdstringquery是

响应

返回: CreateV1PageReact

示例

deleteV1PageReact 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$url_id = 'url_id_example'; // string
15
16
17try {
18 $result = $apiInstance->deleteV1PageReact($tenant_id, $url_id);
19 print_r($result);
20} catch (Exception $e) {
21 echo 'Exception when calling PublicApi->deleteV1PageReact: ', $e->getMessage(), PHP_EOL;
22}
23

删除 V2 页面反应 Internal Link

参数

名称类型位置必需描述
tenantIdstringpathYes
urlIdstringqueryYes
idstringqueryYes

响应

返回:CreateV1PageReact

示例

deleteV2PageReact 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$url_id = 'url_id_example'; // string
15$id = 'id_example'; // string
16
17
18try {
19 $result = $apiInstance->deleteV2PageReact($tenant_id, $url_id, $id);
20 print_r($result);
21} catch (Exception $e) {
22 echo 'Exception when calling PublicApi->deleteV2PageReact: ', $e->getMessage(), PHP_EOL;
23}
24

获取 V1 页面点赞 Internal Link

参数

名称类型位置必需描述
tenantIdstringpathYes
urlIdstringqueryYes

响应

返回:GetV1PageLikes

示例

getV1PageLikes 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$url_id = 'url_id_example'; // string
15
16
17try {
18 $result = $apiInstance->getV1PageLikes($tenant_id, $url_id);
19 print_r($result);
20} catch (Exception $e) {
21 echo 'Exception when calling PublicApi->getV1PageLikes: ', $e->getMessage(), PHP_EOL;
22}
23

获取 V2 页面反应 Internal Link

参数

名称类型位置必填描述
tenantIdstringpath是
urlIdstringquery是

响应

返回: GetV2PageReacts

示例

getV2PageReacts 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$url_id = 'url_id_example'; // string
15
16
17try {
18 $result = $apiInstance->getV2PageReacts($tenant_id, $url_id);
19 print_r($result);
20} catch (Exception $e) {
21 echo 'Exception when calling PublicApi->getV2PageReacts: ', $e->getMessage(), PHP_EOL;
22}
23

获取 V2 页面反应用户 Internal Link

参数

名称类型位置必填描述
tenantIdstringpathYes
urlIdstringqueryYes
idstringqueryYes

响应

返回:GetV2PageReactUsersResponse

示例

getV2PageReactUsers 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$url_id = 'url_id_example'; // string
15$id = 'id_example'; // string
16
17
18try {
19 $result = $apiInstance->getV2PageReactUsers($tenant_id, $url_id, $id);
20 print_r($result);
21} catch (Exception $e) {
22 echo 'Exception when calling PublicApi->getV2PageReactUsers: ', $e->getMessage(), PHP_EOL;
23}
24

添加页面 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是

响应

返回:AddPageAPIResponse

示例

addPage 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如有需要,取消注释以下内容以为 API 密钥设置前缀(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$create_api_page_data = new \FastComments\Client\Model\CreateAPIPageData(); // \FastComments\Client\Model\CreateAPIPageData
21
22
23try {
24 $result = $apiInstance->addPage($tenant_id, $create_api_page_data);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->addPage: ', $e->getMessage(), PHP_EOL;
28}
29

删除页面 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是
idstringpath是

响应

返回:DeletePageAPIResponse

示例

deletePage 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下以设置前缀(例如 Bearer)用于 API 密钥,如有需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // 字符串
20$id = 'id_example'; // 字符串
21
22
23try {
24 $result = $apiInstance->deletePage($tenant_id, $id);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->deletePage: ', $e->getMessage(), PHP_EOL;
28}
29

获取离线用户 Internal Link


页面上过去的评论者(当前不在线)。按 displayName 排序。
在耗尽 /users/online 之后使用,以渲染“成员”部分。
对 commenterName 进行游标分页:服务器从部分 {tenantId, urlId, commenterName} 索引在 afterName 之后通过 $gt 前进,无 $skip 开销。

参数

名称类型位置必填描述
tenantIdstringpath是
urlIdstringquery是页面 URL 标识符(服务器端清理后)。
afterNamestringquery否游标:传入前一次响应中的 nextAfterName。
afterUserIdstringquery否游标分割键:传入前一次响应中的 nextAfterUserId。当 afterName 已设置时必须提供,以防名称相同导致条目被丢弃。

响应

返回: PageUsersOfflineResponse

示例

获取离线用户示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$url_id = 'url_id_example'; // string | 页面 URL 标识符(服务器端清理后)。
15$options = [
16 'after_name' => 'after_name_example', // string | 游标:传入前一次响应中的 nextAfterName。
17 'after_user_id' => 'after_user_id_example', // string | 游标分割键:传入前一次响应中的 nextAfterUserId。当 afterName 已设置时必须提供,以防名称相同导致条目被丢弃。
18];
19
20
21try {
22 $result = $apiInstance->getOfflineUsers($tenant_id, $url_id, $options);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling PublicApi->getOfflineUsers: ', $e->getMessage(), PHP_EOL;
26}
27

获取在线用户 Internal Link

当前在线的页面查看者:其 websocket 会话当前已订阅该页面的用户。
返回 anonCount + totalCount(全局房间订阅者,包括我们不枚举的匿名查看者)。

Parameters

NameTypeLocationRequiredDescription
tenantIdstringpathYes
urlIdstringqueryYes页面 URL 标识符(服务器端清理后)。
afterNamestringqueryNo游标:传入上一次响应中的 nextAfterName。
afterUserIdstringqueryNo游标分割键:传入上一次响应中的 nextAfterUserId。当设置 afterName 时需要此项,以防名称冲突导致条目被丢弃。

Response

返回:PageUsersOnlineResponse

Example

getOnlineUsers 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果想使用自定义 HTTP 客户端,传入实现 `GuzzleHttp\ClientInterface` 的客户端实例。
9 // 这一步是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$url_id = 'url_id_example'; // string | 页面 URL 标识符(服务器端清理后)。
15$options = [
16 'after_name' => 'after_name_example', // string | 游标:传入上一次响应中的 nextAfterName。
17 'after_user_id' => 'after_user_id_example', // string | 游标分割键:传入上一次响应中的 nextAfterUserId。当设置 afterName 时需要此项,以防名称冲突导致条目被丢弃。
18];
19
20
21try {
22 $result = $apiInstance->getOnlineUsers($tenant_id, $url_id, $options);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling PublicApi->getOnlineUsers: ', $e->getMessage(), PHP_EOL;
26}
27

通过 URL ID 获取页面 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
urlIdstringqueryYes

响应

返回:GetPageByURLIdAPIResponse

示例

getPageByURLId 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下内容以设置 API 密钥前缀(例如 Bearer),如果需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$url_id = 'url_id_example'; // string
21
22
23try {
24 $result = $apiInstance->getPageByURLId($tenant_id, $url_id);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->getPageByURLId: ', $e->getMessage(), PHP_EOL;
28}
29

获取页面列表 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是

响应

返回: GetPagesAPIResponse

示例

getPages 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下内容以设置 API 密钥前缀(例如 Bearer),如果需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20
21
22try {
23 $result = $apiInstance->getPages($tenant_id);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling DefaultApi->getPages: ', $e->getMessage(), PHP_EOL;
27}
28

公开获取页面 Internal Link

List pages for a tenant. Used by the FChat desktop client to populate its room list.
Requires enableFChat to be true on the resolved custom config for each page.
Pages that require SSO are filtered against the requesting user's group access.

Parameters

NameTypeLocationRequiredDescription
tenantIdstringpathYes
cursorstringqueryNo不透明分页游标,从先前请求的 nextCursor 返回。与相同的 sortBy 关联。
limitintegerqueryNo1..200,默认 50
qstringqueryNo可选的大小写不敏感标题前缀过滤。
sortBystringqueryNo排序方式。updatedAt(默认,最新的在前),commentCount(评论最多的在前),或 title(字母顺序)。
hasCommentsbooleanqueryNo若为 true,则只返回至少有一条评论的页面。

Response

Returns: GetPublicPagesResponse

Example

getPagesPublic 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
9 // This is optional, `GuzzleHttp\Client` will be used as default.
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$options = [
15 'cursor' => 'cursor_example', // string | Opaque pagination cursor returned as `nextCursor` from a prior request. Tied to the same `sortBy`.
16 'limit' => 56, // int | 1..200, default 50
17 'q' => 'q_example', // string | Optional case-insensitive title prefix filter.
18 'sort_by' => new \FastComments\Client\Model\\FastComments\Client\Model\PagesSortBy(), // \FastComments\Client\Model\PagesSortBy | Sort order. `updatedAt` (default, newest first), `commentCount` (most comments first), or `title` (alphabetical).
19 'has_comments' => True, // bool | If true, only return pages with at least one comment.
20];
21
22
23try {
24 $result = $apiInstance->getPagesPublic($tenant_id, $options);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling PublicApi->getPagesPublic: ', $e->getMessage(), PHP_EOL;
28}
29

获取用户信息 Internal Link

批量获取租户的用户信息。给定 userIds,返回来自 User / SSOUser 的显示信息。
评论小部件使用此接口来丰富通过在线状态事件刚出现的用户。
无页面上下文:隐私统一强制执行(私人资料会被遮蔽)。

参数

名称类型位置必填描述
tenantIdstringpathYes
idsstringqueryYes逗号分隔的 userIds。

响应

返回: PageUsersInfoResponse

示例

getUsersInfo 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$ids = 'ids_example'; // string | 逗号分隔的 userIds.
15
16
17try {
18 $result = $apiInstance->getUsersInfo($tenant_id, $ids);
19 print_r($result);
20} catch (Exception $e) {
21 echo 'Exception when calling PublicApi->getUsersInfo: ', $e->getMessage(), PHP_EOL;
22}
23

修补页面 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是
idstringpath是

响应

返回:PatchPageAPIResponse

示例

patchPage 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如有需要,取消注释以下行以设置 API 密钥前缀(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // 字符串
20$id = 'id_example'; // 字符串
21$update_api_page_data = new \FastComments\Client\Model\UpdateAPIPageData(); // \FastComments\Client\Model\UpdateAPIPageData
22
23
24try {
25 $result = $apiInstance->patchPage($tenant_id, $id, $update_api_page_data);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling DefaultApi->patchPage: ', $e->getMessage(), PHP_EOL;
29}
30

删除待处理的 webhook 事件 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
idstringpath是

响应

返回:APIEmptyResponse

示例

deletePendingWebhookEvent 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7// 取消注释以下代码以设置 API 密钥的前缀(例如 Bearer),如果需要的话
8// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
9
10
11$apiInstance = new FastComments\Client\Api\DefaultApi(
12 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
13 // 这是可选的,默认使用 `GuzzleHttp\Client`。
14 new GuzzleHttp\Client(),
15 $config
16);
17
18$tenant_id = 'tenant_id_example'; // string
19$id = 'id_example'; // string
20
21
22try {
23 $result = $apiInstance->deletePendingWebhookEvent($tenant_id, $id);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling DefaultApi->deletePendingWebhookEvent: ', $e->getMessage(), PHP_EOL;
27}
28

获取待处理 webhook 事件计数 Internal Link

参数

名称类型位置必需描述
tenantIdstringqueryYes
commentIdstringqueryNo
externalIdstringqueryNo
eventTypestringqueryNo
typestringqueryNo
domainstringqueryNo
attemptCountGTnumberqueryNo

响应

返回:GetPendingWebhookEventCountResponse

示例

getPendingWebhookEventCount 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如果需要,为 API 密钥设置前缀(例如 Bearer),请取消下面的注释
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // 字符串
20$options = [
21 'comment_id' => 'comment_id_example', // 字符串
22 'external_id' => 'external_id_example', // 字符串
23 'event_type' => 'event_type_example', // 字符串
24 'type' => 'type_example', // 字符串
25 'domain' => 'domain_example', // 字符串
26 'attempt_count_gt' => 3.4, // 浮点数
27];
28
29
30try {
31 $result = $apiInstance->getPendingWebhookEventCount($tenant_id, $options);
32 print_r($result);
33} catch (Exception $e) {
34 echo 'Exception when calling DefaultApi->getPendingWebhookEventCount: ', $e->getMessage(), PHP_EOL;
35}
36

获取待处理 webhook 事件 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
commentIdstringqueryNo
externalIdstringqueryNo
eventTypestringqueryNo
typestringqueryNo
domainstringqueryNo
attemptCountGTnumberqueryNo
skipnumberqueryNo

响应

返回:GetPendingWebhookEventsResponse

示例

getPendingWebhookEvents 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 配置 API 密钥授权:api_key
8$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
9// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
10// 如有需要,取消注释以下行以为 API 密钥设置前缀(例如 Bearer)
11// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
12
13
14$apiInstance = new FastComments\Client\Api\DefaultApi(
15 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
16 // 如果您想使用自定义 HTTP 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
17 // This is optional, `GuzzleHttp\Client` will be used as default.
18 // 这是可选的,默认使用 `GuzzleHttp\Client`。
19 new GuzzleHttp\Client(),
20 $config
21);
22
23$tenant_id = 'tenant_id_example'; // string
24$options = [
25 'comment_id' => 'comment_id_example', // string
26 'external_id' => 'external_id_example', // string
27 'event_type' => 'event_type_example', // string
28 'type' => 'type_example', // string
29 'domain' => 'domain_example', // string
30 'attempt_count_gt' => 3.4, // float
31 'skip' => 3.4, // float
32];
33
34
35try {
36 $result = $apiInstance->getPendingWebhookEvents($tenant_id, $options);
37 print_r($result);
38} catch (Exception $e) {
39 echo 'Exception when calling DefaultApi->getPendingWebhookEvents: ', $e->getMessage(), PHP_EOL;
40}
41

创建问题配置 Internal Link

参数

NameTypeLocationRequiredDescription
tenantIdstringquery是

响应

返回: CreateQuestionConfigResponse

示例

createQuestionConfig 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如有需要,取消注释以下代码以设置 API 密钥前缀(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$create_question_config_body = new \FastComments\Client\Model\CreateQuestionConfigBody(); // \FastComments\Client\Model\CreateQuestionConfigBody
21
22
23try {
24 $result = $apiInstance->createQuestionConfig($tenant_id, $create_question_config_body);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->createQuestionConfig: ', $e->getMessage(), PHP_EOL;
28}
29

删除问题配置 Internal Link

参数

名称类型位置必需描述
tenantIdstringqueryYes
idstringpathYes

响应

返回:APIEmptyResponse

示例

deleteQuestionConfig 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释下面的代码以为 API 密钥设置前缀(例如 Bearer),如有需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // 字符串
20$id = 'id_example'; // 字符串
21
22
23try {
24 $result = $apiInstance->deleteQuestionConfig($tenant_id, $id);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->deleteQuestionConfig: ', $e->getMessage(), PHP_EOL;
28}
29

获取问题配置 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是
idstringpath是

响应

返回: GetQuestionConfigResponse

示例

获取问题配置 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5// 配置 API 密钥授权: api_key
6$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
7// 如有需要,取消下面的注释以为 API 密钥设置前缀(例如 Bearer)
8// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
9
10
11$apiInstance = new FastComments\Client\Api\DefaultApi(
12 // 如果想使用自定义 HTTP 客户端,传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
13 // 这是可选的,默认会使用 `GuzzleHttp\Client`。
14 new GuzzleHttp\Client(),
15 $config
16);
17
18$tenant_id = 'tenant_id_example'; // string
19$id = 'id_example'; // string
20
21
22try {
23 $result = $apiInstance->getQuestionConfig($tenant_id, $id);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling DefaultApi->getQuestionConfig: ', $e->getMessage(), PHP_EOL;
27}
28

获取问题配置列表 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
skipnumberquery否

响应

返回:GetQuestionConfigsResponse

示例

getQuestionConfigs 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5// 配置 API 密钥授权:api_key
6// 取消注释下面的代码,以在需要时为 API 密钥设置前缀(例如 Bearer)
7// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
8
9
10$apiInstance = new FastComments\Client\Api\DefaultApi(
11 // 如果你想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端实例。
12 // 这不是必需的,默认会使用 `GuzzleHttp\Client`。
13 new GuzzleHttp\Client(),
14 $config
15);
16
17$tenant_id = 'tenant_id_example'; // string
18$skip = 3.4; // float
19
20
21try {
22 $result = $apiInstance->getQuestionConfigs($tenant_id, $skip);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling DefaultApi->getQuestionConfigs: ', $e->getMessage(), PHP_EOL;
26}
27

更新问题配置 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是
idstringpath是

响应

返回:APIEmptyResponse

示例

updateQuestionConfig 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下内容以为 API 密钥设置前缀(例如 Bearer),如果需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // 字符串
20$id = 'id_example'; // 字符串
21$update_question_config_body = new \FastComments\Client\Model\UpdateQuestionConfigBody(); // \FastComments\Client\Model\UpdateQuestionConfigBody
22
23
24try {
25 $result = $apiInstance->updateQuestionConfig($tenant_id, $id, $update_question_config_body);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling DefaultApi->updateQuestionConfig: ', $e->getMessage(), PHP_EOL;
29}
30

创建问题结果 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是

响应

返回: CreateQuestionResultResponse

示例

createQuestionResult 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下以在需要时为 API 密钥设置前缀(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 http 客户端,传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // 字符串
20$create_question_result_body = new \FastComments\Client\Model\CreateQuestionResultBody(); // \FastComments\Client\Model\CreateQuestionResultBody
21
22
23try {
24 $result = $apiInstance->createQuestionResult($tenant_id, $create_question_result_body);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->createQuestionResult: ', $e->getMessage(), PHP_EOL;
28}
29

删除问题结果 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是
idstringpath是

响应

返回: APIEmptyResponse

示例

deleteQuestionResult 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 配置 API 密钥授权: api_key
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// 取消注释以下内容以为 API 密钥设置前缀(例如 Bearer),如果需要
10// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
11
12
13$apiInstance = new FastComments\Client\Api\DefaultApi(
14 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
15 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
16 // This is optional, `GuzzleHttp\Client` will be used as default.
17 // 这是可选的,默认使用 `GuzzleHttp\Client`。
18 new GuzzleHttp\Client(),
19 $config
20);
21
22$tenant_id = 'tenant_id_example'; // string
23$id = 'id_example'; // string
24
25
26try {
27 $result = $apiInstance->deleteQuestionResult($tenant_id, $id);
28 print_r($result);
29} catch (Exception $e) {
30 echo 'Exception when calling DefaultApi->deleteQuestionResult: ', $e->getMessage(), PHP_EOL;
31}
32

获取问题结果 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
idstringpath是

响应

Returns: GetQuestionResultResponse

示例

getQuestionResult 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下代码以设置前缀(例如 Bearer)用于 API 密钥,如有需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这不是必需的,默认将使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$id = 'id_example'; // string
21
22
23try {
24 $result = $apiInstance->getQuestionResult($tenant_id, $id);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->getQuestionResult: ', $e->getMessage(), PHP_EOL;
28}
29

获取问题结果列表 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
urlIdstringquery否
userIdstringquery否
startDatestringquery否
questionIdstringquery否
questionIdsstringquery否
skipnumberquery否

响应

返回:GetQuestionResultsResponse

示例

getQuestionResults 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5// 配置 API 密钥授权: api_key
6$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
7// 取消注释以下内容以设置 API 密钥的前缀(例如 Bearer),如有需要
8// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
9
10
11$apiInstance = new FastComments\Client\Api\DefaultApi(
12 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
13 // 这是可选的,默认使用 `GuzzleHttp\Client`。
14 new GuzzleHttp\Client(),
15 $config
16);
17
18$tenant_id = 'tenant_id_example'; // 字符串
19$options = [
20 'url_id' => 'url_id_example', // 字符串
21 'user_id' => 'user_id_example', // 字符串
22 'start_date' => 'start_date_example', // 字符串
23 'question_id' => 'question_id_example', // 字符串
24 'question_ids' => 'question_ids_example', // 字符串
25 'skip' => 3.4, // 浮点数
26];
27
28
29try {
30 $result = $apiInstance->getQuestionResults($tenant_id, $options);
31 print_r($result);
32} catch (Exception $e) {
33 echo 'Exception when calling DefaultApi->getQuestionResults: ', $e->getMessage(), PHP_EOL;
34}
35

更新问题结果 Internal Link

参数

名称类型位置必需描述
tenantIdstringqueryYes
idstringpathYes

响应

返回: APIEmptyResponse

示例

updateQuestionResult 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5// 配置 API 密钥授权: api_key
6$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
7// 如有需要,取消注释下面的行以设置前缀(例如 Bearer)用于 API 密钥
8// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
9
10
11$apiInstance = new FastComments\Client\Api\DefaultApi(
12 // 如果想使用自定义 HTTP 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
13 // 这是可选的,默认会使用 `GuzzleHttp\Client`。
14 new GuzzleHttp\Client(),
15 $config
16);
17
18$tenant_id = 'tenant_id_example'; // string
19$id = 'id_example'; // string
20$update_question_result_body = new \FastComments\Client\Model\UpdateQuestionResultBody(); // \FastComments\Client\Model\UpdateQuestionResultBody
21
22
23try {
24 $result = $apiInstance->updateQuestionResult($tenant_id, $id, $update_question_result_body);
25 print_r($result);
26} catch (Exception $e) {
27 echo '调用 DefaultApi->updateQuestionResult 时的异常: ', $e->getMessage(), PHP_EOL;
28}
29

聚合问题结果 Internal Link

参数

名称类型位置必须描述
tenantIdstringquery是
questionIdstringquery否
questionIdsarrayquery否
urlIdstringquery否
timeBucketstringquery否
startDatestringquery否
forceRecalculatebooleanquery否

响应

返回: AggregateQuestionResultsResponse

示例

aggregateQuestionResults 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释下面以设置前缀 (例如 Bearer) 用于 API 密钥,如有需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果你想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认会使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$options = [
21 'question_id' => 'question_id_example', // string
22 'question_ids' => array('question_ids_example'), // string[]
23 'url_id' => 'url_id_example', // string
24 'time_bucket' => new \FastComments\Client\Model\\FastComments\Client\Model\AggregateTimeBucket(), // \FastComments\Client\Model\AggregateTimeBucket
25 'start_date' => new \DateTime('2013-10-20T19:20:30+01:00'), // \DateTime
26 'force_recalculate' => True, // bool
27];
28
29
30try {
31 $result = $apiInstance->aggregateQuestionResults($tenant_id, $options);
32 print_r($result);
33} catch (Exception $e) {
34 echo 'Exception when calling DefaultApi->aggregateQuestionResults: ', $e->getMessage(), PHP_EOL;
35}
36

批量聚合问题结果 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
forceRecalculatebooleanquery否

响应

返回:BulkAggregateQuestionResultsResponse

示例

bulkAggregateQuestionResults 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
14 // This is optional, `GuzzleHttp\Client` will be used as default.
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$bulk_aggregate_question_results_request = new \FastComments\Client\Model\BulkAggregateQuestionResultsRequest(); // \FastComments\Client\Model\BulkAggregateQuestionResultsRequest
21$force_recalculate = True; // bool
22
23
24try {
25 $result = $apiInstance->bulkAggregateQuestionResults($tenant_id, $bulk_aggregate_question_results_request, $force_recalculate);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling DefaultApi->bulkAggregateQuestionResults: ', $e->getMessage(), PHP_EOL;
29}
30

将评论与问题结果合并 Internal Link

参数

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
questionIdstringqueryNo
questionIdsarrayqueryNo
urlIdstringqueryNo
startDatestringqueryNo
forceRecalculatebooleanqueryNo
minValuenumberqueryNo
maxValuenumberqueryNo
limitnumberqueryNo

响应

返回: CombineQuestionResultsWithCommentsResponse

示例

combineCommentsWithQuestionResults 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释下面以设置 API 密钥的前缀(例如 Bearer),如果需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,`GuzzleHttp\Client` 将作为默认使用。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // 字符串
20$options = [
21 'question_id' => 'question_id_example', // 字符串
22 'question_ids' => array('question_ids_example'), // 字符串数组
23 'url_id' => 'url_id_example', // 字符串
24 'start_date' => new \DateTime('2013-10-20T19:20:30+01:00'), // \DateTime
25 'force_recalculate' => True, // 布尔
26 'min_value' => 3.4, // 浮点数
27 'max_value' => 3.4, // 浮点数
28 'limit' => 3.4, // 浮点数
29];
30
31
32try {
33 $result = $apiInstance->combineCommentsWithQuestionResults($tenant_id, $options);
34 print_r($result);
35} catch (Exception $e) {
36 echo 'Exception when calling DefaultApi->combineCommentsWithQuestionResults: ', $e->getMessage(), PHP_EOL;
37}
38

添加 SSO 用户 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是

响应

返回: AddSSOUserAPIResponse

示例

addSSOUser 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如有需要,取消注释以下行以设置 API 密钥的前缀(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义的 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这项是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$create_apisso_user_data = new \FastComments\Client\Model\CreateAPISSOUserData(); // \FastComments\Client\Model\CreateAPISSOUserData
21
22
23try {
24 $result = $apiInstance->addSSOUser($tenant_id, $create_apisso_user_data);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->addSSOUser: ', $e->getMessage(), PHP_EOL;
28}
29

删除 SSO 用户 Internal Link

参数

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
idstringpathYes
deleteCommentsbooleanqueryNo
commentDeleteModestringqueryNo

响应

返回: DeleteSSOUserAPIResponse

示例

deleteSSOUser 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下行以设置前缀(例如 Bearer)用于 API 密钥,如有需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这不是必需的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // 字符串
20$id = 'id_example'; // 字符串
21$options = [
22 'delete_comments' => True, // 布尔
23 'comment_delete_mode' => 'comment_delete_mode_example', // 字符串
24];
25
26
27try {
28 $result = $apiInstance->deleteSSOUser($tenant_id, $id, $options);
29 print_r($result);
30} catch (Exception $e) {
31 echo 'Exception when calling DefaultApi->deleteSSOUser: ', $e->getMessage(), PHP_EOL;
32}
33

通过邮箱获取 SSO 用户 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
emailstringpath是

响应

返回: GetSSOUserByEmailAPIResponse

示例

getSSOUserByEmail 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下代码以为 API 密钥设置前缀(例如 Bearer),如果需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 http 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // 字符串
20$email = 'email_example'; // 字符串
21
22
23try {
24 $result = $apiInstance->getSSOUserByEmail($tenant_id, $email);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->getSSOUserByEmail: ', $e->getMessage(), PHP_EOL;
28}
29

通过 ID 获取 SSO 用户 Internal Link

参数

名称类型位置必需描述
tenantIdstringqueryYes
idstringpathYes

响应

返回: GetSSOUserByIdAPIResponse

示例

getSSOUserById 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 配置 API 密钥授权:api_key
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// 取消注释以下内容以设置 API 密钥的前缀(例如 Bearer),如果需要
10// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
11
12
13$apiInstance = new FastComments\Client\Api\DefaultApi(
14 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
15 // 如果您想使用自定义 HTTP 客户端,传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
16 // This is optional, `GuzzleHttp\Client` will be used as default.
17 // 这是可选的,默认使用 `GuzzleHttp\Client`。
18 new GuzzleHttp\Client(),
19 $config
20);
21
22$tenant_id = 'tenant_id_example'; // string
23// 字符串
24$id = 'id_example'; // string
25// 字符串
26
27
28try {
29 $result = $apiInstance->getSSOUserById($tenant_id, $id);
30 print_r($result);
31} catch (Exception $e) {
32 echo 'Exception when calling DefaultApi->getSSOUserById: ', $e->getMessage(), PHP_EOL;
33}
34

获取 SSO 用户列表 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
skipintegerquery否

响应

返回:GetSSOUsersResponse

示例

getSSOUsers 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7// 取消注释以下代码以设置 API 密钥的前缀(例如 Bearer),如果需要
8// 这是可选的,默认使用 `GuzzleHttp\Client`。
9$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
10// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
11
12
13$apiInstance = new FastComments\Client\Api\DefaultApi(
14 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
15 // 这是可选的,`GuzzleHttp\Client` 将作为默认使用。
16 new GuzzleHttp\Client(),
17 $config
18);
19
20$tenant_id = 'tenant_id_example'; // string
21$skip = 56; // int
22
23
24try {
25 $result = $apiInstance->getSSOUsers($tenant_id, $skip);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling DefaultApi->getSSOUsers: ', $e->getMessage(), PHP_EOL;
29}
30

修补 SSO 用户 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是
idstringpath是
updateCommentsbooleanquery否

响应

返回:PatchSSOUserAPIResponse

示例

patchSSOUser 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 配置 API 密钥授权:api_key
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// 取消注释以下以设置 API 密钥的前缀(例如 Bearer),如果需要
10// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
11
12
13$apiInstance = new FastComments\Client\Api\DefaultApi(
14 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
15 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
16 // This is optional, `GuzzleHttp\Client` will be used as default.
17 // 这是可选的,默认使用 `GuzzleHttp\Client`。
18 new GuzzleHttp\Client(),
19 $config
20);
21
22$tenant_id = 'tenant_id_example'; // string
23$id = 'id_example'; // string
24$update_apisso_user_data = new \FastComments\Client\Model\UpdateAPISSOUserData(); // \FastComments\Client\Model\UpdateAPISSOUserData
25$update_comments = True; // bool
26
27
28try {
29 $result = $apiInstance->patchSSOUser($tenant_id, $id, $update_apisso_user_data, $update_comments);
30 print_r($result);
31} catch (Exception $e) {
32 echo 'Exception when calling DefaultApi->patchSSOUser: ', $e->getMessage(), PHP_EOL;
33}
34

放置 SSO 用户 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
idstringpath是
updateCommentsbooleanquery否

响应

返回:PutSSOUserAPIResponse

示例

putSSOUser 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 配置 API 密钥授权: api_key
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// 取消注释以下代码以设置前缀(例如 Bearer)用于 API 密钥,如有需要
10// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
11
12
13$apiInstance = new FastComments\Client\Api\DefaultApi(
14 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
15 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
16 // This is optional, `GuzzleHttp\Client` will be used as default.
17 // 这是可选的,默认使用 `GuzzleHttp\Client`。
18 new GuzzleHttp\Client(),
19 $config
20);
21
22$tenant_id = 'tenant_id_example'; // string
23$id = 'id_example'; // string
24$update_apisso_user_data = new \FastComments\Client\Model\UpdateAPISSOUserData(); // \FastComments\Client\Model\UpdateAPISSOUserData
25$update_comments = True; // bool
26
27
28try {
29 $result = $apiInstance->putSSOUser($tenant_id, $id, $update_apisso_user_data, $update_comments);
30 print_r($result);
31} catch (Exception $e) {
32 echo 'Exception when calling DefaultApi->putSSOUser: ', $e->getMessage(), PHP_EOL;
33}
34

创建订阅 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是

响应

返回:CreateSubscriptionAPIResponse

示例

createSubscription 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下代码以在需要时为 API 密钥设置前缀(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // 字符串
20$create_api_user_subscription_data = new \FastComments\Client\Model\CreateAPIUserSubscriptionData(); // \FastComments\Client\Model\CreateAPIUserSubscriptionData
21
22
23try {
24 $result = $apiInstance->createSubscription($tenant_id, $create_api_user_subscription_data);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->createSubscription: ', $e->getMessage(), PHP_EOL;
28}
29

删除订阅 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
idstringpath是
userIdstringquery否

响应

返回:DeleteSubscriptionAPIResponse

示例

deleteSubscription 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7// 取消注释以下代码以设置前缀(例如 Bearer)用于 API 密钥(如有需要)
8// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
9
10
11$apiInstance = new FastComments\Client\Api\DefaultApi(
12 // 如果想使用自定义 http 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
13 // 这是可选的,默认会使用 `GuzzleHttp\Client`。
14 new GuzzleHttp\Client(),
15 $config
16);
17
18$tenant_id = 'tenant_id_example'; // string
19$id = 'id_example'; // string
20$user_id = 'user_id_example'; // string
21
22
23try {
24 $result = $apiInstance->deleteSubscription($tenant_id, $id, $user_id);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->deleteSubscription: ', $e->getMessage(), PHP_EOL;
28}
29

获取订阅列表 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
userIdstringqueryNo

响应

返回:GetSubscriptionsAPIResponse

示例

getSubscriptions 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 配置 API 密钥授权:api_key
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// 取消注释以下行以设置 API 密钥前缀(例如 Bearer),如有需要
10// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
11
12
13$apiInstance = new FastComments\Client\Api\DefaultApi(
14 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
15 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
16 // This is optional, `GuzzleHttp\Client` will be used as default.
17 // 这是可选的,默认使用 `GuzzleHttp\Client`。
18 new GuzzleHttp\Client(),
19 $config
20);
21
22$tenant_id = 'tenant_id_example'; // string
23$user_id = 'user_id_example'; // string
24
25
26try {
27 $result = $apiInstance->getSubscriptions($tenant_id, $user_id);
28 print_r($result);
29} catch (Exception $e) {
30 echo 'Exception when calling DefaultApi->getSubscriptions: ', $e->getMessage(), PHP_EOL;
31}
32

更新订阅 Internal Link

参数

名称类型位置必需描述
tenantIdstringqueryYes
idstringpathYes
userIdstringqueryNo

响应

返回: UpdateSubscriptionAPIResponse

示例

updateSubscription 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
14 // This is optional, `GuzzleHttp\Client` will be used as default.
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$id = 'id_example'; // string
21$update_api_user_subscription_data = new \FastComments\Client\Model\UpdateAPIUserSubscriptionData(); // \FastComments\Client\Model\UpdateAPIUserSubscriptionData
22$user_id = 'user_id_example'; // string
23
24
25try {
26 $result = $apiInstance->updateSubscription($tenant_id, $id, $update_api_user_subscription_data, $user_id);
27 print_r($result);
28} catch (Exception $e) {
29 echo 'Exception when calling DefaultApi->updateSubscription: ', $e->getMessage(), PHP_EOL;
30}
31

获取租户每日使用情况 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是
yearNumbernumberquery否
monthNumbernumberquery否
dayNumbernumberquery否
skipnumberquery否

响应

返回: GetTenantDailyUsagesResponse

示例

getTenantDailyUsages 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下以设置前缀(例如 Bearer)用于 API 密钥,如有需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 http 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$options = [
21 'year_number' => 3.4, // float
22 'month_number' => 3.4, // float
23 'day_number' => 3.4, // float
24 'skip' => 3.4, // float
25];
26
27
28try {
29 $result = $apiInstance->getTenantDailyUsages($tenant_id, $options);
30 print_r($result);
31} catch (Exception $e) {
32 echo 'Exception when calling DefaultApi->getTenantDailyUsages: ', $e->getMessage(), PHP_EOL;
33}
34

创建租户套餐 Internal Link

参数

名称类型位置必需描述
tenantIdstringqueryYes

响应

返回: CreateTenantPackageResponse

示例

createTenantPackage 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下内容以在需要时为 API 密钥设置前缀(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$create_tenant_package_body = new \FastComments\Client\Model\CreateTenantPackageBody(); // \FastComments\Client\Model\CreateTenantPackageBody
21
22
23try {
24 $result = $apiInstance->createTenantPackage($tenant_id, $create_tenant_package_body);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->createTenantPackage: ', $e->getMessage(), PHP_EOL;
28}
29

删除租户套餐 Internal Link

参数

名称类型位置必需描述
tenantIdstringqueryYes
idstringpathYes

响应

Returns: APIEmptyResponse

示例

deleteTenantPackage 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如有需要,取消注释以下代码以设置前缀(例如 Bearer)用于 API 密钥
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // 字符串
20$id = 'id_example'; // 字符串
21
22
23try {
24 $result = $apiInstance->deleteTenantPackage($tenant_id, $id);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->deleteTenantPackage: ', $e->getMessage(), PHP_EOL;
28}
29

获取租户套餐 Internal Link

参数

名称类型位置必需描述
tenantIdstringqueryYes
idstringpathYes

响应

返回:GetTenantPackageResponse

示例

getTenantPackage 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
14 // This is optional, `GuzzleHttp\Client` will be used as default.
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$id = 'id_example'; // string
21
22
23try {
24 $result = $apiInstance->getTenantPackage($tenant_id, $id);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->getTenantPackage: ', $e->getMessage(), PHP_EOL;
28}
29

获取租户套餐列表 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
skipnumberquery否

响应

返回:GetTenantPackagesResponse

示例

getTenantPackages 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
14 // This is optional, `GuzzleHttp\Client` will be used as default.
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string(字符串)
20$skip = 3.4; // float(浮点数)
21
22
23try {
24 $result = $apiInstance->getTenantPackages($tenant_id, $skip);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->getTenantPackages: ', $e->getMessage(), PHP_EOL;
28}
29

替换租户套餐 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
idstringpathYes

响应

返回: APIEmptyResponse

示例

replaceTenantPackage 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下行以设置前缀(例如 Bearer)用于 API 密钥(如有需要)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // 字符串
20$id = 'id_example'; // 字符串
21$replace_tenant_package_body = new \FastComments\Client\Model\ReplaceTenantPackageBody(); // \FastComments\Client\Model\ReplaceTenantPackageBody
22
23
24try {
25 $result = $apiInstance->replaceTenantPackage($tenant_id, $id, $replace_tenant_package_body);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling DefaultApi->replaceTenantPackage: ', $e->getMessage(), PHP_EOL;
29}
30

更新租户套餐 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是
idstringpath是

响应

返回:APIEmptyResponse

示例

updateTenantPackage 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 配置 API 密钥授权:api_key
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// 如有需要,取消注释下面以设置 API 密钥的前缀(例如 Bearer)
10// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
11
12
13$apiInstance = new FastComments\Client\Api\DefaultApi(
14 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
15 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
16 // This is optional, `GuzzleHttp\Client` will be used as default.
17 // 这是可选的,默认使用 `GuzzleHttp\Client`。
18 new GuzzleHttp\Client(),
19 $config
20);
21
22$tenant_id = 'tenant_id_example'; // string
23$id = 'id_example'; // string
24$update_tenant_package_body = new \FastComments\Client\Model\UpdateTenantPackageBody(); // \FastComments\Client\Model\UpdateTenantPackageBody
25
26
27try {
28 $result = $apiInstance->updateTenantPackage($tenant_id, $id, $update_tenant_package_body);
29 print_r($result);
30} catch (Exception $e) {
31 echo 'Exception when calling DefaultApi->updateTenantPackage: ', $e->getMessage(), PHP_EOL;
32}
33

创建租户用户 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是

响应

返回:CreateTenantUserResponse

示例

createTenantUser 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下内容以为 API 密钥设置前缀(例如 Bearer),如果需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // 字符串
20$create_tenant_user_body = new \FastComments\Client\Model\CreateTenantUserBody(); // \FastComments\Client\Model\CreateTenantUserBody
21
22
23try {
24 $result = $apiInstance->createTenantUser($tenant_id, $create_tenant_user_body);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->createTenantUser: ', $e->getMessage(), PHP_EOL;
28}
29

删除租户用户 Internal Link

参数

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
idstringpathYes
deleteCommentsstringqueryNo
commentDeleteModestringqueryNo

响应

返回: APIEmptyResponse

示例

deleteTenantUser 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释下面以为 API 密钥设置前缀(例如 Bearer),如有需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是一项可选设置,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // 字符串
20$id = 'id_example'; // 字符串
21$options = [
22 'delete_comments' => 'delete_comments_example', // 字符串
23 'comment_delete_mode' => 'comment_delete_mode_example', // 字符串
24];
25
26
27try {
28 $result = $apiInstance->deleteTenantUser($tenant_id, $id, $options);
29 print_r($result);
30} catch (Exception $e) {
31 echo 'Exception when calling DefaultApi->deleteTenantUser: ', $e->getMessage(), PHP_EOL;
32}
33

获取租户用户 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
idstringpathYes

响应

返回: GetTenantUserResponse

示例

getTenantUser 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下代码以设置前缀 (例如 Bearer) 用于 API 密钥,如有需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果想使用自定义 HTTP 客户端,传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$id = 'id_example'; // string
21
22
23try {
24 $result = $apiInstance->getTenantUser($tenant_id, $id);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->getTenantUser: ', $e->getMessage(), PHP_EOL;
28}
29

获取租户用户列表 Internal Link

参数

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
skipnumberqueryNo

响应

返回:GetTenantUsersResponse

示例

getTenantUsers 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
14 // This is optional, `GuzzleHttp\Client` will be used as default.
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$skip = 3.4; // float
21
22
23try {
24 $result = $apiInstance->getTenantUsers($tenant_id, $skip);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->getTenantUsers: ', $e->getMessage(), PHP_EOL;
28}
29

替换租户用户 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
idstringpathYes
updateCommentsstringqueryNo

响应

返回:APIEmptyResponse

示例

replaceTenantUser 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 配置 API 密钥授权: api_key
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// 取消注释以下内容以设置前缀(例如 Bearer)用于 API 密钥,如有需要
10// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
11
12
13$apiInstance = new FastComments\Client\Api\DefaultApi(
14 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
15 // 如果你想使用自定义 http 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
16 // This is optional, `GuzzleHttp\Client` will be used as default.
17 // 这是可选的,默认使用 `GuzzleHttp\Client`。
18 new GuzzleHttp\Client(),
19 $config
20);
21
22$tenant_id = 'tenant_id_example'; // string
23// 字符串
24$id = 'id_example'; // string
25// 字符串
26$replace_tenant_user_body = new \FastComments\Client\Model\ReplaceTenantUserBody(); // \FastComments\Client\Model\ReplaceTenantUserBody
27$update_comments = 'update_comments_example'; // string
28// 字符串
29
30
31try {
32 $result = $apiInstance->replaceTenantUser($tenant_id, $id, $replace_tenant_user_body, $update_comments);
33 print_r($result);
34} catch (Exception $e) {
35 echo 'Exception when calling DefaultApi->replaceTenantUser: ', $e->getMessage(), PHP_EOL;
36}
37

参数

名称类型位置必填描述
tenantIdstringqueryYes
idstringpathYes
redirectURLstringqueryNo

响应

Returns: APIEmptyResponse

示例

sendLoginLink 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如有需要,取消注释以下代码以设置前缀(例如 Bearer)用于 API 密钥
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这都是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$id = 'id_example'; // string
21$redirect_url = 'redirect_url_example'; // string
22
23
24try {
25 $result = $apiInstance->sendLoginLink($tenant_id, $id, $redirect_url);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling DefaultApi->sendLoginLink: ', $e->getMessage(), PHP_EOL;
29}
30

更新租户用户 Internal Link

参数

名称类型位置必需描述
tenantIdstringqueryYes
idstringpathYes
updateCommentsstringqueryNo

响应

返回: APIEmptyResponse

示例

updateTenantUser 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下代码以设置前缀 (例如 Bearer) 用于 API 密钥,如有需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 http 客户端,传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$id = 'id_example'; // string
21$update_tenant_user_body = new \FastComments\Client\Model\UpdateTenantUserBody(); // \FastComments\Client\Model\UpdateTenantUserBody
22$update_comments = 'update_comments_example'; // string
23
24
25try {
26 $result = $apiInstance->updateTenantUser($tenant_id, $id, $update_tenant_user_body, $update_comments);
27 print_r($result);
28} catch (Exception $e) {
29 echo 'Exception when calling DefaultApi->updateTenantUser: ', $e->getMessage(), PHP_EOL;
30}
31

创建租户 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是

响应

返回: CreateTenantResponse

示例

createTenant 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下代码以在需要时为 API 密钥设置前缀(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 可选项,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$create_tenant_body = new \FastComments\Client\Model\CreateTenantBody(); // \FastComments\Client\Model\CreateTenantBody
21
22
23try {
24 $result = $apiInstance->createTenant($tenant_id, $create_tenant_body);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->createTenant: ', $e->getMessage(), PHP_EOL;
28}
29

删除租户 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
idstringpath是
surestringquery否

响应

返回:APIEmptyResponse

示例

deleteTenant 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7// 如有需要,取消注释以下行以设置前缀(例如 Bearer)用于 API 密钥
8// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
9
10
11$apiInstance = new FastComments\Client\Api\DefaultApi(
12 // 如果您想使用自定义 http 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
13 // 这不是必需的,默认使用 `GuzzleHttp\Client`。
14 new GuzzleHttp\Client(),
15 $config
16);
17
18$tenant_id = 'tenant_id_example'; // string
19$id = 'id_example'; // string
20$sure = 'sure_example'; // string
21
22
23try {
24 $result = $apiInstance->deleteTenant($tenant_id, $id, $sure);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->deleteTenant: ', $e->getMessage(), PHP_EOL;
28}
29

获取租户 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
idstringpathYes

响应

返回: GetTenantResponse

示例

getTenant 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
14 // This is optional, `GuzzleHttp\Client` will be used as default.
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$id = 'id_example'; // string
21
22
23try {
24 $result = $apiInstance->getTenant($tenant_id, $id);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->getTenant: ', $e->getMessage(), PHP_EOL;
28}
29

获取租户列表 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
metastringqueryNo
skipnumberqueryNo

响应

返回: GetTenantsResponse

示例

getTenants 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
14 // This is optional, `GuzzleHttp\Client` will be used as default.
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$options = [
21 'meta' => 'meta_example', // string
22 'skip' => 3.4, // float
23];
24
25
26try {
27 $result = $apiInstance->getTenants($tenant_id, $options);
28 print_r($result);
29} catch (Exception $e) {
30 echo 'Exception when calling DefaultApi->getTenants: ', $e->getMessage(), PHP_EOL;
31}
32

更新租户 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
idstringpath是

响应

返回: APIEmptyResponse

示例

updateTenant 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下行以设置前缀 (例如 Bearer) 用于 API 密钥,如有需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果你想使用自定义 HTTP 客户端,传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$id = 'id_example'; // string
21$update_tenant_body = new \FastComments\Client\Model\UpdateTenantBody(); // \FastComments\Client\Model\UpdateTenantBody
22
23
24try {
25 $result = $apiInstance->updateTenant($tenant_id, $id, $update_tenant_body);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling DefaultApi->updateTenant: ', $e->getMessage(), PHP_EOL;
29}
30

更改工单状态 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
userIdstringquery是
idstringpath是

响应

返回: ChangeTicketStateResponse

示例

changeTicketState 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下行以设置前缀(例如 Bearer)用于 API 密钥,如有需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$user_id = 'user_id_example'; // string
21$id = 'id_example'; // string
22$change_ticket_state_body = new \FastComments\Client\Model\ChangeTicketStateBody(); // \FastComments\Client\Model\ChangeTicketStateBody
23
24
25try {
26 $result = $apiInstance->changeTicketState($tenant_id, $user_id, $id, $change_ticket_state_body);
27 print_r($result);
28} catch (Exception $e) {
29 echo 'Exception when calling DefaultApi->changeTicketState: ', $e->getMessage(), PHP_EOL;
30}
31

创建工单 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
userIdstringquery是

响应

返回: CreateTicketResponse

示例

createTicket 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
14 // This is optional, `GuzzleHttp\Client` will be used as default.
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // 字符串
20$user_id = 'user_id_example'; // 字符串
21$create_ticket_body = new \FastComments\Client\Model\CreateTicketBody(); // \FastComments\Client\Model\CreateTicketBody
22
23
24try {
25 $result = $apiInstance->createTicket($tenant_id, $user_id, $create_ticket_body);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling DefaultApi->createTicket: ', $e->getMessage(), PHP_EOL;
29}
30

获取工单 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
idstringpathYes
userIdstringqueryNo

响应

返回: GetTicketResponse

示例

getTicket 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 配置 API 密钥授权:api_key
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// 如有需要,取消注释以下代码以为 API 密钥设置前缀(例如 Bearer)
10// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
11
12
13$apiInstance = new FastComments\Client\Api\DefaultApi(
14 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
15 // 如果您想使用自定义 HTTP 客户端,传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
16 // This is optional, `GuzzleHttp\Client` will be used as default.
17 // 这是可选的,默认使用 `GuzzleHttp\Client`。
18 new GuzzleHttp\Client(),
19 $config
20);
21
22$tenant_id = 'tenant_id_example'; // string
23// 字符串
24$id = 'id_example'; // string
25// 字符串
26$user_id = 'user_id_example'; // string
27// 字符串
28
29
30try {
31 $result = $apiInstance->getTicket($tenant_id, $id, $user_id);
32 print_r($result);
33} catch (Exception $e) {
34 echo 'Exception when calling DefaultApi->getTicket: ', $e->getMessage(), PHP_EOL;
35}
36

获取工单列表 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
userIdstringquery否
statenumberquery否
skipnumberquery否
limitnumberquery否

响应

Returns: GetTicketsResponse

示例

getTickets 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下行以设置前缀(例如 Bearer)用于 API 密钥,如有需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果想使用自定义 http 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端实例。
14 // 这是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$options = [
21 'user_id' => 'user_id_example', // string
22 'state' => 3.4, // float
23 'skip' => 3.4, // float
24 'limit' => 3.4, // float
25];
26
27
28try {
29 $result = $apiInstance->getTickets($tenant_id, $options);
30 print_r($result);
31} catch (Exception $e) {
32 echo 'Exception when calling DefaultApi->getTickets: ', $e->getMessage(), PHP_EOL;
33}
34

获取翻译 Internal Link

参数

名称类型位置必填描述
namespacestringpathYes
componentstringpathYes
localestringqueryNo
useFullTranslationIdsbooleanqueryNo

响应

返回: GetTranslationsResponse

示例

getTranslations 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$namespace = 'namespace_example'; // string
14$component = 'component_example'; // string
15$options = [
16 'locale' => 'locale_example', // string
17 'use_full_translation_ids' => True, // bool
18];
19
20
21try {
22 $result = $apiInstance->getTranslations($namespace, $component, $options);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling PublicApi->getTranslations: ', $e->getMessage(), PHP_EOL;
26}
27

上传图片 Internal Link

上传并调整图像大小

参数

名称类型位置必填描述
tenantIdstringpathYes
sizePresetstringqueryNo大小预设: “Default”(1000x1000px) 或 “CrossPlatform”(为常用设备创建尺寸)
urlIdstringqueryNo上传所在页面的 ID,用于配置

响应

返回: UploadImageResponse

示例

uploadImage 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$file = '/path/to/file.txt'; // \SplFileObject
15$options = [
16 'size_preset' => new \FastComments\Client\Model\\FastComments\Client\Model\SizePreset(), // \FastComments\Client\Model\SizePreset | 大小预设: \"Default\" (1000x1000px) 或 \"CrossPlatform\" (为常用设备创建尺寸)
17 'url_id' => 'url_id_example', // string | 上传所在页面的 ID,用于配置
18];
19
20
21try {
22 $result = $apiInstance->uploadImage($tenant_id, $file, $options);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling PublicApi->uploadImage: ', $e->getMessage(), PHP_EOL;
26}
27

通过 ID 获取用户徽章进度 Internal Link

参数

名称类型位置必需描述
tenantIdstringqueryYes
idstringpathYes

响应

返回:APIGetUserBadgeProgressResponse

示例

getUserBadgeProgressById 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 配置 API 密钥授权:api_key
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// 取消注释以下行以为 API 密钥设置前缀(例如 Bearer),如有需要
10// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
11
12
13$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
14
15$apiInstance = new FastComments\Client\Api\DefaultApi(
16 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
17 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
18 // This is optional, `GuzzleHttp\Client` will be used as default.
19 // 这是可选的,默认使用 `GuzzleHttp\Client`。
20 new GuzzleHttp\Client(),
21 $config
22);
23
24$tenant_id = 'tenant_id_example'; // string
25// 字符串
26$id = 'id_example'; // string
27// 字符串
28
29
30try {
31 $result = $apiInstance->getUserBadgeProgressById($tenant_id, $id);
32 print_r($result);
33} catch (Exception $e) {
34 echo 'Exception when calling DefaultApi->getUserBadgeProgressById: ', $e->getMessage(), PHP_EOL;
35}
36

通过用户 ID 获取徽章进度 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
userIdstringpath是

响应

返回:APIGetUserBadgeProgressResponse

示例

getUserBadgeProgressByUserId 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释下面以在需要时为 API 密钥设置前缀(例如 Bearer)
9/ / $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$user_id = 'user_id_example'; // string
21
22
23try {
24 $result = $apiInstance->getUserBadgeProgressByUserId($tenant_id, $user_id);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->getUserBadgeProgressByUserId: ', $e->getMessage(), PHP_EOL;
28}
29

获取用户徽章进度列表 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是
userIdstringquery否
limitnumberquery否
skipnumberquery否

响应

返回:APIGetUserBadgeProgressListResponse

示例

getUserBadgeProgressList 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释下面以设置 API 密钥的前缀(例如 Bearer),如有需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // 字符串
20$options = [
21 'user_id' => 'user_id_example', // 字符串
22 'limit' => 3.4, // 浮点数
23 'skip' => 3.4, // 浮点数
24];
25
26
27try {
28 $result = $apiInstance->getUserBadgeProgressList($tenant_id, $options);
29 print_r($result);
30} catch (Exception $e) {
31 echo 'Exception when calling DefaultApi->getUserBadgeProgressList: ', $e->getMessage(), PHP_EOL;
32}
33

创建用户徽章 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是

响应

返回: APICreateUserBadgeResponse

示例

createUserBadge 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
14 // This is optional, `GuzzleHttp\Client` will be used as default.
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$create_user_badge_params = new \FastComments\Client\Model\CreateUserBadgeParams(); // \FastComments\Client\Model\CreateUserBadgeParams
21
22
23try {
24 $result = $apiInstance->createUserBadge($tenant_id, $create_user_badge_params);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->createUserBadge: ', $e->getMessage(), PHP_EOL;
28}
29

删除用户徽章 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
idstringpath是

响应

Returns: APIEmptySuccessResponse

示例

deleteUserBadge 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
14 // This is optional, `GuzzleHttp\Client` will be used as default.
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$id = 'id_example'; // string
21
22
23try {
24 $result = $apiInstance->deleteUserBadge($tenant_id, $id);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->deleteUserBadge: ', $e->getMessage(), PHP_EOL;
28}
29

获取用户徽章 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是
idstringpath是

响应

Returns: APIGetUserBadgeResponse

示例

getUserBadge 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 配置 API 密钥授权: api_key
8$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
9// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
10// 如有需要,取消注释以下内容以设置 API 密钥的前缀(例如 Bearer)
11// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
12
13
14$apiInstance = new FastComments\Client\Api\DefaultApi(
15 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
16 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
17 // This is optional, `GuzzleHttp\Client` will be used as default.
18 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
19 new GuzzleHttp\Client(),
20 $config
21);
22
23$tenant_id = 'tenant_id_example'; // string
24$id = 'id_example'; // string
25
26
27try {
28 $result = $apiInstance->getUserBadge($tenant_id, $id);
29 print_r($result);
30} catch (Exception $e) {
31 echo 'Exception when calling DefaultApi->getUserBadge: ', $e->getMessage(), PHP_EOL;
32}
33

获取用户徽章列表 Internal Link

参数

名称类型位置必需描述
tenantIdstringqueryYes
userIdstringqueryNo
badgeIdstringqueryNo
typenumberqueryNo
displayedOnCommentsbooleanqueryNo
limitnumberqueryNo
skipnumberqueryNo

响应

返回: APIGetUserBadgesResponse

示例

getUserBadges 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下内容以在需要时为 API 密钥设置前缀(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // 字符串
20$options = [
21 'user_id' => 'user_id_example', // 字符串
22 'badge_id' => 'badge_id_example', // 字符串
23 'type' => 3.4, // 浮点数
24 'displayed_on_comments' => True, // 布尔值
25 'limit' => 3.4, // 浮点数
26 'skip' => 3.4, // 浮点数
27];
28
29
30try {
31 $result = $apiInstance->getUserBadges($tenant_id, $options);
32 print_r($result);
33} catch (Exception $e) {
34 echo 'Exception when calling DefaultApi->getUserBadges: ', $e->getMessage(), PHP_EOL;
35}
36

更新用户徽章 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
idstringpath是

响应

返回:APIEmptySuccessResponse

示例

updateUserBadge 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 配置 API 密钥授权:api_key
8$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
9// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
10// 取消注释以下代码以设置 API 密钥的前缀(例如 Bearer),如有需要
11// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
12
13
14$apiInstance = new FastComments\Client\Api\DefaultApi(
15 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
16 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
17 // This is optional, `GuzzleHttp\Client` will be used as default.
18 // 这是可选的,默认使用 `GuzzleHttp\Client`。
19 new GuzzleHttp\Client(),
20 $config
21);
22
23$tenant_id = 'tenant_id_example'; // string
24$id = 'id_example'; // string
25$update_user_badge_params = new \FastComments\Client\Model\UpdateUserBadgeParams(); // \FastComments\Client\Model\UpdateUserBadgeParams
26
27
28try {
29 $result = $apiInstance->updateUserBadge($tenant_id, $id, $update_user_badge_params);
30 print_r($result);
31} catch (Exception $e) {
32 echo 'Exception when calling DefaultApi->updateUserBadge: ', $e->getMessage(), PHP_EOL;
33}
34

获取用户通知计数 Internal Link

参数

名称类型位置必需描述
tenantIdstringqueryYes
ssostringqueryNo

响应

返回:GetUserNotificationCountResponse

示例

getUserNotificationCount 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 http 客户端,传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$sso = 'sso_example'; // string
15
16
17try {
18 $result = $apiInstance->getUserNotificationCount($tenant_id, $sso);
19 print_r($result);
20} catch (Exception $e) {
21 echo 'Exception when calling PublicApi->getUserNotificationCount: ', $e->getMessage(), PHP_EOL;
22}
23

获取用户通知 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
urlIdstringquery否用于确定当前页面是否已订阅。
pageSizeintegerquery否
afterIdstringquery否
includeContextbooleanquery否
afterCreatedAtintegerquery否
unreadOnlybooleanquery否
dmOnlybooleanquery否
noDmbooleanquery否
includeTranslationsbooleanquery否
includeTenantNotificationsbooleanquery否
ssostringquery否

响应

返回: GetMyNotificationsResponse

示例

getUserNotifications 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // 字符串
14$options = [
15 'url_id' => 'url_id_example', // 字符串 | 用于确定当前页面是否已订阅。
16 'page_size' => 56, // 整数
17 'after_id' => 'after_id_example', // 字符串
18 'include_context' => True, // 布尔
19 'after_created_at' => 56, // 整数
20 'unread_only' => True, // 布尔
21 'dm_only' => True, // 布尔
22 'no_dm' => True, // 布尔
23 'include_translations' => True, // 布尔
24 'include_tenant_notifications' => True, // 布尔
25 'sso' => 'sso_example', // 字符串
26];
27
28
29try {
30 $result = $apiInstance->getUserNotifications($tenant_id, $options);
31 print_r($result);
32} catch (Exception $e) {
33 echo 'Exception when calling PublicApi->getUserNotifications: ', $e->getMessage(), PHP_EOL;
34}
35

重置用户通知计数 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是
ssostringquery否

响应

返回:ResetUserNotificationsResponse

示例

resetUserNotificationCount 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // 字符串
14$sso = 'sso_example'; // 字符串
15
16
17try {
18 $result = $apiInstance->resetUserNotificationCount($tenant_id, $sso);
19 print_r($result);
20} catch (Exception $e) {
21 echo 'Exception when calling PublicApi->resetUserNotificationCount: ', $e->getMessage(), PHP_EOL;
22}
23

重置用户通知 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
afterIdstringquery否
afterCreatedAtintegerquery否
unreadOnlybooleanquery否
dmOnlybooleanquery否
noDmbooleanquery否
ssostringquery否

响应

返回:ResetUserNotificationsResponse

示例

resetUserNotifications 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
9 // This is optional, `GuzzleHttp\Client` will be used as default.
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$options = [
15 'after_id' => 'after_id_example', // string
16 'after_created_at' => 56, // int
17 'unread_only' => True, // bool
18 'dm_only' => True, // bool
19 'no_dm' => True, // bool
20 'sso' => 'sso_example', // string
21];
22
23
24try {
25 $result = $apiInstance->resetUserNotifications($tenant_id, $options);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling PublicApi->resetUserNotifications: ', $e->getMessage(), PHP_EOL;
29}
30

更新用户通知评论订阅状态 Internal Link

为特定评论启用或禁用通知。

参数

名称类型位置必填描述
tenantIdstring查询是
notificationIdstring路径是
optedInOrOutstring路径是
commentIdstring查询是
ssostring查询否

响应

返回:UpdateUserNotificationCommentSubscriptionStatusResponse

示例

updateUserNotificationCommentSubscriptionStatus 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果要使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // 字符串
14$notification_id = 'notification_id_example'; // 字符串
15$opted_in_or_out = 'opted_in_or_out_example'; // 字符串
16$comment_id = 'comment_id_example'; // 字符串
17$sso = 'sso_example'; // 字符串
18
19
20try {
21 $result = $apiInstance->updateUserNotificationCommentSubscriptionStatus($tenant_id, $notification_id, $opted_in_or_out, $comment_id, $sso);
22 print_r($result);
23} catch (Exception $e) {
24 echo 'Exception when calling PublicApi->updateUserNotificationCommentSubscriptionStatus: ', $e->getMessage(), PHP_EOL;
25}
26

更新用户通知页面订阅状态 Internal Link

Enable or disable notifications for a page. When users are subscribed to a page, notifications are created for new root comments, and also

参数

名称类型位置必需描述
tenantIdstringqueryYes
urlIdstringqueryYes
urlstringqueryYes
pageTitlestringqueryYes
subscribedOrUnsubscribedstringpathYes
ssostringqueryNo

响应

返回: UpdateUserNotificationPageSubscriptionStatusResponse

示例

updateUserNotificationPageSubscriptionStatus 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$url_id = 'url_id_example'; // string
15$url = 'url_example'; // string
16$page_title = 'page_title_example'; // string
17$subscribed_or_unsubscribed = 'subscribed_or_unsubscribed_example'; // string
18$sso = 'sso_example'; // string
19
20
21try {
22 $result = $apiInstance->updateUserNotificationPageSubscriptionStatus($tenant_id, $url_id, $url, $page_title, $subscribed_or_unsubscribed, $sso);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling PublicApi->updateUserNotificationPageSubscriptionStatus: ', $e->getMessage(), PHP_EOL;
26}
27

更新用户通知状态 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是
notificationIdstringpath是
newStatusstringpath是
ssostringquery否

响应

返回: UpdateUserNotificationStatusResponse

示例

updateUserNotificationStatus 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 http 客户端,传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // 字符串
14$notification_id = 'notification_id_example'; // 字符串
15$new_status = 'new_status_example'; // 字符串
16$sso = 'sso_example'; // 字符串
17
18
19try {
20 $result = $apiInstance->updateUserNotificationStatus($tenant_id, $notification_id, $new_status, $sso);
21 print_r($result);
22} catch (Exception $e) {
23 echo 'Exception when calling PublicApi->updateUserNotificationStatus: ', $e->getMessage(), PHP_EOL;
24}
25

获取用户在线状态 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是
urlIdWSstringquery是
userIdsstringquery是

响应

返回: GetUserPresenceStatusesResponse

示例

getUserPresenceStatuses 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现了 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认将使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$url_id_ws = 'url_id_ws_example'; // string
15$user_ids = 'user_ids_example'; // string
16
17
18try {
19 $result = $apiInstance->getUserPresenceStatuses($tenant_id, $url_id_ws, $user_ids);
20 print_r($result);
21} catch (Exception $e) {
22 echo 'Exception when calling PublicApi->getUserPresenceStatuses: ', $e->getMessage(), PHP_EOL;
23}
24

搜索用户 Internal Link

参数

名称类型位置必填描述
tenantIdstringpath是
urlIdstringquery是
usernameStartsWithstringquery否
mentionGroupIdsarrayquery否
ssostringquery否
searchSectionstringquery否

响应

返回: SearchUsersResult

示例

searchUsers 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
9 // 这是可选的,默认使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12
13$tenant_id = 'tenant_id_example'; // string
14$url_id = 'url_id_example'; // string
15$options = [
16 'username_starts_with' => 'username_starts_with_example', // string
17 'mention_group_ids' => array('mention_group_ids_example'), // string[]
18 'sso' => 'sso_example', // string
19 'search_section' => 'search_section_example', // string
20];
21
22
23try {
24 $result = $apiInstance->searchUsers($tenant_id, $url_id, $options);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling PublicApi->searchUsers: ', $e->getMessage(), PHP_EOL;
28}
29

获取用户 Internal Link

参数

名称类型位置必需描述
tenantIdstringquery是
idstringpath是

响应

返回:GetUserResponse

示例

getUser 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 配置 API 密钥授权:api_key
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// 取消注释以下代码以设置前缀(例如 Bearer)用于 API 密钥,如有需要
10// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
11
12
13$apiInstance = new FastComments\Client\Api\DefaultApi(
14 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
15 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
16 // This is optional, `GuzzleHttp\Client` will be used as default.
17 // 这是可选的,默认使用 `GuzzleHttp\Client`。
18 new GuzzleHttp\Client(),
19 $config
20);
21
22$tenant_id = 'tenant_id_example'; // string
23$id = 'id_example'; // string
24
25
26try {
27 $result = $apiInstance->getUser($tenant_id, $id);
28 print_r($result);
29} catch (Exception $e) {
30 echo 'Exception when calling DefaultApi->getUser: ', $e->getMessage(), PHP_EOL;
31}
32

创建投票 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
commentIdstringqueryYes
directionstringqueryYes
userIdstringqueryNo
anonUserIdstringqueryNo

响应

返回:VoteResponse

示例

createVote 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 配置 API 密钥授权: api_key
8$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
9// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
10// 取消注释以下代码以设置前缀(例如 Bearer)用于 API 密钥,如有需要
11// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
12
13
14$apiInstance = new FastComments\Client\Api\DefaultApi(
15 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
16 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
17 // This is optional, `GuzzleHttp\Client` will be used as default.
18 // 这不是必需的,默认将使用 `GuzzleHttp\Client`。
19 new GuzzleHttp\Client(),
20 $config
21);
22
23$tenant_id = 'tenant_id_example'; // string
24$comment_id = 'comment_id_example'; // string
25$direction = 'direction_example'; // string
26$options = [
27 'user_id' => 'user_id_example', // string
28 'anon_user_id' => 'anon_user_id_example', // string
29];
30
31
32try {
33 $result = $apiInstance->createVote($tenant_id, $comment_id, $direction, $options);
34 print_r($result);
35} catch (Exception $e) {
36 echo 'Exception when calling DefaultApi->createVote: ', $e->getMessage(), PHP_EOL;
37}
38

删除投票 Internal Link

参数

名称类型位置必需描述
tenantIdstringqueryYes
idstringpathYes
editKeystringqueryNo

响应

返回:VoteDeleteResponse

示例

deleteVote 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 配置 API 密钥授权:api_key
8$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
9// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
10// 如有需要,取消注释以下行以设置 API 密钥前缀(例如 Bearer)
11// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
12
13
14$apiInstance = new FastComments\Client\Api\DefaultApi(
15 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
16 // 如果您想使用自定义 HTTP 客户端,请传递实现 `GuzzleHttp\ClientInterface` 的客户端。
17 // This is optional, `GuzzleHttp\Client` will be used as default.
18 // 这是可选的,默认会使用 `GuzzleHttp\Client`。
19 new GuzzleHttp\Client(),
20 $config
21);
22
23$tenant_id = 'tenant_id_example'; // string
24$id = 'id_example'; // string
25$edit_key = 'edit_key_example'; // string
26
27
28try {
29 $result = $apiInstance->deleteVote($tenant_id, $id, $edit_key);
30 print_r($result);
31} catch (Exception $e) {
32 echo 'Exception when calling DefaultApi->deleteVote: ', $e->getMessage(), PHP_EOL;
33}
34

获取投票列表 Internal Link

参数

名称类型位置必填描述
tenantIdstringquery是
urlIdstringquery是

响应

Returns: GetVotesResponse

示例

获取投票 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下代码以设置前缀(例如 Bearer)用于 API 密钥,如有需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // string
20$url_id = 'url_id_example'; // string
21
22
23try {
24 $result = $apiInstance->getVotes($tenant_id, $url_id);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->getVotes: ', $e->getMessage(), PHP_EOL;
28}
29

获取用户投票 Internal Link

参数

名称类型位置必填描述
tenantIdstringqueryYes
urlIdstringqueryYes
userIdstringqueryNo
anonUserIdstringqueryNo

响应

返回:GetVotesForUserResponse

示例

getVotesForUser 示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 配置 API 密钥授权: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消注释以下内容以设置前缀(例如 Bearer)用于 API 密钥,如有需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自定义 HTTP 客户端,请传入实现 `GuzzleHttp\ClientInterface` 的客户端。
14 // 这是一可选的,默认使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18
19$tenant_id = 'tenant_id_example'; // 字符串
20$url_id = 'url_id_example'; // 字符串
21$options = [
22 'user_id' => 'user_id_example', // 字符串
23 'anon_user_id' => 'anon_user_id_example', // 字符串
24];
25
26
27try {
28 $result = $apiInstance->getVotesForUser($tenant_id, $url_id, $options);
29 print_r($result);
30} catch (Exception $e) {
31 echo 'Exception when calling DefaultApi->getVotesForUser: ', $e->getMessage(), PHP_EOL;
32}
33

需要帮助?

如果您在使用 PHP SDK 时遇到任何问题或有任何疑问,请:

贡献

欢迎贡献!请访问 GitHub 仓库 以查看贡献指南。