FastComments.com

FastComments 的 PHP SDK


這是 FastComments 的官方 PHP SDK。

FastComments API 的官方 PHP SDK

儲存庫

在 GitHub 上檢視


安裝與使用 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
$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $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`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$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 - 提供廣泛的即時與快速審核 API。每個 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 標頭

作者 Internal Link

support@fastcomments.com

彙總 Internal Link

Aggregates documents by grouping them (if groupBy is provided) and applying multiple operations.
不同的操作(例如 sum、countDistinct、avg 等)均受支援。

參數

名稱類型位置必需說明
tenantIdstringquery
parentTenantIdstringquery
includeStatsbooleanquery

回應

返回:AggregateResponse

示例

聚合示例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5// Configure API key authorization: api_key
6// 設定 API 金鑰授權:api_key
7
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// 取消註解以下以設定前綴(例如 Bearer)給 API 金鑰,如有需要
10$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
11// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
12// 取消註解以下以設定前綴(例如 Bearer)給 API 金鑰,如有需要
13// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
14
15
16$apiInstance = new FastComments\Client\Api\DefaultApi(
17 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
18 // 如果您想使用自訂 HTTP 客戶端,請傳入實作 `GuzzleHttp\ClientInterface` 的客戶端。
19 // This is optional, `GuzzleHttp\Client` will be used as default.
20 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
21 new GuzzleHttp\Client(),
22 $config
23);
24
25$tenant_id = 'tenant_id_example'; // string
26// 字串
27$aggregation_request = new \FastComments\Client\Model\AggregationRequest(); // \FastComments\Client\Model\AggregationRequest
28$options = [
29 'parent_tenant_id' => 'parent_tenant_id_example', // string
30 // 字串
31 'include_stats' => True, // bool
32 // 布林值
33];
34
35
36try {
37 $result = $apiInstance->aggregate($tenant_id, $aggregation_request, $options);
38 print_r($result);
39} catch (Exception $e) {
40 echo 'Exception when calling DefaultApi->aggregate: ', $e->getMessage(), PHP_EOL;
41}
42

取得稽核日誌 Internal Link

Parameters

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
limitnumberqueryNo
skipnumberqueryNo
orderstringqueryNo
afternumberqueryNo
beforenumberqueryNo

Response

返回: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'; // 字串
20$options = [
21 'limit' => 3.4, // 浮點數
22 'skip' => 3.4, // 浮點數
23 'order' => new \FastComments\Client\Model\\FastComments\Client\Model\SORTDIR(), // \FastComments\Client\Model\SORTDIR
24 'after' => 3.4, // 浮點數
25 'before' => 3.4, // 浮點數
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

參數

名稱類型位置必填說明
tenantIdstringqueryYes
commentIdstringpathYes
ssostringqueryNo

回應

返回: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'; // 字串
14$comment_id = 'comment_id_example'; // 字串
15$public_block_from_comment_params = new \FastComments\Client\Model\PublicBlockFromCommentParams(); // \FastComments\Client\Model\PublicBlockFromCommentParams
16$sso = 'sso_example'; // 字串
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

Parameters

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
commentIdsstringqueryYes以逗號分隔的評論 ID 列表。
ssostringqueryNo

Response

Returns: CheckBlockedCommentsResponse

Example

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

參數

名稱類型位置必要描述
tenantIdstringquery
idstringpath
userIdstringquery
anonUserIdstringquery

回應

返回: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// 取消註解以下以設定前綴 (例如 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$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

參數

名稱類型位置必填描述
tenantIdstringpath
urlIdstringquery
broadcastIdstringquery
sessionIdstringquery
ssostringquery

回應

返回: 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'; // 字串
14$url_id = 'url_id_example'; // 字串
15$broadcast_id = 'broadcast_id_example'; // 字串
16$comment_data = new \FastComments\Client\Model\CommentData(); // \FastComments\Client\Model\CommentData
17$options = [
18 'session_id' => 'session_id_example', // 字串
19 'sso' => 'sso_example', // 字串
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

參數

名稱類型位置必填描述
tenantIdstringquery
idstringpath
contextUserIdstringquery
isLivebooleanquery

回應

返回:DeleteCommentResult

範例

deleteComment 範例
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$id = 'id_example'; // 字串
21$options = [
22 'context_user_id' => 'context_user_id_example', // 字串
23 'is_live' => True; // 布林值
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'; // string
14$comment_id = 'comment_id_example'; // string
15$broadcast_id = 'broadcast_id_example'; // string
16$options = [
17 'edit_key' => 'edit_key_example', // string
18 'sso' => 'sso_example', // string
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

參數

名稱類型位置必填描述
tenantIdstring路徑
commentIdstring路徑
voteIdstring路徑
urlIdstring查詢
broadcastIdstring查詢
editKeystring查詢
ssostring查詢

回應

回傳: 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'; // 字串
14$comment_id = 'comment_id_example'; // 字串
15$vote_id = 'vote_id_example'; // 字串
16$url_id = 'url_id_example'; // 字串
17$broadcast_id = 'broadcast_id_example'; // 字串
18$options = [
19 'edit_key' => 'edit_key_example', // 字串
20 'sso' => 'sso_example', // 字串
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

回應

Returns: 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'; // string
20$id = 'id_example'; // string
21$options = [
22 'user_id' => 'user_id_example', // string
23 'anon_user_id' => 'anon_user_id_example', // string
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

範例

取得評論範例
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->getComment($tenant_id, $id);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->getComment: ', $e->getMessage(), PHP_EOL;
28}
29

取得留言 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'; // 字串
20$options = [
21 'page' => 56, // 整數
22 'limit' => 56, // 整數
23 'skip' => 56, // 整數
24 'as_tree' => True, // 布林
25 'skip_children' => 56, // 整數
26 'limit_children' => 56, // 整數
27 'max_tree_depth' => 56, // 整數
28 'url_id' => 'url_id_example', // 字串
29 'user_id' => 'user_id_example', // 字串
30 'anon_user_id' => 'anon_user_id_example', // 字串
31 'context_user_id' => 'context_user_id_example', // 字串
32 'hash_tag' => 'hash_tag_example', // 字串
33 'parent_id' => 'parent_id_example', // 字串
34 'direction' => new \FastComments\Client\Model\\FastComments\Client\Model\SortDirections(), // \FastComments\Client\Model\SortDirections
35 'from_date' => 56, // 整數
36 'to_date' => 56, // 整數
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

Parameters

NameTypeLocationRequiredDescription
tenantIdstringpathYes
urlIdstringqueryYes
pageintegerqueryNo
directionstringqueryNo
ssostringqueryNo
skipintegerqueryNo
skipChildrenintegerqueryNo
limitintegerqueryNo
limitChildrenintegerqueryNo
countChildrenbooleanqueryNo
fetchPageForCommentIdstringqueryNo
includeConfigbooleanqueryNo
countAllbooleanqueryNo
includei10nbooleanqueryNo
localestringqueryNo
modulesstringqueryNo
isCrawlerbooleanqueryNo
includeNotificationCountbooleanqueryNo
asTreebooleanqueryNo
maxTreeDepthintegerqueryNo
useFullTranslationIdsbooleanqueryNo
parentIdstringqueryNo
searchTextstringqueryNo
hashTagsarrayqueryNo
userIdstringqueryNo
customConfigStrstringqueryNo
afterCommentIdstringqueryNo
beforeCommentIdstringqueryNo

Response

返回:GetCommentsResponseWithPresencePublicComment

Example

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'; // 字串
14$url_id = 'url_id_example'; // 字串
15$options = [
16 'page' => 56, // 整數
17 'direction' => new \FastComments\Client\Model\\FastComments\Client\Model\SortDirections(), // \FastComments\Client\Model\SortDirections
18 'sso' => 'sso_example', // 字串
19 'skip' => 56, // 整數
20 'skip_children' => 56, // 整數
21 'limit' => 56, // 整數
22 'limit_children' => 56, // 整數
23 'count_children' => True, // 布林
24 'fetch_page_for_comment_id' => 'fetch_page_for_comment_id_example', // 字串
25 'include_config' => True, // 布林
26 'count_all' => True, // 布林
27 'includei10n' => True, // 布林
28 'locale' => 'locale_example', // 字串
29 'modules' => 'modules_example', // 字串
30 'is_crawler' => True, // 布林
31 'include_notification_count' => True, // 布林
32 'as_tree' => True, // 布林
33 'max_tree_depth' => 56, // 整數
34 'use_full_translation_ids' => True, // 布林
35 'parent_id' => 'parent_id_example', // 字串
36 'search_text' => 'search_text_example', // 字串
37 'hash_tags' => array('hash_tags_example'), // string[]
38 'user_id' => 'user_id_example', // 字串
39 'custom_config_str' => 'custom_config_str_example', // 字串
40 'after_comment_id' => 'after_comment_id_example', // 字串
41 'before_comment_id' => 'before_comment_id_example', // 字串
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

Parameters

名稱類型位置必填說明
tenantIdstringpathYes
commentIdstringpathYes
editKeystringqueryNo
ssostringqueryNo

Response

回傳: PublicAPIGetCommentTextResponse

Example

取得評論文字範例
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

參數

名稱類型位置必需說明
tenantIdstringpathYes
commentIdstringpathYes
dirintegerqueryYes
ssostringqueryNo

回應

回傳:GetCommentVoteUserNamesSuccessResponse

範例

getCommentVoteUserNames 範例
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$dir = 56; // int
16$sso = 'sso_example'; // string
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

參數

名稱類型位置必填描述
tenantIdstringpath
commentIdstringpath
broadcastIdstringquery
ssostringquery

回應

返回: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

參數

名稱類型位置必填說明
tenantIdstringpathYes
commentIdstringpathYes
broadcastIdstringqueryYes
ssostringqueryNo

回應

返回: 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'; // 字串
14$comment_id = 'comment_id_example'; // 字串
15$broadcast_id = 'broadcast_id_example'; // 字串
16$sso = 'sso_example'; // 字串
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// 取消註解以下以設定前置詞(例如 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'; // 字串
19$create_comment_params = new \FastComments\Client\Model\CreateCommentParams(); // \FastComments\Client\Model\CreateCommentParams
20$options = [
21 'is_live' => True, // 布林
22 'do_spam_check' => True, // 布林
23 'send_emails' => True, // 布林
24 'populate_notifications' => True, // 布林
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

參數

名稱類型位置必填描述
tenantIdstringquery
isLivebooleanquery
doSpamCheckbooleanquery
sendEmailsbooleanquery
populateNotificationsbooleanquery

回應

返回:SaveCommentsBulkResponse

範例

saveCommentsBulk 範例
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$create_comment_params = array(new \FastComments\Client\Model\CreateCommentParams()); // \FastComments\Client\Model\CreateCommentParams[]
24$options = [
25 'is_live' => True, // 布林
26 'do_spam_check' => True, // 布林
27 'send_emails' => True, // 布林
28 'populate_notifications' => True, // 布林
29];
30
31
32try {
33 $result = $apiInstance->saveCommentsBulk($tenant_id, $create_comment_params, $options);
34 print_r($result);
35} catch (Exception $e) {
36 echo 'Exception when calling DefaultApi->saveCommentsBulk: ', $e->getMessage(), PHP_EOL;
37}
38

設定留言文字 Internal Link


參數

名稱類型位置必填說明
tenantIdstringpathYes
commentIdstringpathYes
broadcastIdstringqueryYes
editKeystringqueryNo
ssostringqueryNo

回應

返回: 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'; // string
14$comment_id = 'comment_id_example'; // string
15$broadcast_id = 'broadcast_id_example'; // string
16$comment_text_update_request = new \FastComments\Client\Model\CommentTextUpdateRequest(); // \FastComments\Client\Model\CommentTextUpdateRequest
17$options = [
18 'edit_key' => 'edit_key_example', // string
19 'sso' => 'sso_example', // string
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// 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$un_block_from_comment_params = new \FastComments\Client\Model\UnBlockFromCommentParams(); // \FastComments\Client\Model\UnBlockFromCommentParams
25$options = [
26 'user_id' => 'user_id_example', // string
27 'anon_user_id' => 'anon_user_id_example', // string
28];
29
30
31try {
32 $result = $apiInstance->unBlockUserFromComment($tenant_id, $id, $un_block_from_comment_params, $options);
33 print_r($result);
34} catch (Exception $e) {
35 echo 'Exception when calling DefaultApi->unBlockUserFromComment: ', $e->getMessage(), PHP_EOL;
36}
37

取消檢舉留言 Internal Link

參數

名稱類型位置必填說明
tenantIdstringquery
idstringpath
userIdstringquery
anonUserIdstringquery

回應

返回: FlagCommentResponse

範例

unFlagComment 範例
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$options = [
25 'user_id' => 'user_id_example', // string
26 'anon_user_id' => 'anon_user_id_example', // string
27];
28
29
30try {
31 $result = $apiInstance->unFlagComment($tenant_id, $id, $options);
32 print_r($result);
33} catch (Exception $e) {
34 echo 'Exception when calling DefaultApi->unFlagComment: ', $e->getMessage(), PHP_EOL;
35}
36

解除鎖定留言 Internal Link

參數

名稱類型位置必填描述
tenantIdstringpathYes
commentIdstringpathYes
broadcastIdstringqueryYes
ssostringqueryNo

回應

Returns: 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'; // 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->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'; // 字串
14$comment_id = 'comment_id_example'; // 字串
15$broadcast_id = 'broadcast_id_example'; // 字串
16$sso = 'sso_example'; // 字串
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// 設定 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$id = 'id_example'; // 字串
20$updatable_comment_params = new \FastComments\Client\Model\UpdatableCommentParams(); // \FastComments\Client\Model\UpdatableCommentParams
21$options = [
22 'context_user_id' => 'context_user_id_example', // 字串
23 'do_spam_check' => True, // 布林
24 'is_live' => True, // 布林
25];
26
27
28try {
29 $result = $apiInstance->updateComment($tenant_id, $id, $updatable_comment_params, $options);
30 print_r($result);
31} catch (Exception $e) {
32 echo 'Exception when calling DefaultApi->updateComment: ', $e->getMessage(), PHP_EOL;
33}
34

對留言投票 Internal Link

參數

NameTypeLocationRequiredDescription
tenantIdstringpathYes
commentIdstringpathYes
urlIdstringqueryYes
broadcastIdstringqueryYes
sessionIdstringqueryNo
ssostringqueryNo

回應

返回: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

回應

Returns: GetCommentsForUserResponse

範例

getCommentsForUser 範例
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', // string
15 'direction' => new \FastComments\Client\Model\\FastComments\Client\Model\SortDirections(), // \FastComments\Client\Model\SortDirections
16 'replies_to_user_id' => 'replies_to_user_id_example', // string
17 'page' => 3.4, // float
18 'includei10n' => True, // bool
19 'locale' => 'locale_example', // string
20 'is_crawler' => True, // bool
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

參數

名稱類型位置必要描述
tenantIdstringqueryYes

回應

回傳: AddDomainConfigResponse

範例

addDomainConfig 範例
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$add_domain_config_params = new \FastComments\Client\Model\AddDomainConfigParams(); // \FastComments\Client\Model\AddDomainConfigParams
21
22
23try {
24 $result = $apiInstance->addDomainConfig($tenant_id, $add_domain_config_params);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->addDomainConfig: ', $e->getMessage(), PHP_EOL;
28}
29

刪除網域設定 Internal Link

參數

名稱類型位置必填描述
tenantIdstringquery
domainstringpath

回應

返回: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

參數

名稱類型位置必填說明
tenantIdstring查詢
domainstring路徑

回應

返回:GetDomainConfigResponse

範例

getDomainConfig 範例
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$domain = 'domain_example'; // 字串
21
22
23try {
24 $result = $apiInstance->getDomainConfig($tenant_id, $domain);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->getDomainConfig: ', $e->getMessage(), PHP_EOL;
28}
29

取得網域設定清單 Internal Link

參數

名稱類型位置必填說明
tenantIdstringqueryYes

回應

返回: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// 取消註解以下程式碼以設定 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
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
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'; // 字串
21$domain_to_update = 'domain_to_update_example'; // 字串
22$patch_domain_config_params = new \FastComments\Client\Model\PatchDomainConfigParams(); // \FastComments\Client\Model\PatchDomainConfigParams
23
24
25try {
26 $result = $apiInstance->patchDomainConfig($tenant_id, $domain_to_update, $patch_domain_config_params);
27 print_r($result);
28} catch (Exception $e) {
29 echo 'Exception when calling DefaultApi->patchDomainConfig: ', $e->getMessage(), PHP_EOL;
30}
31

替換網域設定 Internal Link

參數

名稱類型位置必填說明
tenantIdstringqueryYes
domainToUpdatestringpathYes

回應

返回:PutDomainConfigResponse

範例

putDomainConfig 範例
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$domain_to_update = 'domain_to_update_example'; // string
24$update_domain_config_params = new \FastComments\Client\Model\UpdateDomainConfigParams(); // \FastComments\Client\Model\UpdateDomainConfigParams
25
26
27try {
28 $result = $apiInstance->putDomainConfig($tenant_id, $domain_to_update, $update_domain_config_params);
29 print_r($result);
30} catch (Exception $e) {
31 echo 'Exception when calling DefaultApi->putDomainConfig: ', $e->getMessage(), PHP_EOL;
32}
33

建立電子郵件範本 Internal Link

參數

名稱類型位置必填描述
tenantIdstringqueryYes

回應

返回: CreateEmailTemplateResponse

範例

createEmailTemplate 範例
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_email_template_body = new \FastComments\Client\Model\CreateEmailTemplateBody(); // \FastComments\Client\Model\CreateEmailTemplateBody
21
22
23try {
24 $result = $apiInstance->createEmailTemplate($tenant_id, $create_email_template_body);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->createEmailTemplate: ', $e->getMessage(), PHP_EOL;
28}
29

刪除電子郵件範本 Internal Link

參數

名稱類型位置必填說明
tenantIdstringquery
idstringpath

回應

返回: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// 取消註解以下以設定前綴 (例如 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->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// 設定 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$error_id = 'error_id_example'; // string
22
23
24try {
25 $result = $apiInstance->deleteEmailTemplateRenderError($tenant_id, $id, $error_id);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling DefaultApi->deleteEmailTemplateRenderError: ', $e->getMessage(), PHP_EOL;
29}
30

取得電子郵件範本 Internal Link

參數

名稱類型位置必填說明
tenantIdstringquery
idstringpath

回應

Returns: 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

參數

NameTypeLocationRequiredDescription
tenantIdstringqueryYes

回應

Returns: GetEmailTemplateDefinitionsResponse

範例

getEmailTemplateDefinitions 範例
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->getEmailTemplateDefinitions($tenant_id);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling DefaultApi->getEmailTemplateDefinitions: ', $e->getMessage(), PHP_EOL;
27}
28

取得電子郵件範本渲染錯誤 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'; // 字串
20$id = 'id_example'; // 字串
21$skip = 3.4; // 浮點數
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

參數

名稱類型位置必填說明
tenantIdstringqueryYes
skipnumberqueryNo

回應

回傳:GetEmailTemplatesResponse

範例

getEmailTemplates 範例
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$skip = 3.4; // 浮點數
21
22
23try {
24 $result = $apiInstance->getEmailTemplates($tenant_id, $skip);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->getEmailTemplates: ', $e->getMessage(), PHP_EOL;
28}
29

呈現電子郵件範本 Internal Link

參數

名稱類型位置必填描述
tenantIdstringqueryYes
localestringqueryNo

回應

返回: RenderEmailTemplateResponse

範例

renderEmailTemplate 範例
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$render_email_template_body = new \FastComments\Client\Model\RenderEmailTemplateBody(); // \FastComments\Client\Model\RenderEmailTemplateBody
21$locale = 'locale_example'; // string
22
23
24try {
25 $result = $apiInstance->renderEmailTemplate($tenant_id, $render_email_template_body, $locale);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling DefaultApi->renderEmailTemplate: ', $e->getMessage(), PHP_EOL;
29}
30

更新電子郵件範本 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// 取消註解以下以設定 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_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

參數

名稱類型位置必填描述
tenantIdstringpathYes
urlIdstringqueryYes
userIdWSstringqueryYes
startTimeintegerqueryYes
endTimeintegerqueryNo

回應

返回: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

參數

名稱類型位置必填說明
tenantIdstringqueryYes
broadcastIdstringqueryNo
isLivebooleanqueryNo
doSpamCheckbooleanqueryNo
skipDupCheckbooleanqueryNo

回應

返回:CreateFeedPostsResponse

範例

createFeedPost 範例
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$create_feed_post_params = new \FastComments\Client\Model\CreateFeedPostParams(); // \FastComments\Client\Model\CreateFeedPostParams
20$options = [
21 'broadcast_id' => 'broadcast_id_example', // 字串
22 'is_live' => True, // 布林
23 'do_spam_check' => True, // 布林
24 'skip_dup_check' => True, // 布林
25];
26
27
28try {
29 $result = $apiInstance->createFeedPost($tenant_id, $create_feed_post_params, $options);
30 print_r($result);
31} catch (Exception $e) {
32 echo 'Exception when calling DefaultApi->createFeedPost: ', $e->getMessage(), PHP_EOL;
33}
34

建立公開動態貼文 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'; // string
14$create_feed_post_params = new \FastComments\Client\Model\CreateFeedPostParams(); // \FastComments\Client\Model\CreateFeedPostParams
15$options = [
16 'broadcast_id' => 'broadcast_id_example', // string
17 'sso' => 'sso_example', // string
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

參數

名稱類型位置必填描述
tenantIdstringquery
afterIdstringquery
limitintegerquery
tagsarrayquery

回應

返回: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// 取消註解以下以設定前綴 (例如 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 '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

回應

返回: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

參數

NameTypeLocationRequiredDescription
tenantIdstringpath
postIdsarrayquery
ssostringquery

回應

Returns: 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

參數

NameTypeLocationRequiredDescription
tenantIdstringpathYes
postIdsarrayqueryNo
ssostringqueryNo

回應

Returns: 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

回應

Returns: 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

參數

名稱類型位置必填描述
tenantIdstringqueryYes
idstringpathYes

回應

返回:APIEmptyResponse

範例

updateFeedPost 範例
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$feed_post = new \FastComments\Client\Model\FeedPost(); // \FastComments\Client\Model\FeedPost
21
22
23try {
24 $result = $apiInstance->updateFeedPost($tenant_id, $id, $feed_post);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->updateFeedPost: ', $e->getMessage(), PHP_EOL;
28}
29

更新公開動態貼文 Internal Link

參數

名稱類型位置必填說明
tenantIdstringpath
postIdstringpath
broadcastIdstringquery
ssostringquery

回應

返回: 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'; // 字串
14$post_id = 'post_id_example'; // 字串
15$update_feed_post_params = new \FastComments\Client\Model\UpdateFeedPostParams(); // \FastComments\Client\Model\UpdateFeedPostParams
16$options = [
17 'broadcast_id' => 'broadcast_id_example', // 字串
18 'sso' => 'sso_example', // 字串
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

參數

名稱型別位置必填描述
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

取得大型動圖 Internal Link

參數

名稱類型位置必填描述
tenantIdstringpathYes
largeInternalURLSanitizedstringqueryYes

回應

返回: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'; // string
14$large_internal_url_sanitized = 'large_internal_url_sanitized_example'; // string
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

搜尋動圖 Internal Link

參數

NameTypeLocationRequiredDescription
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'; // 字串
14$search = 'search_example'; // 字串
15$options = [
16 'locale' => 'locale_example', // 字串
17 'rating' => 'rating_example', // 字串
18 'page' => 3.4, // 浮點數
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

取得熱門動圖 Internal Link


參數

NameTypeLocationRequiredDescription
tenantIdstringpath
localestringquery
ratingstringquery
pagenumberquery

回應

回傳: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

參數

名稱類型位置必需描述
tenantIdstringqueryYes

回應

返回:CreateHashTagResponse

範例

addHashTag 範例
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$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

參數

名稱型別位置必填描述
tenantIdstringquery

回應

回傳: BulkCreateHashTagsResponse

範例

addHashTagsBulk 範例
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$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

參數

名稱類型位置必填描述
tenantIdstring查詢
tagstring路徑

回應

回傳: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'; // string
20$tag = 'tag_example'; // string
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

參數

NameTypeLocationRequiredDescription
tenantIdstringquery
pagenumberquery

回應

返回: GetHashTagsResponse

範例

getHashTags 範例
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'; // 字串
19$page = 3.4; // 浮點數
20
21
22try {
23 $result = $apiInstance->getHashTags($tenant_id, $page);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling DefaultApi->getHashTags: ', $e->getMessage(), PHP_EOL;
27}
28

部分更新標籤 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// 取消註解以下以設定 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$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'; // string
14$comment_id = 'comment_id_example'; // string
15$vote_id = 'vote_id_example'; // string
16$options = [
17 'broadcast_id' => 'broadcast_id_example', // string
18 'sso' => 'sso_example', // string
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

參數

名稱類型位置必填說明
tenantIdstringquery
pagenumberquery
countnumberquery
text-searchstringquery
byIPFromCommentstringquery
filtersstringquery
searchFiltersstringquery
sortsstringquery
demobooleanquery
ssostringquery

回應

返回: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

Parameters

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
text-searchstringqueryNo
byIPFromCommentstringqueryNo
filtersstringqueryNo
searchFiltersstringqueryNo
afterIdstringqueryNo
demobooleanqueryNo
ssostringqueryNo

Response

Returns: ModerationAPIGetCommentIdsResponse

Example

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'; // 字串
14$options = [
15 'text_search' => 'text_search_example', // 字串
16 'by_ip_from_comment' => 'by_ip_from_comment_example', // 字串
17 'filters' => 'filters_example', // 字串
18 'search_filters' => 'search_filters_example', // 字串
19 'after_id' => 'after_id_example', // 字串
20 'demo' => True, // 布林值
21 'sso' => 'sso_example', // 字串
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

參數

名稱類型位置必填說明
tenantIdstringquery
commentIdstringpath
ssostringquery

回應

回傳:GetBannedUsersFromCommentResponse

範例

getBanUsersFromComment 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\ModerationApi(
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$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

Parameters

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
commentIdstringpathYes
ssostringqueryNo

Response

Returns: GetCommentBanStatusResponse

Example

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, $sso);
20 print_r($result);
21} catch (Exception $e) {
22 echo '呼叫 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'; // string
14$comment_id = 'comment_id_example'; // string
15$sso = 'sso_example'; // string
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

參數

名稱類型位置必填說明
tenantIdstringquery
text-searchstringquery
byIPFromCommentstringquery
filterstringquery
searchFiltersstringquery
demobooleanquery
ssostringquery

回應

返回: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'; // string
14$options = [
15 'text_search' => 'text_search_example', // string
16 'by_ip_from_comment' => 'by_ip_from_comment_example', // string
17 'filter' => 'filter_example', // string
18 'search_filters' => 'search_filters_example', // string
19 'demo' => True, // bool
20 'sso' => 'sso_example', // string
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

參數

名稱型別位置必填描述
tenantIdstringqueryYes
ssostringqueryNo

回應

返回: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'; // 字串
14$sso = 'sso_example'; // 字串
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

參數

名稱類型位置必填說明
tenantIdstringquery
commentIdstringpath
ssostringquery

回應

返回: 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

參數

名稱類型位置必填描述
tenantIdstringquery
ssostringquery

回應

返回: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

範例

取得使用者手動徽章範例
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 'badges_user_id' => 'badges_user_id_example', // 字串
16 'comment_id' => 'comment_id_example', // 字串
17 'sso' => 'sso_example', // 字串
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

參數

名稱類型位置必填說明
tenantIdstringqueryYes
commentIdstringpathYes
includeEmailbooleanqueryNo
includeIPbooleanqueryNo
ssostringqueryNo

回應

回傳: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'; // 字串
14$comment_id = 'comment_id_example'; // 字串
15$options = [
16 'include_email' => True, // 布林
17 'include_ip' => True, // 布林
18 'sso' => 'sso_example', // 字串
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

回應

Returns: 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, $sio);
20 print_r($result);
21} catch (Exception $e) {
22 echo 'Exception when calling ModerationApi->getModerationCommentText: ', $e->getMessage(), PHP_EOL;
23}
24

取得預封鎖摘要 Internal Link

參數

NameTypeLocationRequiredDescription
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

參數

名稱類型位置必填描述
tenantIdstringquery
text-searchstringquery
ssostringquery

回應

返回: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'; // 字串
14$options = [
15 'text_search' => 'text_search_example', // 字串
16 'sso' => 'sso_example', // 字串
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

參數

名稱類型位置必填說明
tenantIdstringquery
valuestringquery
ssostringquery

回應

返回: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'; // 字串
14$options = [
15 'value' => 'value_example', // 字串
16 'sso' => 'sso_example', // 字串
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'; // 字串
14$sso = 'sso_example'; // 字串
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'; // 字串
14$options = [
15 'comment_id' => 'comment_id_example', // 字串
16 'sso' => 'sso_example', // 字串
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

參數

名稱類型位置必填描述
tenantIdstringqueryYes
commentIdstringpathYes
broadcastIdstringqueryNo
ssostringqueryNo

回應

返回: 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'; // 字串
14$comment_id = 'comment_id_example'; // 字串
15$adjust_comment_votes_params = new \FastComments\Client\Model\AdjustCommentVotesParams(); // \FastComments\Client\Model\AdjustCommentVotesParams
16$options = [
17 'broadcast_id' => 'broadcast_id_example', // 字串
18 'sso' => 'sso_example', // 字串
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

參數

名稱類型位置必填描述
tenantIdstringqueryYes
text-searchstringqueryNo
byIPFromCommentstringqueryNo
filtersstringqueryNo
searchFiltersstringqueryNo
sortsstringqueryNo
ssostringqueryNo

回應

回傳: 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

參數

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
commentIdstringpathYes
banEmailbooleanqueryNo
banEmailDomainbooleanqueryNo
banIPbooleanqueryNo
deleteAllUsersCommentsbooleanqueryNo
bannedUntilstringqueryNo
isShadowBanbooleanqueryNo
updateIdstringqueryNo
banReasonstringqueryNo
ssostringqueryNo

回應

Returns: 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'; // 字串
14$comment_id = 'comment_id_example'; // 字串
15$options = [
16 'ban_email' => True, // 布林值
17 'ban_email_domain' => True, // 布林值
18 'ban_ip' => True, // 布林值
19 'delete_all_users_comments' => True, // 布林值
20 'banned_until' => 'banned_until_example', // 字串
21 'is_shadow_ban' => True, // 布林值
22 'update_id' => 'update_id_example', // 字串
23 'ban_reason' => 'ban_reason_example', // 字串
24 'sso' => 'sso_example', // 字串
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// 建立 FastComments 客戶端的 ModerationApi 物件
8// 如果您想使用自訂的 HTTP 客戶端,傳入實作 `GuzzleHttp\ClientInterface` 的客戶端。
9// 這是可選的,預設會使用 `GuzzleHttp\Client`。
10$apiInstance = new FastComments\Client\Api\ModerationApi(
11 new GuzzleHttp\Client()
12);
13
14$tenant_id = 'tenant_id_example'; // string
15$ban_user_undo_params = new \FastComments\Client\Model\BanUserUndoParams(); // \FastComments\Client\Model\BanUserUndoParams
16$sso = 'sso_example'; // string
17
18
19try {
20 $result = $apiInstance->postBanUserUndo($tenant_id, $ban_user_undo_params, $sso);
21 print_r($result);
22} catch (Exception $e) {
23 echo 'Exception when calling ModerationApi->postBanUserUndo: ', $e->getMessage(), PHP_EOL;
24}
25

批次預封鎖摘要 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

參數

名稱類型位置必填說明
tenantIdstringqueryYes
commentIdstringpathYes
broadcastIdstringqueryNo
ssostringqueryNo

回應

返回: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

參數

名稱類型位置必要描述
tenantIdstringqueryYes
commentIdstringpathYes
broadcastIdstringqueryNo
ssostringqueryNo

回應

返回: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'; // 字串
14$comment_id = 'comment_id_example'; // 字串
15$options = [
16 'broadcast_id' => 'broadcast_id_example', // 字串
17 'sso' => 'sso_example', // 字串
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

參數

名稱類型位置必填說明
tenantIdstringqueryYes
commentIdstringpathYes
approvedbooleanqueryNo
broadcastIdstringqueryNo
ssostringqueryNo

回應

回傳: 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` 的 client。
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

參數

名稱類型位置必填說明
tenantIdstringqueryYes
commentIdstringpathYes
reviewedbooleanqueryNo
broadcastIdstringqueryNo
ssostringqueryNo

回應

返回: 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$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$options = [
16 'spam' => True, // 布林
17 'perm_not_spam' => True, // 布林
18 'broadcast_id' => 'broadcast_id_example', // 字串
19 'sso' => 'sso_example', // 字串
20];
21
22
23try {
24 $result = $apiInstance->postSetCommentSpamStatus($tenant_id, $comment_id, $options);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling ModerationApi->postSetCommentSpamStatus: ', $e->getMessage(), PHP_EOL;
28}
29

設定留言文字(審核) 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

回應

Returns: 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

參數

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
commentIdstringpathYes
directionstringqueryNo
broadcastIdstringqueryNo
ssostringqueryNo

回應

回傳: 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

參數

名稱類型位置必填說明
tenantIdstringqueryYes
badgeIdstringqueryYes
userIdstringqueryNo
commentIdstringqueryNo
broadcastIdstringqueryNo
ssostringqueryNo

回應

返回: 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'; // 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->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

參數

名稱類型位置必填描述
tenantIdstringqueryYes
urlIdstringqueryYes
ssostringqueryNo

回應

返回: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

參數

名稱類型位置必填說明
tenantIdstringquery
badgeIdstringquery
userIdstringquery
commentIdstringquery
broadcastIdstringquery
ssostringquery

回應

返回: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

參數

名稱類型位置必填說明
tenantIdstringquery
urlIdstringquery
ssostringquery

回應

回傳: 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'; // string
14$url_id = 'url_id_example'; // string
15$sso = 'sso_example'; // string
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'; // string
14$options = [
15 'user_id' => 'user_id_example', // string
16 'trust_factor' => 'trust_factor_example', // string
17 'sso' => 'sso_example', // string
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

Parameters

名稱類型位置必填說明
tenantIdstringquery

回應

返回: CreateModeratorResponse

範例

createModerator 範例
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_moderator_body = new \FastComments\Client\Model\CreateModeratorBody(); // \FastComments\Client\Model\CreateModeratorBody
21
22
23try {
24 $result = $apiInstance->createModerator($tenant_id, $create_moderator_body);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->createModerator: ', $e->getMessage(), PHP_EOL;
28}
29

刪除管理員 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'; // 字串
20$id = 'id_example'; // 字串
21$send_email = 'send_email_example'; // 字串
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

參數

名稱類型位置必填描述
tenantIdstringqueryYes
idstringpathYes

回應

返回:GetModeratorResponse

範例

getModerator 範例
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->getModerator($tenant_id, $id);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->getModerator: ', $e->getMessage(), PHP_EOL;
28}
29

取得管理員清單 Internal Link

參數

名稱類型位置必要說明
tenantIdstringquery
skipnumberquery

回應

Returns: 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'; // string
20$skip = 3.4; // float
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// 取消註解以下以設定前綴(例如 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$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

參數

名稱類型位置必要描述
tenantIdstringqueryYes
idstringpathYes

回應

返回: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// 取消註解以下以設定前置詞(例如 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$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

參數

名稱類型位置必填描述
tenantIdstringquery
idstringpath

回應

返回:APIEmptyResponse

示例

deleteNotificationCount 範例
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->deleteNotificationCount($tenant_id, $id);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->deleteNotificationCount: ', $e->getMessage(), PHP_EOL;
28}
29

取得快取的通知計數 Internal Link

Parameters

名稱類型位置必填描述
tenantIdstringquery
idstringpath

Response

返回: 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// 取消註解以下以設定 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->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

回應

返回:GetNotificationCountResponse

範例

getNotificationCount 範例
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 'url_id' => 'url_id_example', // string
23 'from_comment_id' => 'from_comment_id_example', // string
24 'viewed' => True, // bool
25 'type' => 'type_example', // string
26];
27
28
29try {
30 $result = $apiInstance->getNotificationCount($tenant_id, $options);
31 print_r($result);
32} catch (Exception $e) {
33 echo 'Exception when calling DefaultApi->getNotificationCount: ', $e->getMessage(), PHP_EOL;
34}
35

取得通知 Internal Link

參數

名稱類型位置必填說明
tenantIdstringqueryYes
userIdstringqueryNo
urlIdstringqueryNo
fromCommentIdstringqueryNo
viewedbooleanqueryNo
typestringqueryNo
skipnumberqueryNo

回應

返回:GetNotificationsResponse

範例

getNotifications 範例
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 'url_id' => 'url_id_example', // string
23 'from_comment_id' => 'from_comment_id_example', // string
24 'viewed' => True, // bool
25 'type' => 'type_example', // string
26 'skip' => 3.4, // float
27];
28
29
30try {
31 $result = $apiInstance->getNotifications($tenant_id, $options);
32 print_r($result);
33} catch (Exception $e) {
34 echo 'Exception when calling DefaultApi->getNotifications: ', $e->getMessage(), PHP_EOL;
35}
36

更新通知 Internal Link

參數

名稱類型位置必填描述
tenantIdstringquery
idstringpath
userIdstringquery

回應

返回:APIEmptyResponse

範例

updateNotification 範例
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$update_notification_body = new \FastComments\Client\Model\UpdateNotificationBody(); // \FastComments\Client\Model\UpdateNotificationBody
21$user_id = 'user_id_example'; // string
22
23
24try {
25 $result = $apiInstance->updateNotification($tenant_id, $id, $update_notification_body, $user_id);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling DefaultApi->updateNotification: ', $e->getMessage(), PHP_EOL;
29}
30

建立 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'; // string
14$url_id = 'url_id_example'; // string
15$title = 'title_example'; // string
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

參數

名稱類型位置必填說明
tenantIdstringpathYes
urlIdstringqueryYes
idstringqueryYes
titlestringqueryNo

回應

返回: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

參數

名稱類型位置必填描述
tenantIdstringpathYes
urlIdstringqueryYes

回傳

回傳: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'; // 字串
14$url_id = 'url_id_example'; // 字串
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

參數

名稱類型位置必填描述
tenantIdstringpathYes
urlIdstringqueryYes

回應

返回: 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'; // 字串
14$url_id = 'url_id_example'; // 字串
15$id = 'id_example'; // 字串
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// 設定 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$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'; // 字串
18$create_api_page_data = new \FastComments\Client\Model\CreateAPIPageData(); // \FastComments\Client\Model\CreateAPIPageData
19
20try {
21 $result = $apiInstance->addPage($tenant_id, $create_api_page_data);
22 print_r($result);
23} catch (Exception $e) {
24 echo 'Exception when calling DefaultApi->addPage: ', $e->getMessage(), PHP_EOL;
25}
26

刪除頁面 Internal Link

參數

名稱類型位置必填描述
tenantIdstringqueryYes
idstringpathYes

回應

返回:DeletePageAPIResponse

範例

deletePage 範例
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// 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$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
11// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
12// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
13
14
15$apiInstance = new FastComments\Client\Api\DefaultApi(
16 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
17 // This is optional, `GuzzleHttp\Client` will be used as default.
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->deletePage($tenant_id, $id);
28 print_r($result);
29} catch (Exception $e) {
30 echo 'Exception when calling DefaultApi->deletePage: ', $e->getMessage(), PHP_EOL;
31}
32

取得離線使用者 Internal Link

過去在此頁面上發表過評論,但目前不在線上的使用者。依 displayName 排序。
在使用完 /users/online 之後,使用此端點來呈現「Members」區段。
使用 commenterName 的游標分頁:伺服器從 afterName 開始,透過 $gt 向前遍歷部分 {tenantId, urlId, commenterName} 索引,無需 $skip 成本。

參數

名稱類型位置必填說明
tenantIdstringpathYes
urlIdstringqueryYes頁面 URL 識別碼(在伺服器端已清理)。
afterNamestringqueryNo游標:傳入前一次回應中的 nextAfterName。
afterUserIdstringqueryNo游標平手時的分割依據:傳入前一次回應中的 nextAfterUserId。當設定 afterName 時必填,以避免名稱相同的項目被遺失。

回應

Returns: 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

Currently-online viewers of a page: people whose websocket session is subscribed to the page right now.
已訂閱該頁面之 websocket 連線使用者,即目前線上檢視頁面的觀眾。

Returns anonCount + totalCount (room-wide subscribers, including anon viewers we don't enumerate).
返回 anonCount + totalCount(整個房間的訂閱者,包括我們不列舉的匿名檢視者)。

Parameters

NameTypeLocationRequiredDescription
tenantIdstringpathYes
urlIdstringqueryYes頁面 URL 識別碼(在伺服器端已清理)。
afterNamestringqueryNo游標:傳入先前回應中的 nextAfterName。
afterUserIdstringqueryNo游標平鋪決定者:傳入先前回應中的 nextAfterUserId。當設定 afterName 時必填,以避免因名稱相同而遺漏條目。

Response

Returns: PageUsersOnlineResponse

Example

取得線上使用者 範例
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

參數

名稱類型位置必填說明
tenantIdstringquery
urlIdstringquery

回應

回傳: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

參數

NameTypeLocationRequiredDescription
tenantIdstringquery

回應

Returns: 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// 取消註解以下以設定前綴 (例如 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
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.

參數

NameTypeLocationRequiredDescription
tenantIdstringpathYes
cursorstringqueryNo不透明的分頁游標,從先前的請求中作為 nextCursor 返回。與相同的 sortBy 相關聯。
limitintegerqueryNo1..200,預設 50
qstringqueryNo可選的大小寫不敏感的標題前綴過濾器。
sortBystringqueryNo排序方式。updatedAt(預設,最新優先),commentCount(評論數最多優先),或 title(字母順序)。
hasCommentsbooleanqueryNo若為 true,僅返回至少有一條評論的頁面。

回應

回傳: GetPublicPagesResponse

範例

getPagesPublic 範例
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 'cursor' => 'cursor_example', // 字串 | 不透明的分頁游標,從先前的請求中作為 `nextCursor` 返回。與相同的 `sortBy` 相關聯。
16 'limit' => 56, // 整數 | 1..200,預設 50
17 'q' => 'q_example', // 字串 | 可選的大小寫不敏感的標題前綴過濾器。
18 'sort_by' => new \FastComments\Client\Model\\FastComments\Client\Model\PagesSortBy(), // \FastComments\Client\Model\PagesSortBy | 排序方式。`updatedAt`(預設,最新優先),`commentCount`(評論數最多優先),或 `title`(字母順序)。
19 'has_comments' => True, // 布林值 | 若為 true,僅返回至少有一條評論的頁面。
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

Bulk user info for a tenant. Given userIds, return display info from User / SSOUser.
Used by the comment widget to enrich users that just appeared via a presence event.
No page context: privacy is enforced uniformly (private profiles are masked).

Parameters

NameTypeLocationRequiredDescription
tenantIdstringpathYes
idsstringqueryYes以逗號分隔的 userIds。

Response

返回: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

參數

名稱類型位置必填說明
tenantIdstringqueryYes
idstringpathYes

回應

返回: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'; // string
20$id = 'id_example'; // string
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

參數

名稱類型位置必填描述
tenantIdstringqueryYes
idstringpathYes

回應

Returns: APIEmptyResponse

範例

deletePendingWebhookEvent 示例
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->deletePendingWebhookEvent($tenant_id, $id);
28 print_r($result);
29} catch (Exception $e) {
30 echo 'Exception when calling DefaultApi->deletePendingWebhookEvent: ', $e->getMessage(), PHP_EOL;
31}
32

取得待處理 Webhook 事件計數 Internal Link

參數

名稱類型位置必填描述
tenantIdstringqueryYes
commentIdstringqueryNo
externalIdstringqueryNo
eventTypestringqueryNo
typestringqueryNo
domainstringqueryNo
attemptCountGTnumberqueryNo

回應

返回:GetPendingWebhookEventCountResponse

範例

取得待處理 Webhook 事件計數 範例
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 'comment_id' => 'comment_id_example', // string
22 'external_id' => 'external_id_example', // string
23 'event_type' => 'event_type_example', // string
24 'type' => 'type_example', // string
25 'domain' => 'domain_example', // string
26 'attempt_count_gt' => 3.4, // float
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// 設定 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'; // 字串
19$options = [
20 'comment_id' => 'comment_id_example', // 字串
21 'external_id' => 'external_id_example', // 字串
22 'event_type' => 'event_type_example', // 字串
23 'type' => 'type_example', // 字串
24 'domain' => 'domain_example', // 字串
25 'attempt_count_gt' => 3.4, // 浮點數
26 'skip' => 3.4, // 浮點數
27];
28
29
30try {
31 $result = $apiInstance->getPendingWebhookEvents($tenant_id, $options);
32 print_r($result);
33} catch (Exception $e) {
34 echo 'Exception when calling DefaultApi->getPendingWebhookEvents: ', $e->getMessage(), PHP_EOL;
35}
36

建立問題設定 Internal Link

參數

名稱類型位置必須描述
tenantIdstringquery

回應

Returns: CreateQuestionConfigResponse

範例

createQuestionConfig 示例
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_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

參數

NameTypeLocationRequiredDescription
tenantIdstringquery
idstringpath

回應

Returns: 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// 取消註解以下以設定前置詞 (例如 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->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

範例

getQuestionConfig 範例
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->getQuestionConfig($tenant_id, $id);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->getQuestionConfig: ', $e->getMessage(), PHP_EOL;
28}
29

取得問題設定清單 Internal Link

參數

名稱類型位置必須描述
tenantIdstringquery
skipnumberquery

回應

返回:GetQuestionConfigsResponse

範例

getQuestionConfigs 範例
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$skip = 3.4; // float
21
22
23try {
24 $result = $apiInstance->getQuestionConfigs($tenant_id, $skip);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->getQuestionConfigs: ', $e->getMessage(), PHP_EOL;
28}
29

更新問題設定 Internal Link

參數

名稱類型位置必填說明
tenantIdstringqueryYes
idstringpathYes

回應

返回: APIEmptyResponse

範例

updateQuestionConfig 範例
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_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// 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_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

參數

名稱類型位置必填描述
tenantIdstringqueryYes
idstringpathYes

回應

Returns: 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$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->deleteQuestionResult($tenant_id, $id);
29 print_r($result);
30} catch (Exception $e) {
31 echo 'Exception when calling DefaultApi->deleteQuestionResult: ', $e->getMessage(), PHP_EOL;
32}
33

取得問題結果 Internal Link

參數

名稱類型位置必填說明
tenantIdstringquery
idstringpath

回應

返回:GetQuestionResultResponse

範例

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

參數

名稱類型位置必需描述
tenantIdstringqueryYes
urlIdstringqueryNo
userIdstringqueryNo
startDatestringqueryNo
questionIdstringqueryNo
questionIdsstringqueryNo
skipnumberqueryNo

回應

返回:GetQuestionResultsResponse

範例

getQuestionResults 範例
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 'url_id' => 'url_id_example', // string
22 'user_id' => 'user_id_example', // string
23 'start_date' => 'start_date_example', // string
24 'question_id' => 'question_id_example', // string
25 'question_ids' => 'question_ids_example', // string
26 'skip' => 3.4, // float
27];
28
29
30try {
31 $result = $apiInstance->getQuestionResults($tenant_id, $options);
32 print_r($result);
33} catch (Exception $e) {
34 echo 'Exception when calling DefaultApi->getQuestionResults: ', $e->getMessage(), PHP_EOL;
35}
36

更新問題結果 Internal Link

參數

名稱類型位置必需說明
tenantIdstringqueryYes
idstringpathYes

回應

返回:APIEmptyResponse

範例

updateQuestionResult 範例
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_result_body = new \FastComments\Client\Model\UpdateQuestionResultBody(); // \FastComments\Client\Model\UpdateQuestionResultBody
22
23
24try {
25 $result = $apiInstance->updateQuestionResult($tenant_id, $id, $update_question_result_body);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling DefaultApi->updateQuestionResult: ', $e->getMessage(), PHP_EOL;
29}
30

彙總問題結果 Internal Link

參數

名稱型別位置必填說明
tenantIdstringqueryYes
questionIdstringqueryNo
questionIdsarrayqueryNo
urlIdstringqueryNo
timeBucketstringqueryNo
startDatestringqueryNo
forceRecalculatebooleanqueryNo

回應

返回: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// 如有需要,取消註解以下行以設定 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', // 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

Parameters

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
questionIdstringqueryNo
questionIdsarrayqueryNo
urlIdstringqueryNo
startDatestringqueryNo
forceRecalculatebooleanqueryNo
minValuenumberqueryNo
maxValuenumberqueryNo
limitnumberqueryNo

Response

Returns: CombineQuestionResultsWithCommentsResponse

Example

combineCommentsWithQuestionResults 範例
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 'question_id' => 'question_id_example', // string
21 'question_ids' => array('question_ids_example'), // string[]
22 'url_id' => 'url_id_example', // string
23 'start_date' => new \DateTime('2013-10-20T19:20:30+01:00'), // \DateTime
24 'force_recalculate' => True, // bool
25 'min_value' => 3.4, // float
26 'max_value' => 3.4, // float
27 'limit' => 3.4, // float
28];
29
30
31try {
32 $result = $apiInstance->combineCommentsWithQuestionResults($tenant_id, $options);
33 print_r($result);
34} catch (Exception $e) {
35 echo 'Exception when calling DefaultApi->combineCommentsWithQuestionResults: ', $e->getMessage(), PHP_EOL;
36}
37

新增 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'; // 字串
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

參數

名稱類型位置必填說明
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// 取消註解以下程式碼以設定 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 'delete_comments' => True, // bool
23 'comment_delete_mode' => 'comment_delete_mode_example', // string
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

Parameters

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
emailstringpathYes

Response

返回:GetSSOUserByEmailAPIResponse

範例

getSSOUserByEmail 示例
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$email = 'email_example'; // string
24
25
26try {
27 $result = $apiInstance->getSSOUserByEmail($tenant_id, $email);
28 print_r($result);
29} catch (Exception $e) {
30 echo 'Exception when calling DefaultApi->getSSOUserByEmail: ', $e->getMessage(), PHP_EOL;
31}
32

以 ID 取得 SSO 使用者 Internal Link

參數

名稱類型位置必填描述
tenantIdstringqueryYes
idstringpathYes

回應

返回: GetSSOUserByIdAPIResponse

範例

getSSOUserById 範例
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->getSSOUserById($tenant_id, $id);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->getSSOUserById: ', $e->getMessage(), PHP_EOL;
28}
29

取得 SSO 使用者 Internal Link

參數

名稱類型位置必填說明
tenantIdstringqueryYes
skipintegerqueryNo

回應

Returns: GetSSOUsersResponse

範例

getSSOUsers 範例
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$skip = 56; // int
20
21
22try {
23 $result = $apiInstance->getSSOUsers($tenant_id, $skip);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling DefaultApi->getSSOUsers: ', $e->getMessage(), PHP_EOL;
27}
28

部分更新 SSO 使用者 Internal Link

參數

名稱型別位置必填說明
tenantIdstringquery
idstringpath
updateCommentsbooleanquery

回應

返回:PatchSSOUserAPIResponse

範例

patchSSOUser 範例
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_apisso_user_data = new \FastComments\Client\Model\UpdateAPISSOUserData(); // \FastComments\Client\Model\UpdateAPISSOUserData
22$update_comments = True; // bool
23
24
25try {
26 $result = $apiInstance->patchSSOUser($tenant_id, $id, $update_apisso_user_data, $update_comments);
27 print_r($result);
28} catch (Exception $e) {
29 echo 'Exception when calling DefaultApi->patchSSOUser: ', $e->getMessage(), PHP_EOL;
30}
31

替換 SSO 使用者 Internal Link

參數

名稱類型位置必填描述
tenantIdstringqueryYes
idstringpathYes
updateCommentsbooleanqueryNo

回應

返回: PutSSOUserAPIResponse

範例

putSSOUser 範例
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$update_apisso_user_data = new \FastComments\Client\Model\UpdateAPISSOUserData(); // \FastComments\Client\Model\UpdateAPISSOUserData
21$update_comments = True; // bool
22
23
24try {
25 $result = $apiInstance->putSSOUser($tenant_id, $id, $update_apisso_user_data, $update_comments);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling DefaultApi->putSSOUser: ', $e->getMessage(), PHP_EOL;
29}
30

建立訂閱 Internal Link


參數

NameTypeLocationRequiredDescription
tenantIdstringqueryYes

回應

返回: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'; // string
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

參數

名稱類型位置必填說明
tenantIdstringqueryYes
idstringpathYes
userIdstringqueryNo

回應

Returns: DeleteSubscriptionAPIResponse

範例

deleteSubscription 範例
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$user_id = 'user_id_example'; // string
22
23
24try {
25 $result = $apiInstance->deleteSubscription($tenant_id, $id, $user_id);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling DefaultApi->deleteSubscription: ', $e->getMessage(), PHP_EOL;
29}
30

取得訂閱 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$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
22
23try {
24 $result = $apiInstance->getSubscriptions($tenant_id, $user_id);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->getSubscriptions: ', $e->getMessage(), PHP_EOL;
28}
29

更新訂閱 Internal Link

Parameters

名稱類型位置必填說明
tenantIdstringqueryYes
idstringpathYes
userIdstringqueryNo

Response

Returns: UpdateSubscriptionAPIResponse

Example

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'; // 字串
20$id = 'id_example'; // 字串
21$update_api_user_subscription_data = new \FastComments\Client\Model\UpdateAPIUserSubscriptionData(); // \FastComments\Client\Model\UpdateAPIUserSubscriptionData
22$user_id = 'user_id_example'; // 字串
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

回應

Returns: GetTenantDailyUsagesResponse

範例

getTenantDailyUsages 範例
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$options = [
21 'year_number' => 3.4, // 浮點數
22 'month_number' => 3.4, // 浮點數
23 'day_number' => 3.4, // 浮點數
24 'skip' => 3.4, // 浮點數
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

參數

名稱類型位置必填說明
tenantIdstringquery

回應

返回: 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'; // 字串
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

參數

名稱類型位置必填說明
tenantIdstringquery
idstringpath

回應

返回: 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// 如有需要,取消註解以下以設定 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->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

參數

NameTypeLocationRequiredDescription
tenantIdstringquery
idstringpath

回應

Returns: 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'; // 字串
20$id = 'id_example'; // 字串
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

參數

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
skipnumberqueryNo

回應

返回:GetTenantPackagesResponse

範例

getTenantPackages 範例
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$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

Parameters

名稱類型位置必填說明
tenantIdstringquery
idstringpath

Response

回傳:APIEmptyResponse

範例

replaceTenantPackage 範例
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$replace_tenant_package_body = new \FastComments\Client\Model\ReplaceTenantPackageBody(); // \FastComments\Client\Model\ReplaceTenantPackageBody
21
22
23try {
24 $result = $apiInstance->replaceTenantPackage($tenant_id, $id, $replace_tenant_package_body);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->replaceTenantPackage: ', $e->getMessage(), PHP_EOL;
28}
29

更新租戶方案 Internal Link

參數

名稱類型位置必填描述
tenantIdstringqueryYes
idstringpathYes

回應

返回:APIEmptyResponse

範例

updateTenantPackage 範例
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$update_tenant_package_body = new \FastComments\Client\Model\UpdateTenantPackageBody(); // \FastComments\Client\Model\UpdateTenantPackageBody
21
22
23try {
24 $result = $apiInstance->updateTenantPackage($tenant_id, $id, $update_tenant_package_body);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->updateTenantPackage: ', $e->getMessage(), PHP_EOL;
28}
29

建立租戶使用者 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'; // string
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

參數

名稱類型位置必填描述
tenantIdstringquery
idstringpath
deleteCommentsstringquery
commentDeleteModestringquery

回應

返回:APIEmptyResponse

範例

deleteTenantUser 範例
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$options = [
25 'delete_comments' => 'delete_comments_example', // string
26 'comment_delete_mode' => 'comment_delete_mode_example', // string
27];
28
29
30try {
31 $result = $apiInstance->deleteTenantUser($tenant_id, $id, $options);
32 print_r($result);
33} catch (Exception $e) {
34 echo 'Exception when calling DefaultApi->deleteTenantUser: ', $e->getMessage(), PHP_EOL;
35}
36

取得租戶使用者 Internal Link

參數

名稱類型位置必填說明
tenantIdstringquery
idstringpath

回應

返回: 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// 取消註解以下內容以設定 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->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

參數

名稱類型位置必填描述
tenantIdstringquery
skipnumberquery

回應

返回:GetTenantUsersResponse

範例

getTenantUsers 範例
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$skip = 3.4; // 浮點數
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

參數

名稱類型位置必填說明
tenantIdstringquery
idstringpath
updateCommentsstringquery

回應

Returns: 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

回應

回傳: APIEmptyResponse

範例

sendLoginLink 範例
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$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// 取消註解以下以設定 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_tenant_user_body = new \FastComments\Client\Model\UpdateTenantUserBody(); // \FastComments\Client\Model\UpdateTenantUserBody
22$update_comments = 'update_comments_example'; // 字串
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

Parameters

NameTypeLocationRequiredDescription
tenantIdstringqueryYes

Response

Returns: 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// 如果想使用自訂 HTTP 客戶端,傳入實作 `GuzzleHttp\ClientInterface` 的客戶端。
9// 這是可選的,預設會使用 `GuzzleHttp\Client`。
10
11$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
12// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
13
14
15$apiInstance = new FastComments\Client\Api\DefaultApi(
16 // 如果想使用自訂 HTTP 客戶端,傳入實作 `GuzzleHttp\ClientInterface` 的客戶端。
17 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
18 new GuzzleHttp\Client(),
19 $config
20);
21
22$tenant_id = 'tenant_id_example'; // string
23$id = 'id_example'; // string
24$sure = 'sure_example'; // string
25
26
27try {
28 $result = $apiInstance->deleteTenant($tenant_id, $id, $sure);
29 print_r($result);
30} catch (Exception $e) {
31 echo 'Exception when calling DefaultApi->deleteTenant: ', $e->getMessage(), PHP_EOL;
32}
33

取得租戶 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'; // 字串
20$id = 'id_example'; // 字串
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

參數

名稱類型位置必要說明
tenantIdstringquery
metastringquery
skipnumberquery

回應

返回:GetTenantsResponse

範例

getTenants 範例
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 'meta' => 'meta_example', // 字串
22 'skip' => 3.4, // 浮點數
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// 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_body = new \FastComments\Client\Model\UpdateTenantBody(); // \FastComments\Client\Model\UpdateTenantBody
25
26
27try {
28 $result = $apiInstance->updateTenant($tenant_id, $id, $update_tenant_body);
29 print_r($result);
30} catch (Exception $e) {
31 echo 'Exception when calling DefaultApi->updateTenant: ', $e->getMessage(), PHP_EOL;
32}
33

變更工單狀態 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// 取消註解以下以設定 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$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

參數

名稱類型位置必填說明
tenantIdstringqueryYes
userIdstringqueryYes

回應

回傳:CreateTicketResponse

範例

createTicket 範例
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$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

回應

Returns: 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$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$user_id = 'user_id_example'; // string
26
27
28try {
29 $result = $apiInstance->getTicket($tenant_id, $id, $user_id);
30 print_r($result);
31} catch (Exception $e) {
32 echo 'Exception when calling DefaultApi->getTicket: ', $e->getMessage(), PHP_EOL;
33}
34

取得工單清單 Internal Link

參數

名稱類型位置必填描述
tenantIdstringquery
userIdstringquery
statenumberquery
skipnumberquery
limitnumberquery

回應

返回: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// 取消註解以下以設定 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 'state' => 3.4, // 浮點數
23 'skip' => 3.4, // 浮點數
24 'limit' => 3.4, // 浮點數
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

Parameters

NameTypeLocationRequiredDescription
namespacestringpathYes
componentstringpathYes
localestringqueryNo
useFullTranslationIdsbooleanqueryNo

Response

Returns: GetTranslationsResponse

Example

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'; // 字串
14$component = 'component_example'; // 字串
15$options = [
16 'locale' => 'locale_example', // 字串
17 'use_full_translation_ids' => True, // 布林值
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

上傳並調整圖像尺寸

Parameters

NameTypeLocationRequiredDescription
tenantIdstringpathYes
sizePresetstringqueryNo尺寸預設:"Default" (1000x1000px) 或 "CrossPlatform" (為流行設備建立尺寸)
urlIdstringqueryNo上傳發生的頁面 ID,用於配置

Response

Returns: UploadImageResponse

Example

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

參數

名稱類型位置必填描述
tenantIdstringquery
idstringpath

回應

返回: APIGetUserBadgeProgressResponse

範例

getUserBadgeProgressById 範例
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'; // 字串
19$id = 'id_example'; // 字串
20
21
22try {
23 $result = $apiInstance->getUserBadgeProgressById($tenant_id, $id);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling DefaultApi->getUserBadgeProgressById: ', $e->getMessage(), PHP_EOL;
27}
28

以使用者 ID 取得使用者徽章進度 Internal Link

參數

名稱類型位置必填描述
tenantIdstringquery
userIdstringpath

回應

返回:APIGetUserBadgeProgressResponse

範例

getUserBadgeProgressByUserId 範例
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'; // 字串
24$user_id = 'user_id_example'; // 字串
25
26
27try {
28 $result = $apiInstance->getUserBadgeProgressByUserId($tenant_id, $user_id);
29 print_r($result);
30} catch (Exception $e) {
31 echo 'Exception when calling DefaultApi->getUserBadgeProgressByUserId: ', $e->getMessage(), PHP_EOL;
32}
33

取得使用者徽章進度清單 Internal Link

參數

名稱類型位置必填描述
tenantIdstringqueryYes
userIdstringqueryNo
limitnumberqueryNo
skipnumberqueryNo

回應

返回:APIGetUserBadgeProgressListResponse

範例

getUserBadgeProgressList 範例
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$options = [
25 'user_id' => 'user_id_example', // string
26 // 字串
27 'limit' => 3.4, // float
28 // 浮點數
29 'skip' => 3.4, // float
30 // 浮點數
31];
32
33
34try {
35 $result = $apiInstance->getUserBadgeProgressList($tenant_id, $options);
36 print_r($result);
37} catch (Exception $e) {
38 echo 'Exception when calling DefaultApi->getUserBadgeProgressList: ', $e->getMessage(), PHP_EOL;
39}
40

建立使用者徽章 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

參數

名稱類型位置必填說明
tenantIdstringqueryYes
idstringpathYes

回應

返回:APIEmptySuccessResponse

範例

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

回應

返回: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// 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->getUserBadge($tenant_id, $id);
30 print_r($result);
31} catch (Exception $e) {
32 echo 'Exception when calling DefaultApi->getUserBadge: ', $e->getMessage(), PHP_EOL;
33}
34

取得使用者徽章清單 Internal Link

參數

名稱類型位置必填說明
tenantIdstringqueryYes
userIdstringqueryNo
badgeIdstringqueryNo
typenumberqueryNo
displayedOnCommentsbooleanqueryNo
limitnumberqueryNo
skipnumberqueryNo

回應

回傳:APIGetUserBadgesResponse

範例

取得使用者徽章範例
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
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
14 // 如果您想使用自訂的 HTTP 客戶端,傳入實作 `GuzzleHttp\ClientInterface` 的客戶端。
15 // This is optional, `GuzzleHttp\Client` will be used as default.
16 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
17 new GuzzleHttp\Client(),
18 $config
19);
20
21$tenant_id = 'tenant_id_example'; // string
22$options = [
23 'user_id' => 'user_id_example', // string
24 'badge_id' => 'badge_id_example', // string
25 'type' => 3.4, // float
26 'displayed_on_comments' => True, // bool
27 'limit' => 3.4, // float
28 'skip' => 3.4, // float
29];
30
31
32try {
33 $result = $apiInstance->getUserBadges($tenant_id, $options);
34 print_r($result);
35} catch (Exception $e) {
36 echo 'Exception when calling DefaultApi->getUserBadges: ', $e->getMessage(), PHP_EOL;
37}
38

更新使用者徽章 Internal Link

參數

名稱類型位置必填描述
tenantIdstringqueryYes
idstringpathYes

回應

返回:APIEmptySuccessResponse

範例

updateUserBadge 範例
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_user_badge_params = new \FastComments\Client\Model\UpdateUserBadgeParams(); // \FastComments\Client\Model\UpdateUserBadgeParams
22
23
24try {
25 $result = $apiInstance->updateUserBadge($tenant_id, $id, $update_user_badge_params);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling DefaultApi->updateUserBadge: ', $e->getMessage(), PHP_EOL;
29}
30

取得使用者通知計數 Internal Link

參數

名稱類型位置必填描述
tenantIdstringquery
ssostringquery

回應

返回: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

參數

名稱類型位置必填描述
tenantIdstringqueryYes
urlIdstringqueryNo用於判斷當前頁面是否已訂閱。
pageSizeintegerqueryNo
afterIdstringqueryNo
includeContextbooleanqueryNo
afterCreatedAtintegerqueryNo
unreadOnlybooleanqueryNo
dmOnlybooleanqueryNo
noDmbooleanqueryNo
includeTranslationsbooleanqueryNo
includeTenantNotificationsbooleanqueryNo
ssostringqueryNo

回應

返回: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'; // string
14$options = [
15 'url_id' => 'url_id_example', // string | 用於判斷當前頁面是否已訂閱。
16 'page_size' => 56, // int
17 'after_id' => 'after_id_example', // string
18 'include_context' => True, // bool
19 'after_created_at' => 56, // int
20 'unread_only' => True, // bool
21 'dm_only' => True, // bool
22 'no_dm' => True, // bool
23 'include_translations' => True, // bool
24 'include_tenant_notifications' => True, // bool
25 'sso' => 'sso_example', // string
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

參數

名稱類型位置必填描述
tenantIdstringqueryYes
ssostringqueryNo

回應

Returns: 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'; // string
14$sso = 'sso_example'; // string
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

參數

名稱類型位置必填說明
tenantIdstringqueryYes
afterIdstringqueryNo
afterCreatedAtintegerqueryNo
unreadOnlybooleanqueryNo
dmOnlybooleanqueryNo
noDmbooleanqueryNo
ssostringqueryNo

回應

回傳:ResetUserNotificationsResponse

範例

resetUserNotifications 範例
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 'after_created_at' => 56, // 整數
17 'unread_only' => True, // 布林
18 'dm_only' => True, // 布林
19 'no_dm' => True, // 布林
20 'sso' => 'sso_example', // 字串
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

Enable or disable notifications for a specific comment.

參數

名稱類型位置必填說明
tenantIdstringqueryYes
notificationIdstringpathYes
optedInOrOutstringpathYes
commentIdstringqueryYes
ssostringqueryNo

回應

返回: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

Parameters

名稱類型位置必填描述
tenantIdstringqueryYes
urlIdstringqueryYes
urlstringqueryYes
pageTitlestringqueryYes
subscribedOrUnsubscribedstringpathYes
ssostringqueryNo

Response

Returns: UpdateUserNotificationPageSubscriptionStatusResponse

Example

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

參數

名稱類型位置必填描述
tenantIdstringqueryYes
notificationIdstringpathYes
newStatusstringpathYes
ssostringqueryNo

回應

返回: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'; // string
14$notification_id = 'notification_id_example'; // string
15$new_status = 'new_status_example'; // string
16$sso = 'sso_example'; // string
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

參數

名稱類型位置必須說明
tenantIdstringqueryYes
urlIdWSstringqueryYes
userIdsstringqueryYes

回應

返回: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

參數

名稱類型位置必填描述
tenantIdstringpathYes
urlIdstringqueryYes
usernameStartsWithstringqueryNo
mentionGroupIdsarrayqueryNo
ssostringqueryNo
searchSectionstringqueryNo

回應

Returns: 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'; // 字串
14$url_id = 'url_id_example'; // 字串
15$options = [
16 'username_starts_with' => 'username_starts_with_example', // 字串
17 'mention_group_ids' => array('mention_group_ids_example'), // 字串[]
18 'sso' => 'sso_example', // 字串
19 'search_section' => 'search_section_example', // 字串
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

參數

名稱類型位置必填說明
tenantIdstringqueryYes
idstringpathYes

回應

返回: GetUserResponse

範例

getUser 範例
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->getUser($tenant_id, $id);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->getUser: ', $e->getMessage(), PHP_EOL;
28}
29

建立投票 Internal Link

參數

名稱類型位置必填說明
tenantIdstringquery
commentIdstringquery
directionstringquery
userIdstringquery
anonUserIdstringquery

回應

返回: VoteResponse

範例

createVote 範例
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$comment_id = 'comment_id_example'; // 字串
21$direction = 'direction_example'; // 字串
22$options = [
23 'user_id' => 'user_id_example', // 字串
24 'anon_user_id' => 'anon_user_id_example', // 字串
25];
26
27
28try {
29 $result = $apiInstance->createVote($tenant_id, $comment_id, $direction, $options);
30 print_r($result);
31} catch (Exception $e) {
32 echo 'Exception when calling DefaultApi->createVote: ', $e->getMessage(), PHP_EOL;
33}
34

刪除投票 Internal Link

參數

名稱類型位置必填描述
tenantIdstringquery
idstringpath
editKeystringquery

回應

回傳:VoteDeleteResponse

範例

deleteVote 範例
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$edit_key = 'edit_key_example'; // string
22
23
24try {
25 $result = $apiInstance->deleteVote($tenant_id, $id, $edit_key);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling DefaultApi->deleteVote: ', $e->getMessage(), PHP_EOL;
29}
30

取得投票 Internal Link

Parameters

NameTypeLocationRequiredDescription
tenantIdstringqueryYes
urlIdstringqueryYes

Response

Returns: GetVotesResponse

Example

getVotes 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key // 設定 API 金鑰授權:api_key
7// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // 取消註解以下以設定 API 金鑰的前綴(例如 Bearer),如有需要
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`. // 如果您想使用自訂的 HTTP 客戶端,傳入實作 `GuzzleHttp\ClientInterface` 的客戶端。
13 // This is optional, `GuzzleHttp\Client` will be used as default. // 這是可選的,預設會使用 `GuzzleHttp\Client`。
14 new GuzzleHttp\Client(),
15 $config
16);
17
18$tenant_id = 'tenant_id_example'; // string // 字串
19$url_id = 'url_id_example'; // string // 字串
20
21
22try {
23 $result = $apiInstance->getVotes($tenant_id, $url_id);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling DefaultApi->getVotes: ', $e->getMessage(), PHP_EOL;
27}
28

取得使用者的投票 Internal Link

參數

名稱類型位置必填說明
tenantIdstringquery
urlIdstringquery
userIdstringquery
anonUserIdstringquery

回應

回傳: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// 如有需要,取消註解以下以設定 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$options = [
22 'user_id' => 'user_id_example', // string
23 'anon_user_id' => 'anon_user_id_example', // string
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 儲存庫 以查看貢獻指南。