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
// 設定 API 金鑰授權: api_key
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// 若需要,取消註解下方以設定 API 金鑰的前綴(例如 Bearer)
// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');


$apiInstance = new FastComments\Client\Api\DefaultApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // 如果您想使用自訂的 HTTP 用戶端,請傳入實作了 `GuzzleHttp\ClientInterface` 的用戶端。
    // This is optional, `GuzzleHttp\Client` will be used as default.
    // 這是可選的,預設會使用 `GuzzleHttp\Client`。
    new GuzzleHttp\Client(),
    $config
);
$tenant_id = 'tenant_id_example'; // string
$tenant_id = 'tenant_id_example'; // 字串
$add_domain_config_params = new \FastComments\Client\Model\AddDomainConfigParams(); // \FastComments\Client\Model\AddDomainConfigParams

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

模型 Internal Link



授權 Internal Link


此 API 定義的驗證機制:

api_key

  • 類型: API 金鑰
  • API 金鑰參數名稱: x-api-key
  • 位置: HTTP 標頭

作者 Internal Link

support@fastcomments.com

彙總 Internal Link

透過分組(若提供 groupBy)並套用多個操作來彙總文件。支援不同的操作(例如 sum、countDistinct、avg 等)。

參數

Name Type Location Required Description
tenantId string query Yes
parentTenantId string query No
includeStats boolean query No

回應

回傳: AggregationResponse

範例

aggregate 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: 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 // 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$tenant_id = 'tenant_id_example'; // string
20$aggregation_request = new \FastComments\Client\Model\AggregationRequest(); // \FastComments\Client\Model\AggregationRequest
21$parent_tenant_id = 'parent_tenant_id_example'; // string
22$include_stats = True; // bool
23
24try {
25 $result = $apiInstance->aggregate($tenant_id, $aggregation_request, $parent_tenant_id, $include_stats);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling DefaultApi->aggregate: ', $e->getMessage(), PHP_EOL;
29}
30

取得稽核日誌 Internal Link

參數

Name Type Location Required Description
tenantId string query
limit number query
skip number query
order string query
after number query
before number query

回應

回傳: GetAuditLogs200Response

範例

getAuditLogs 範例
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$tenant_id = 'tenant_id_example'; // string
19$limit = 3.4; // float
20$skip = 3.4; // float
21$order = new \FastComments\Client\Model\\FastComments\Client\Model\SORTDIR(); // \FastComments\Client\Model\SORTDIR
22$after = 3.4; // float
23$before = 3.4; // float
24
25try {
26 $result = $apiInstance->getAuditLogs($tenant_id, $limit, $skip, $order, $after, $before);
27 print_r($result);
28} catch (Exception $e) {
29 echo 'Exception when calling DefaultApi->getAuditLogs: ', $e->getMessage(), PHP_EOL;
30}
31

封鎖公開評論 Internal Link

參數

Name Type Location Required Description
tenantId string query
commentId string path
sso string query

回應

回傳: BlockFromCommentPublic200Response

範例

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$tenant_id = 'tenant_id_example'; // 字串
13$comment_id = 'comment_id_example'; // 字串
14$public_block_from_comment_params = new \FastComments\Client\Model\PublicBlockFromCommentParams(); // \FastComments\Client\Model\PublicBlockFromCommentParams
15$sso = 'sso_example'; // 字串
16
17try {
18 $result = $apiInstance->blockFromCommentPublic($tenant_id, $comment_id, $public_block_from_comment_params, $sso);
19 print_r($result);
20} catch (Exception $e) {
21 echo 'Exception when calling PublicApi->blockFromCommentPublic: ', $e->getMessage(), PHP_EOL;
22}
23

取消封鎖公開評論 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string query
commentId string path
sso string query

回應

回傳: UnBlockCommentPublic200Response

範例

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$tenant_id = 'tenant_id_example'; // string
13$comment_id = 'comment_id_example'; // string
14$public_block_from_comment_params = new \FastComments\Client\Model\PublicBlockFromCommentParams(); // \FastComments\Client\Model\PublicBlockFromCommentParams
15$sso = 'sso_example'; // string
16
17try {
18 $result = $apiInstance->unBlockCommentPublic($tenant_id, $comment_id, $public_block_from_comment_params, $sso);
19 print_r($result);
20} catch (Exception $e) {
21 echo 'Exception when calling PublicApi->unBlockCommentPublic: ', $e->getMessage(), PHP_EOL;
22}
23

檢查被封鎖的評論 Internal Link

參數

Name Type Location Required Description
tenantId string query Yes
commentIds string query Yes 由逗號分隔的評論 ID 列表。
sso string query No

回應

回傳: CheckedCommentsForBlocked200Response

範例

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$tenant_id = 'tenant_id_example'; // 字串
13$comment_ids = 'comment_ids_example'; // string | 由逗號分隔的評論 ID 列表。
14$sso = 'sso_example'; // 字串
15
16try {
17 $result = $apiInstance->checkedCommentsForBlocked($tenant_id, $comment_ids, $sso);
18 print_r($result);
19} catch (Exception $e) {
20 echo 'Exception when calling PublicApi->checkedCommentsForBlocked: ', $e->getMessage(), PHP_EOL;
21}
22

封鎖評論使用者 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string query
id string path
userId string query
anonUserId string query

回應

回傳: BlockFromCommentPublic200Response

範例

blockUserFromComment 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 設定 API key 授權: 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 key 的前綴(例如 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$tenant_id = 'tenant_id_example'; // string
23$id = 'id_example'; // string
24$block_from_comment_params = new \FastComments\Client\Model\BlockFromCommentParams(); // \FastComments\Client\Model\BlockFromCommentParams
25$user_id = 'user_id_example'; // string
26$anon_user_id = 'anon_user_id_example'; // string
27
28try {
29 $result = $apiInstance->blockUserFromComment($tenant_id, $id, $block_from_comment_params, $user_id, $anon_user_id);
30 print_r($result);
31} catch (Exception $e) {
32 echo 'Exception when calling DefaultApi->blockUserFromComment: ', $e->getMessage(), PHP_EOL;
33}
34

建立公開評論 Internal Link

參數

名稱 類型 位置 必要 描述
tenantId string path
urlId string query
broadcastId string query
sessionId string query
sso string query

回應

回傳:CreateCommentPublic200Response

範例

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$tenant_id = 'tenant_id_example'; // 字串
13$url_id = 'url_id_example'; // 字串
14$broadcast_id = 'broadcast_id_example'; // 字串
15$comment_data = new \FastComments\Client\Model\CommentData(); // \FastComments\Client\Model\CommentData
16$session_id = 'session_id_example'; // 字串
17$sso = 'sso_example'; // 字串
18
19try {
20 $result = $apiInstance->createCommentPublic($tenant_id, $url_id, $broadcast_id, $comment_data, $session_id, $sso);
21 print_r($result);
22} catch (Exception $e) {
23 echo 'Exception when calling PublicApi->createCommentPublic: ', $e->getMessage(), PHP_EOL;
24}
25

刪除評論 Internal Link

參數

名稱 類型 位置 必要 描述
tenantId string query
id string path
contextUserId string query
isLive boolean query

回應

回傳: DeleteComment200Response

範例

deleteComment 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 設定 API 金鑰授權:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如有需要,取消註解以下以設定 API 金鑰的前綴 (例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自訂的 HTTP 用戶端,傳入實作了 `GuzzleHttp\ClientInterface` 的用戶端。
14 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18$tenant_id = 'tenant_id_example'; // 字串
19$id = 'id_example'; // 字串
20$context_user_id = 'context_user_id_example'; // 字串
21$is_live = True; // 布林
22
23try {
24 $result = $apiInstance->deleteComment($tenant_id, $id, $context_user_id, $is_live);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->deleteComment: ', $e->getMessage(), PHP_EOL;
28}
29

刪除公開評論 Internal Link

參數

名稱 型別 位置 必填 說明
tenantId string path
commentId string path
broadcastId string query
editKey string query
sso string query

回應

回傳: DeleteCommentPublic200Response

範例

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$tenant_id = 'tenant_id_example'; // string
13$comment_id = 'comment_id_example'; // string
14$broadcast_id = 'broadcast_id_example'; // string
15$edit_key = 'edit_key_example'; // string
16$sso = 'sso_example'; // string
17
18try {
19 $result = $apiInstance->deleteCommentPublic($tenant_id, $comment_id, $broadcast_id, $edit_key, $sso);
20 print_r($result);
21} catch (Exception $e) {
22 echo 'Exception when calling PublicApi->deleteCommentPublic: ', $e->getMessage(), PHP_EOL;
23}
24

刪除評論投票 Internal Link

參數

Name Type Location Required Description
tenantId string path Yes
commentId string path Yes
voteId string path Yes
urlId string query Yes
broadcastId string query Yes
editKey string query No
sso string query No

回應

回傳: DeleteCommentVote200Response

範例

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$tenant_id = 'tenant_id_example'; // 字串
13$comment_id = 'comment_id_example'; // 字串
14$vote_id = 'vote_id_example'; // 字串
15$url_id = 'url_id_example'; // 字串
16$broadcast_id = 'broadcast_id_example'; // 字串
17$edit_key = 'edit_key_example'; // 字串
18$sso = 'sso_example'; // 字串
19
20try {
21 $result = $apiInstance->deleteCommentVote($tenant_id, $comment_id, $vote_id, $url_id, $broadcast_id, $edit_key, $sso);
22 print_r($result);
23} catch (Exception $e) {
24 echo 'Exception when calling PublicApi->deleteCommentVote: ', $e->getMessage(), PHP_EOL;
25}
26

舉報評論 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string query
id string path
userId string query
anonUserId string query

回應

回傳: FlagComment200Response

範例

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

取得評論 Internal Link

參數

名稱 類型 位置 必要 說明
tenantId string query
id string path

回應

回傳: GetComment200Response

範例

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

取得評論列表 Internal Link

參數

Name Type Location Required Description
tenantId string query
page integer query
limit integer query
skip integer query
asTree boolean query
skipChildren integer query
limitChildren integer query
maxTreeDepth integer query
urlId string query
userId string query
anonUserId string query
contextUserId string query
hashTag string query
parentId string query
direction string query

回應

回傳: GetComments200Response

範例

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$tenant_id = 'tenant_id_example'; // string
19$page = 56; // int
20$limit = 56; // int
21$skip = 56; // int
22$as_tree = True; // bool
23$skip_children = 56; // int
24$limit_children = 56; // int
25$max_tree_depth = 56; // int
26$url_id = 'url_id_example'; // string
27$user_id = 'user_id_example'; // string
28$anon_user_id = 'anon_user_id_example'; // string
29$context_user_id = 'context_user_id_example'; // string
30$hash_tag = 'hash_tag_example'; // string
31$parent_id = 'parent_id_example'; // string
32$direction = new \FastComments\Client\Model\\FastComments\Client\Model\SortDirections(); // \FastComments\Client\Model\SortDirections
33
34try {
35 $result = $apiInstance->getComments($tenant_id, $page, $limit, $skip, $as_tree, $skip_children, $limit_children, $max_tree_depth, $url_id, $user_id, $anon_user_id, $context_user_id, $hash_tag, $parent_id, $direction);
36 print_r($result);
37} catch (Exception $e) {
38 echo 'Exception when calling DefaultApi->getComments: ', $e->getMessage(), PHP_EOL;
39}
40

取得公開評論 Internal Link

req tenantId urlId

參數

名稱 類型 位置 必填 描述
tenantId string path
urlId string query
page integer query
direction string query
sso string query
skip integer query
skipChildren integer query
limit integer query
limitChildren integer query
countChildren boolean query
fetchPageForCommentId string query
includeConfig boolean query
countAll boolean query
includei10n boolean query
locale string query
modules string query
isCrawler boolean query
includeNotificationCount boolean query
asTree boolean query
maxTreeDepth integer query
useFullTranslationIds boolean query
parentId string query
searchText string query
hashTags array query
userId string query
customConfigStr string query
afterCommentId string query
beforeCommentId string query

回應

回傳: GetCommentsPublic200Response

範例

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$tenant_id = 'tenant_id_example'; // string
13$url_id = 'url_id_example'; // string
14$page = 56; // int
15$direction = new \FastComments\Client\Model\\FastComments\Client\Model\SortDirections(); // \FastComments\Client\Model\SortDirections
16$sso = 'sso_example'; // string
17$skip = 56; // int
18$skip_children = 56; // int
19$limit = 56; // int
20$limit_children = 56; // int
21$count_children = True; // bool
22$fetch_page_for_comment_id = 'fetch_page_for_comment_id_example'; // string
23$include_config = True; // bool
24$count_all = True; // bool
25$includei10n = True; // bool
26$locale = 'locale_example'; // string
27$modules = 'modules_example'; // string
28$is_crawler = True; // bool
29$include_notification_count = True; // bool
30$as_tree = True; // bool
31$max_tree_depth = 56; // int
32$use_full_translation_ids = True; // bool
33$parent_id = 'parent_id_example'; // string
34$search_text = 'search_text_example'; // string
35$hash_tags = array('hash_tags_example'); // string[]
36$user_id = 'user_id_example'; // string
37$custom_config_str = 'custom_config_str_example'; // string
38$after_comment_id = 'after_comment_id_example'; // string
39$before_comment_id = 'before_comment_id_example'; // string
40
41try {
42 $result = $apiInstance->getCommentsPublic($tenant_id, $url_id, $page, $direction, $sso, $skip, $skip_children, $limit, $limit_children, $count_children, $fetch_page_for_comment_id, $include_config, $count_all, $includei10n, $locale, $modules, $is_crawler, $include_notification_count, $as_tree, $max_tree_depth, $use_full_translation_ids, $parent_id, $search_text, $hash_tags, $user_id, $custom_config_str, $after_comment_id, $before_comment_id);
43 print_r($result);
44} catch (Exception $e) {
45 echo 'Exception when calling PublicApi->getCommentsPublic: ', $e->getMessage(), PHP_EOL;
46}
47

取得評論內容 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string path
commentId string path
editKey string query
sso string query

回應

回傳: GetCommentText200Response

範例

getCommentText 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果您想使用自訂的 HTTP 用戶端,請傳入實作 `GuzzleHttp\ClientInterface` 的用戶端。
9 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12$tenant_id = 'tenant_id_example'; // string
13$comment_id = 'comment_id_example'; // string
14$edit_key = 'edit_key_example'; // string
15$sso = 'sso_example'; // string
16
17try {
18 $result = $apiInstance->getCommentText($tenant_id, $comment_id, $edit_key, $sso);
19 print_r($result);
20} catch (Exception $e) {
21 echo 'Exception when calling PublicApi->getCommentText: ', $e->getMessage(), PHP_EOL;
22}
23

取得評論投票使用者名稱 Internal Link

參數

Name Type Location Required Description
tenantId string path
commentId string path
dir integer query
sso string query

回應

回傳: GetCommentVoteUserNames200Response

範例

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$tenant_id = 'tenant_id_example'; // string
13$comment_id = 'comment_id_example'; // string
14$dir = 56; // int
15$sso = 'sso_example'; // string
16
17try {
18 $result = $apiInstance->getCommentVoteUserNames($tenant_id, $comment_id, $dir, $sso);
19 print_r($result);
20} catch (Exception $e) {
21 echo 'Exception when calling PublicApi->getCommentVoteUserNames: ', $e->getMessage(), PHP_EOL;
22}
23

鎖定評論 Internal Link

參數

Name Type Location Required Description
tenantId string path
commentId string path
broadcastId string query
sso string query

回應

回傳: LockComment200Response

範例

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$tenant_id = 'tenant_id_example'; // string
13$comment_id = 'comment_id_example'; // string
14$broadcast_id = 'broadcast_id_example'; // string
15$sso = 'sso_example'; // string
16
17try {
18 $result = $apiInstance->lockComment($tenant_id, $comment_id, $broadcast_id, $sso);
19 print_r($result);
20} catch (Exception $e) {
21 echo 'Exception when calling PublicApi->lockComment: ', $e->getMessage(), PHP_EOL;
22}
23

置頂評論 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string 路徑
commentId string 路徑
broadcastId string 查詢
sso string 查詢

回應

回傳: PinComment200Response

範例

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$tenant_id = 'tenant_id_example'; // 字串
13$comment_id = 'comment_id_example'; // 字串
14$broadcast_id = 'broadcast_id_example'; // 字串
15$sso = 'sso_example'; // 字串
16
17try {
18 $result = $apiInstance->pinComment($tenant_id, $comment_id, $broadcast_id, $sso);
19 print_r($result);
20} catch (Exception $e) {
21 echo 'Exception when calling PublicApi->pinComment: ', $e->getMessage(), PHP_EOL;
22}
23

儲存評論 Internal Link

參數

Name Type Location Required Description
tenantId string query
isLive boolean query
doSpamCheck boolean query
sendEmails boolean query
populateNotifications boolean query

回應

回傳: SaveComment200Response

範例

saveComment 範例
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$tenant_id = 'tenant_id_example'; // string
19$create_comment_params = new \FastComments\Client\Model\CreateCommentParams(); // \FastComments\Client\Model\CreateCommentParams
20$is_live = True; // bool
21$do_spam_check = True; // bool
22$send_emails = True; // bool
23$populate_notifications = True; // bool
24
25try {
26 $result = $apiInstance->saveComment($tenant_id, $create_comment_params, $is_live, $do_spam_check, $send_emails, $populate_notifications);
27 print_r($result);
28} catch (Exception $e) {
29 echo 'Exception when calling DefaultApi->saveComment: ', $e->getMessage(), PHP_EOL;
30}
31

批次儲存評論 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string query
isLive boolean query
doSpamCheck boolean query
sendEmails boolean query
populateNotifications boolean query

回應

回傳: SaveComment200Response

範例

saveCommentsBulk 範例
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$tenant_id = 'tenant_id_example'; // string
19$create_comment_params = array(new \FastComments\Client\Model\CreateCommentParams()); // \FastComments\Client\Model\CreateCommentParams[]
20$is_live = True; // bool
21$do_spam_check = True; // bool
22$send_emails = True; // bool
23$populate_notifications = True; // bool
24
25try {
26 $result = $apiInstance->saveCommentsBulk($tenant_id, $create_comment_params, $is_live, $do_spam_check, $send_emails, $populate_notifications);
27 print_r($result);
28} catch (Exception $e) {
29 echo 'Exception when calling DefaultApi->saveCommentsBulk: ', $e->getMessage(), PHP_EOL;
30}
31

設定評論內容 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string 路徑
commentId string 路徑
broadcastId string 查詢
editKey string 查詢
sso string 查詢

回應

回傳: SetCommentText200Response

範例

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$tenant_id = 'tenant_id_example'; // string
13$comment_id = 'comment_id_example'; // string
14$broadcast_id = 'broadcast_id_example'; // string
15$comment_text_update_request = new \FastComments\Client\Model\CommentTextUpdateRequest(); // \FastComments\Client\Model\CommentTextUpdateRequest
16$edit_key = 'edit_key_example'; // string
17$sso = 'sso_example'; // string
18
19try {
20 $result = $apiInstance->setCommentText($tenant_id, $comment_id, $broadcast_id, $comment_text_update_request, $edit_key, $sso);
21 print_r($result);
22} catch (Exception $e) {
23 echo 'Exception when calling PublicApi->setCommentText: ', $e->getMessage(), PHP_EOL;
24}
25

取消封鎖評論使用者 Internal Link

參數

Name Type Location Required Description
tenantId string query
id string path
userId string query
anonUserId string query

回應

回傳: UnBlockCommentPublic200Response

範例

unBlockUserFromComment 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 設定 API 金鑰授權:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如有需要,取消下面註解以設定 API 金鑰的前綴(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自訂的 HTTP 用戶端,請傳入實作 `GuzzleHttp\ClientInterface` 的用戶端。
14 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18$tenant_id = 'tenant_id_example'; // string
19$id = 'id_example'; // string
20$un_block_from_comment_params = new \FastComments\Client\Model\UnBlockFromCommentParams(); // \FastComments\Client\Model\UnBlockFromCommentParams
21$user_id = 'user_id_example'; // string
22$anon_user_id = 'anon_user_id_example'; // string
23
24try {
25 $result = $apiInstance->unBlockUserFromComment($tenant_id, $id, $un_block_from_comment_params, $user_id, $anon_user_id);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling DefaultApi->unBlockUserFromComment: ', $e->getMessage(), PHP_EOL;
29}
30

取消舉報評論 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string query
id string path
userId string query
anonUserId string query

回應

回傳: FlagComment200Response

範例

unFlagComment 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 設定 API 金鑰授權:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 若需要,取消註解下方以設定 API 金鑰的前綴(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自訂的 HTTP 用戶端,請傳入實作了 `GuzzleHttp\ClientInterface` 的用戶端。
14 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18$tenant_id = 'tenant_id_example'; // string
19$id = 'id_example'; // string
20$user_id = 'user_id_example'; // string
21$anon_user_id = 'anon_user_id_example'; // string
22
23try {
24 $result = $apiInstance->unFlagComment($tenant_id, $id, $user_id, $anon_user_id);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->unFlagComment: ', $e->getMessage(), PHP_EOL;
28}
29

取消鎖定評論 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string path
commentId string path
broadcastId string query
sso string query

回應

回傳: LockComment200Response

範例

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$tenant_id = 'tenant_id_example'; // 字串
13$comment_id = 'comment_id_example'; // 字串
14$broadcast_id = 'broadcast_id_example'; // 字串
15$sso = 'sso_example'; // 字串
16
17try {
18 $result = $apiInstance->unLockComment($tenant_id, $comment_id, $broadcast_id, $sso);
19 print_r($result);
20} catch (Exception $e) {
21 echo 'Exception when calling PublicApi->unLockComment: ', $e->getMessage(), PHP_EOL;
22}
23

取消置頂評論 Internal Link

參數

名稱 類型 位置 必填 描述
tenantId string path
commentId string path
broadcastId string query
sso string query

回應

回傳:PinComment200Response

範例

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$tenant_id = 'tenant_id_example'; // 字串
13$comment_id = 'comment_id_example'; // 字串
14$broadcast_id = 'broadcast_id_example'; // 字串
15$sso = 'sso_example'; // 字串
16
17try {
18 $result = $apiInstance->unPinComment($tenant_id, $comment_id, $broadcast_id, $sso);
19 print_r($result);
20} catch (Exception $e) {
21 echo 'Exception when calling PublicApi->unPinComment: ', $e->getMessage(), PHP_EOL;
22}
23

更新評論 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string query
id string path
contextUserId string query
doSpamCheck boolean query
isLive boolean query

回應

回傳: FlagCommentPublic200Response

範例

updateComment 範例
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// 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 // 如果你想使用自訂的 HTTP 用戶端,請傳入實作 `GuzzleHttp\ClientInterface` 的用戶端。
14 // This is optional, `GuzzleHttp\Client` will be used as default.
15 new GuzzleHttp\Client(),
16 $config
17);
18$tenant_id = 'tenant_id_example'; // string
19$id = 'id_example'; // string
20$body = new \FastComments\Client\Model\PickAPICommentUpdatableCommentFields(); // \FastComments\Client\Model\PickAPICommentUpdatableCommentFields
21$context_user_id = 'context_user_id_example'; // string
22$do_spam_check = True; // bool
23$is_live = True; // bool
24
25try {
26 $result = $apiInstance->updateComment($tenant_id, $id, $body, $context_user_id, $do_spam_check, $is_live);
27 print_r($result);
28} catch (Exception $e) {
29 echo 'Exception when calling DefaultApi->updateComment: ', $e->getMessage(), PHP_EOL;
30}
31

評論投票 Internal Link

參數

Name Type Location Required Description
tenantId string path
commentId string path
urlId string query
broadcastId string query
sessionId string query
sso string query

回應

Returns: VoteComment200Response

範例

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$tenant_id = 'tenant_id_example'; // string
13$comment_id = 'comment_id_example'; // string
14$url_id = 'url_id_example'; // string
15$broadcast_id = 'broadcast_id_example'; // string
16$vote_body_params = new \FastComments\Client\Model\VoteBodyParams(); // \FastComments\Client\Model\VoteBodyParams
17$session_id = 'session_id_example'; // string
18$sso = 'sso_example'; // string
19
20try {
21 $result = $apiInstance->voteComment($tenant_id, $comment_id, $url_id, $broadcast_id, $vote_body_params, $session_id, $sso);
22 print_r($result);
23} catch (Exception $e) {
24 echo 'Exception when calling PublicApi->voteComment: ', $e->getMessage(), PHP_EOL;
25}
26

新增網域設定 Internal Link

參數

Name Type Location Required Description
tenantId string 查詢

回應

回傳:AddDomainConfig200Response

範例

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

刪除網域設定 Internal Link

參數

Name Type Location Required Description
tenantId string query
domain string path

回應

回傳: DeleteDomainConfig200Response

範例

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

取得網域設定 Internal Link

參數

名稱 型別 位置 必填 說明
tenantId string query
domain string path

回應

回傳:GetDomainConfig200Response

範例

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 client,傳入實作 `GuzzleHttp\ClientInterface` 的 client。
14 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18$tenant_id = 'tenant_id_example'; // 字串
19$domain = 'domain_example'; // 字串
20
21try {
22 $result = $apiInstance->getDomainConfig($tenant_id, $domain);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling DefaultApi->getDomainConfig: ', $e->getMessage(), PHP_EOL;
26}
27

取得網域設定列表 Internal Link


參數

名稱 型別 位置 必填 說明
tenantId string query

回應

回傳: GetDomainConfigs200Response

範例

getDomainConfigs 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 設定 API Key 授權: api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如有需要,取消註解下方以設定 API key 的前綴 (例如 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` 的 client。
14 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18$tenant_id = 'tenant_id_example'; // string
19
20try {
21 $result = $apiInstance->getDomainConfigs($tenant_id);
22 print_r($result);
23} catch (Exception $e) {
24 echo 'Exception when calling DefaultApi->getDomainConfigs: ', $e->getMessage(), PHP_EOL;
25}
26

部分更新網域設定 Internal Link

參數

Name Type Location Required Description
tenantId string query
domainToUpdate string path

回應

回傳:GetDomainConfig200Response

範例

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

替換網域設定 Internal Link

參數

Name Type Location Required Description
tenantId string query
domainToUpdate string path

回應

回傳:GetDomainConfig200Response

範例

putDomainConfig 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 設定 API 金鑰授權:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如有需要,取消註解下列程式碼以設定 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$tenant_id = 'tenant_id_example'; // string
19$domain_to_update = 'domain_to_update_example'; // string
20$update_domain_config_params = new \FastComments\Client\Model\UpdateDomainConfigParams(); // \FastComments\Client\Model\UpdateDomainConfigParams
21
22try {
23 $result = $apiInstance->putDomainConfig($tenant_id, $domain_to_update, $update_domain_config_params);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling DefaultApi->putDomainConfig: ', $e->getMessage(), PHP_EOL;
27}
28

建立電子郵件範本 Internal Link

參數

Name Type Location Required Description
tenantId string query

回應

回傳: CreateEmailTemplate200Response

範例

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

刪除電子郵件範本 Internal Link

參數

Name Type Location Required Description
tenantId string query
id string path

回應

回傳: FlagCommentPublic200Response

範例

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

刪除電子郵件範本渲染錯誤 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string query
id string path
errorId string path

回應

回傳: FlagCommentPublic200Response

範例

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 // 若要使用自訂的 HTTP 用戶端,請傳入實作 `GuzzleHttp\ClientInterface` 的用戶端。
14 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18$tenant_id = 'tenant_id_example'; // string
19$id = 'id_example'; // string
20$error_id = 'error_id_example'; // string
21
22try {
23 $result = $apiInstance->deleteEmailTemplateRenderError($tenant_id, $id, $error_id);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling DefaultApi->deleteEmailTemplateRenderError: ', $e->getMessage(), PHP_EOL;
27}
28

取得電子郵件範本 Internal Link

參數

名稱 型別 位置 必要 說明
tenantId string 查詢
id string 路徑

回應

回傳:GetEmailTemplate200Response

範例

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

取得電子郵件範本定義 Internal Link

參數

Name Type Location Required Description
tenantId string query Yes

回應

回傳: GetEmailTemplateDefinitions200Response

範例

getEmailTemplateDefinitions 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 設定 API 金鑰授權: api_key
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// 如有需要,取消註解下列內容以設定 API 金鑰的前綴(例如 Bearer)
10// $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$tenant_id = 'tenant_id_example'; // 字串
22
23try {
24 $result = $apiInstance->getEmailTemplateDefinitions($tenant_id);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->getEmailTemplateDefinitions: ', $e->getMessage(), PHP_EOL;
28}
29

取得電子郵件範本渲染錯誤 Internal Link

參數

Name Type Location Required Description
tenantId string query Yes
id string path Yes
skip number query No

回應

回傳: GetEmailTemplateRenderErrors200Response

範例

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

取得電子郵件範本列表 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string query
skip number query

回應

回傳: GetEmailTemplates200Response

範例

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// 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 // 如果要使用自訂的 http client,請傳入實作 `GuzzleHttp\ClientInterface` 的 client。
14 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18$tenant_id = 'tenant_id_example'; // 字串
19$skip = 3.4; // 浮點數
20
21try {
22 $result = $apiInstance->getEmailTemplates($tenant_id, $skip);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling DefaultApi->getEmailTemplates: ', $e->getMessage(), PHP_EOL;
26}
27

渲染電子郵件範本 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string query
locale string query

回應

回傳: RenderEmailTemplate200Response

範例

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 金鑰的前綴 (e.g. Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自訂的 http client,請傳入實作了 `GuzzleHttp\ClientInterface` 的用戶端。
14 // 這是可選的,`GuzzleHttp\Client` will be used as default.
15 new GuzzleHttp\Client(),
16 $config
17);
18$tenant_id = 'tenant_id_example'; // string
19$render_email_template_body = new \FastComments\Client\Model\RenderEmailTemplateBody(); // \FastComments\Client\Model\RenderEmailTemplateBody
20$locale = 'locale_example'; // string
21
22try {
23 $result = $apiInstance->renderEmailTemplate($tenant_id, $render_email_template_body, $locale);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling DefaultApi->renderEmailTemplate: ', $e->getMessage(), PHP_EOL;
27}
28

更新電子郵件範本 Internal Link

參數

Name Type Location Required Description
tenantId string query
id string path

回應

回傳:FlagCommentPublic200Response

範例

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

取得事件日誌 Internal Link

req tenantId urlId userIdWS

參數

名稱 類型 位置 必填 說明
tenantId string path Yes
urlId string query Yes
userIdWS string query Yes
startTime integer query Yes
endTime integer query Yes

回應

回傳: GetEventLog200Response

範例

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$tenant_id = 'tenant_id_example'; // string
13$url_id = 'url_id_example'; // string
14$user_id_ws = 'user_id_ws_example'; // string
15$start_time = 56; // int
16$end_time = 56; // int
17
18try {
19 $result = $apiInstance->getEventLog($tenant_id, $url_id, $user_id_ws, $start_time, $end_time);
20 print_r($result);
21} catch (Exception $e) {
22 echo 'Exception when calling PublicApi->getEventLog: ', $e->getMessage(), PHP_EOL;
23}
24

取得全域事件日誌 Internal Link

req tenantId urlId userIdWS

參數

名稱 型別 位置 必填 說明
tenantId string path
urlId string query
userIdWS string query
startTime integer query
endTime integer query

回應

回傳: GetEventLog200Response

範例

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$tenant_id = 'tenant_id_example'; // 字串
13$url_id = 'url_id_example'; // 字串
14$user_id_ws = 'user_id_ws_example'; // 字串
15$start_time = 56; // 整數
16$end_time = 56; // 整數
17
18try {
19 $result = $apiInstance->getGlobalEventLog($tenant_id, $url_id, $user_id_ws, $start_time, $end_time);
20 print_r($result);
21} catch (Exception $e) {
22 echo 'Exception when calling PublicApi->getGlobalEventLog: ', $e->getMessage(), PHP_EOL;
23}
24

建立動態貼文 Internal Link

參數

Name Type Location Required Description
tenantId string query
broadcastId string query
isLive boolean query
doSpamCheck boolean query
skipDupCheck boolean query

回應

回傳: CreateFeedPost200Response

範例

createFeedPost 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 設定 API 金鑰授權:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如有需要,請取消註解下方以設定 API 金鑰的前綴(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 若要使用自訂的 http client,請傳入實作了 `GuzzleHttp\ClientInterface` 的 client。
14 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18$tenant_id = 'tenant_id_example'; // string
19$create_feed_post_params = new \FastComments\Client\Model\CreateFeedPostParams(); // \FastComments\Client\Model\CreateFeedPostParams
20$broadcast_id = 'broadcast_id_example'; // string
21$is_live = True; // bool
22$do_spam_check = True; // bool
23$skip_dup_check = True; // bool
24
25try {
26 $result = $apiInstance->createFeedPost($tenant_id, $create_feed_post_params, $broadcast_id, $is_live, $do_spam_check, $skip_dup_check);
27 print_r($result);
28} catch (Exception $e) {
29 echo 'Exception when calling DefaultApi->createFeedPost: ', $e->getMessage(), PHP_EOL;
30}
31

建立公開動態貼文 Internal Link

參數

名稱 類型 位置 必要 描述
tenantId string path
broadcastId string query
sso string query

回應

回傳: CreateFeedPostPublic200Response

範例

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$tenant_id = 'tenant_id_example'; // 字串
13$create_feed_post_params = new \FastComments\Client\Model\CreateFeedPostParams(); // \FastComments\Client\Model\CreateFeedPostParams
14$broadcast_id = 'broadcast_id_example'; // 字串
15$sso = 'sso_example'; // 字串
16
17try {
18 $result = $apiInstance->createFeedPostPublic($tenant_id, $create_feed_post_params, $broadcast_id, $sso);
19 print_r($result);
20} catch (Exception $e) {
21 echo 'Exception when calling PublicApi->createFeedPostPublic: ', $e->getMessage(), PHP_EOL;
22}
23

刪除公開動態貼文 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string path
postId string path
broadcastId string query
sso string query

回應

回傳:DeleteFeedPostPublic200Response

範例

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$tenant_id = 'tenant_id_example'; // string
13$post_id = 'post_id_example'; // string
14$broadcast_id = 'broadcast_id_example'; // string
15$sso = 'sso_example'; // string
16
17try {
18 $result = $apiInstance->deleteFeedPostPublic($tenant_id, $post_id, $broadcast_id, $sso);
19 print_r($result);
20} catch (Exception $e) {
21 echo 'Exception when calling PublicApi->deleteFeedPostPublic: ', $e->getMessage(), PHP_EOL;
22}
23

取得動態貼文 Internal Link

req tenantId afterId

參數

名稱 類型 位置 必填 說明
tenantId string query
afterId string query
limit integer query
tags array query

回應

回傳: GetFeedPosts200Response

範例

getFeedPosts 範例
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$tenant_id = 'tenant_id_example'; // string
22$after_id = 'after_id_example'; // string
23$limit = 56; // int
24$tags = array('tags_example'); // string[]
25
26try {
27 $result = $apiInstance->getFeedPosts($tenant_id, $after_id, $limit, $tags);
28 print_r($result);
29} catch (Exception $e) {
30 echo 'Exception when calling DefaultApi->getFeedPosts: ', $e->getMessage(), PHP_EOL;
31}
32

取得公開動態貼文 Internal Link

req tenantId afterId

Parameters

Name Type Location Required Description
tenantId string path
afterId string query
limit integer query
tags array query
sso string query
isCrawler boolean query
includeUserInfo boolean query

Response

回傳: GetFeedPostsPublic200Response

Example

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$tenant_id = 'tenant_id_example'; // string
13$after_id = 'after_id_example'; // string
14$limit = 56; // int
15$tags = array('tags_example'); // string[]
16$sso = 'sso_example'; // string
17$is_crawler = True; // bool
18$include_user_info = True; // bool
19
20try {
21 $result = $apiInstance->getFeedPostsPublic($tenant_id, $after_id, $limit, $tags, $sso, $is_crawler, $include_user_info);
22 print_r($result);
23} catch (Exception $e) {
24 echo 'Exception when calling PublicApi->getFeedPostsPublic: ', $e->getMessage(), PHP_EOL;
25}
26

取得動態貼文統計 Internal Link

參數

Name Type Location Required Description
tenantId string path
postIds array query
sso string query

回應

Returns: GetFeedPostsStats200Response

範例

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$tenant_id = 'tenant_id_example'; // string
13$post_ids = array('post_ids_example'); // string[]
14$sso = 'sso_example'; // string
15
16try {
17 $result = $apiInstance->getFeedPostsStats($tenant_id, $post_ids, $sso);
18 print_r($result);
19} catch (Exception $e) {
20 echo 'Exception when calling PublicApi->getFeedPostsStats: ', $e->getMessage(), PHP_EOL;
21}
22

取得使用者公開反應 Internal Link

參數

Name Type Location Required Description
tenantId string path
postIds array query
sso string query

回應

回傳: GetUserReactsPublic200Response

範例

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$tenant_id = 'tenant_id_example'; // string
13$post_ids = array('post_ids_example'); // string[]
14$sso = 'sso_example'; // string
15
16try {
17 $result = $apiInstance->getUserReactsPublic($tenant_id, $post_ids, $sso);
18 print_r($result);
19} catch (Exception $e) {
20 echo 'Exception when calling PublicApi->getUserReactsPublic: ', $e->getMessage(), PHP_EOL;
21}
22

對公開動態貼文反應 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string path
postId string path
isUndo boolean query
broadcastId string query
sso string query

回應

回傳: ReactFeedPostPublic200Response

範例

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$tenant_id = 'tenant_id_example'; // string
13$post_id = 'post_id_example'; // string
14$react_body_params = new \FastComments\Client\Model\ReactBodyParams(); // \FastComments\Client\Model\ReactBodyParams
15$is_undo = True; // bool
16$broadcast_id = 'broadcast_id_example'; // string
17$sso = 'sso_example'; // string
18
19try {
20 $result = $apiInstance->reactFeedPostPublic($tenant_id, $post_id, $react_body_params, $is_undo, $broadcast_id, $sso);
21 print_r($result);
22} catch (Exception $e) {
23 echo 'Exception when calling PublicApi->reactFeedPostPublic: ', $e->getMessage(), PHP_EOL;
24}
25

更新動態貼文 Internal Link

參數

名稱 型別 位置 必填 描述
tenantId string query
id string path

回應

回傳: FlagCommentPublic200Response

範例

updateFeedPost 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 設定 API 金鑰授權:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如需為 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$tenant_id = 'tenant_id_example'; // string
19$id = 'id_example'; // string
20$feed_post = new \FastComments\Client\Model\FeedPost(); // \FastComments\Client\Model\FeedPost
21
22try {
23 $result = $apiInstance->updateFeedPost($tenant_id, $id, $feed_post);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling DefaultApi->updateFeedPost: ', $e->getMessage(), PHP_EOL;
27}
28

更新公開動態貼文 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string path Yes
postId string path Yes
broadcastId string query No
sso string query No

回應

回傳:CreateFeedPostPublic200Response

範例

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$tenant_id = 'tenant_id_example'; // string
13$post_id = 'post_id_example'; // string
14$update_feed_post_params = new \FastComments\Client\Model\UpdateFeedPostParams(); // \FastComments\Client\Model\UpdateFeedPostParams
15$broadcast_id = 'broadcast_id_example'; // string
16$sso = 'sso_example'; // string
17
18try {
19 $result = $apiInstance->updateFeedPostPublic($tenant_id, $post_id, $update_feed_post_params, $broadcast_id, $sso);
20 print_r($result);
21} catch (Exception $e) {
22 echo 'Exception when calling PublicApi->updateFeedPostPublic: ', $e->getMessage(), PHP_EOL;
23}
24

舉報公開評論 Internal Link

參數

Name Type Location Required Description
tenantId string query
commentId string path
isFlagged boolean query
sso string query

回傳

回傳: FlagCommentPublic200Response

範例

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$tenant_id = 'tenant_id_example'; // 字串
13$comment_id = 'comment_id_example'; // 字串
14$is_flagged = True; // 布林
15$sso = 'sso_example'; // 字串
16
17try {
18 $result = $apiInstance->flagCommentPublic($tenant_id, $comment_id, $is_flagged, $sso);
19 print_r($result);
20} catch (Exception $e) {
21 echo 'Exception when calling PublicApi->flagCommentPublic: ', $e->getMessage(), PHP_EOL;
22}
23

新增標籤 Internal Link

參數

Name Type Location Required Description
tenantId string query

回傳

回傳: AddHashTag200Response

範例

addHashTag 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 設定 API 金鑰授權:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 若需要,取消註解下列以設定 API 金鑰的前綴(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 若要使用自訂的 http client,請傳入實作了 `GuzzleHttp\ClientInterface` 的客戶端。
14 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18$tenant_id = 'tenant_id_example'; // 字串
19$create_hash_tag_body = new \FastComments\Client\Model\CreateHashTagBody(); // \FastComments\Client\Model\CreateHashTagBody
20
21try {
22 $result = $apiInstance->addHashTag($tenant_id, $create_hash_tag_body);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling DefaultApi->addHashTag: ', $e->getMessage(), PHP_EOL;
26}
27

批次新增標籤 Internal Link


參數

Name Type Location Required Description
tenantId string query No

回應

回傳: AddHashTagsBulk200Response

範例

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$tenant_id = 'tenant_id_example'; // 字串
19$bulk_create_hash_tags_body = new \FastComments\Client\Model\BulkCreateHashTagsBody(); // \FastComments\Client\Model\BulkCreateHashTagsBody
20
21try {
22 $result = $apiInstance->addHashTagsBulk($tenant_id, $bulk_create_hash_tags_body);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling DefaultApi->addHashTagsBulk: ', $e->getMessage(), PHP_EOL;
26}
27

刪除標籤 Internal Link


參數

Name Type Location Required Description
tag string path Yes
tenantId string query No

回應

回傳:FlagCommentPublic200Response

範例

deleteHashTag 範例
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$tag = 'tag_example'; // string
23$tenant_id = 'tenant_id_example'; // string
24$delete_hash_tag_request = new \FastComments\Client\Model\DeleteHashTagRequest(); // \FastComments\Client\Model\DeleteHashTagRequest
25
26try {
27 $result = $apiInstance->deleteHashTag($tag, $tenant_id, $delete_hash_tag_request);
28 print_r($result);
29} catch (Exception $e) {
30 echo 'Exception when calling DefaultApi->deleteHashTag: ', $e->getMessage(), PHP_EOL;
31}
32

取得標籤 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string query
page number query

回應

回傳: GetHashTags200Response

範例

getHashTags 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 設定 API 金鑰授權:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 若需要,取消下方註解以設定 API 金鑰的前綴(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果想使用自訂的 HTTP 用戶端,傳入實作了 `GuzzleHttp\ClientInterface` 的用戶端。
14 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18$tenant_id = 'tenant_id_example'; // 字串
19$page = 3.4; // 浮點數
20
21try {
22 $result = $apiInstance->getHashTags($tenant_id, $page);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling DefaultApi->getHashTags: ', $e->getMessage(), PHP_EOL;
26}
27

部分更新標籤 Internal Link

參數

名稱 類型 位置 必填 說明
tag string path
tenantId string query

回應

回傳:PatchHashTag200Response

範例

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$tag = 'tag_example'; // string
19$tenant_id = 'tenant_id_example'; // string
20$update_hash_tag_body = new \FastComments\Client\Model\UpdateHashTagBody(); // \FastComments\Client\Model\UpdateHashTagBody
21
22try {
23 $result = $apiInstance->patchHashTag($tag, $tenant_id, $update_hash_tag_body);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling DefaultApi->patchHashTag: ', $e->getMessage(), PHP_EOL;
27}
28

建立管理員 Internal Link

參數

Name Type Location Required Description
tenantId string query

回應

回傳: CreateModerator200Response

範例

createModerator 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 設定 API key 授權: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 key
11// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
12
13
14$apiInstance = new FastComments\Client\Api\DefaultApi(
15 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
16 // 若要使用自訂的 http client,傳入實作了 `GuzzleHttp\ClientInterface` 的 client。
17 // This is optional, `GuzzleHttp\Client` will be used as default.
18 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
19 new GuzzleHttp\Client(),
20 $config
21);
22$tenant_id = 'tenant_id_example'; // 字串
23$create_moderator_body = new \FastComments\Client\Model\CreateModeratorBody(); // \FastComments\Client\Model\CreateModeratorBody
24
25try {
26 $result = $apiInstance->createModerator($tenant_id, $create_moderator_body);
27 print_r($result);
28} catch (Exception $e) {
29 echo 'Exception when calling DefaultApi->createModerator: ', $e->getMessage(), PHP_EOL;
30}
31

刪除管理員 Internal Link

參數

Name Type Location Required Description
tenantId string query
id string path
sendEmail string query

回應

回傳:FlagCommentPublic200Response

範例

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

取得管理員 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string query
id string path

回應

回傳: GetModerator200Response

範例

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

取得管理員列表 Internal Link

參數

名稱 類型 位置 必填 描述
tenantId string query
skip number query

回應

回傳: GetModerators200Response

範例

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// 若需要,取消下方註解以設定 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$tenant_id = 'tenant_id_example'; // 字串
19$skip = 3.4; // 浮點數
20
21try {
22 $result = $apiInstance->getModerators($tenant_id, $skip);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling DefaultApi->getModerators: ', $e->getMessage(), PHP_EOL;
26}
27

發送邀請 Internal Link

參數

Name Type Location Required Description
tenantId string query
id string path
fromName string query

回應

回傳: FlagCommentPublic200Response

範例

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

更新管理員 Internal Link

參數

Name Type Location Required Description
tenantId string query
id string path

回應

回傳: FlagCommentPublic200Response

範例

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

刪除通知數量 Internal Link

參數

名稱 類型 位置 必填 描述
tenantId string 查詢
id string 路徑

回應

回傳: FlagCommentPublic200Response

範例

deleteNotificationCount 範例
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 // 如果想使用自訂的 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$tenant_id = 'tenant_id_example'; // 字串
21$id = 'id_example'; // 字串
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

參數

名稱 類型 位置 必填 說明
tenantId string query
id string path

回應

回傳: GetCachedNotificationCount200Response

範例

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

取得通知數量 Internal Link

參數

Name Type Location Required Description
tenantId string query
userId string query
urlId string query
fromCommentId string query
viewed boolean query
type string query

回應

回傳: GetNotificationCount200Response

範例

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// 若需要,取消註解下方以設定 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$tenant_id = 'tenant_id_example'; // string
19$user_id = 'user_id_example'; // string
20$url_id = 'url_id_example'; // string
21$from_comment_id = 'from_comment_id_example'; // string
22$viewed = True; // bool
23$type = 'type_example'; // string
24
25try {
26 $result = $apiInstance->getNotificationCount($tenant_id, $user_id, $url_id, $from_comment_id, $viewed, $type);
27 print_r($result);
28} catch (Exception $e) {
29 echo 'Exception when calling DefaultApi->getNotificationCount: ', $e->getMessage(), PHP_EOL;
30}
31

取得通知 Internal Link

參數

Name Type Location Required Description
tenantId string query
userId string query
urlId string query
fromCommentId string query
viewed boolean query
type string query
skip number query

回應

回傳:GetNotifications200Response

範例

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

更新通知 Internal Link

參數

名稱 類型 位置 必填 描述
tenantId string query
id string path
userId string query

回應

回傳: FlagCommentPublic200Response

範例

updateNotification 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 設定 API 金鑰授權: api_key
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// 若需要,取消註解下列用於為 API 金鑰設定前綴(例如 Bearer)
10// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
11
12
13$apiInstance = new FastComments\Client\Api\DefaultApi(
14 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
15 // 如果您想使用自訂的 HTTP 用戶端,請傳入實作了 `GuzzleHttp\ClientInterface` 的用戶端。
16 // This is optional, `GuzzleHttp\Client` will be used as default.
17 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
18 new GuzzleHttp\Client(),
19 $config
20);
21$tenant_id = 'tenant_id_example'; // string
22$id = 'id_example'; // string
23$update_notification_body = new \FastComments\Client\Model\UpdateNotificationBody(); // \FastComments\Client\Model\UpdateNotificationBody
24$user_id = 'user_id_example'; // string
25
26try {
27 $result = $apiInstance->updateNotification($tenant_id, $id, $update_notification_body, $user_id);
28 print_r($result);
29} catch (Exception $e) {
30 echo 'Exception when calling DefaultApi->updateNotification: ', $e->getMessage(), PHP_EOL;
31}
32

新增頁面 Internal Link

參數

Name Type Location Required Description
tenantId string 查詢

回應

回傳: AddPageAPIResponse

範例

addPage 範例
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$tenant_id = 'tenant_id_example'; // 字串
19$create_api_page_data = new \FastComments\Client\Model\CreateAPIPageData(); // \FastComments\Client\Model\CreateAPIPageData
20
21try {
22 $result = $apiInstance->addPage($tenant_id, $create_api_page_data);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling DefaultApi->addPage: ', $e->getMessage(), PHP_EOL;
26}
27

刪除頁面 Internal Link

參數

Name Type Location Required Description
tenantId string query Yes
id string path Yes

回應

回傳: DeletePageAPIResponse

範例

deletePage 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 設定 API 金鑰授權:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如有需要,取消下方註解以設定 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` 的 client。
14 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18$tenant_id = 'tenant_id_example'; // string
19$id = 'id_example'; // string
20
21try {
22 $result = $apiInstance->deletePage($tenant_id, $id);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling DefaultApi->deletePage: ', $e->getMessage(), PHP_EOL;
26}
27

以 URLId 取得頁面 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string 查詢
urlId string 查詢

回應

回傳: GetPageByURLIdAPIResponse

範例

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

取得頁面列表 Internal Link

參數

Name Type Location Required Description
tenantId string query

回應

回傳:GetPagesAPIResponse

範例

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

部分更新頁面 Internal Link

參數

名稱 類型 位置 必填 描述
tenantId string query
id string path

回應

回傳: PatchPageAPIResponse

範例

patchPage 範例
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$tenant_id = 'tenant_id_example'; // string
23$id = 'id_example'; // string
24$update_api_page_data = new \FastComments\Client\Model\UpdateAPIPageData(); // \FastComments\Client\Model\UpdateAPIPageData
25
26try {
27 $result = $apiInstance->patchPage($tenant_id, $id, $update_api_page_data);
28 print_r($result);
29} catch (Exception $e) {
30 echo 'Exception when calling DefaultApi->patchPage: ', $e->getMessage(), PHP_EOL;
31}
32

刪除待處理的 Webhook 事件 Internal Link


參數

名稱 類型 位置 必填 說明
tenantId string query
id string path

回應

回傳: FlagCommentPublic200Response

範例

deletePendingWebhookEvent 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 設定 API 金鑰授權:api_key
7// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
8// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
9
10
11$apiInstance = new FastComments\Client\Api\DefaultApi(
12 // 若要使用自訂的 HTTP 用戶端,請傳入實作 `GuzzleHttp\ClientInterface` 的用戶端。
13 // 這並非必要,預設會使用 `GuzzleHttp\Client`。
14 new GuzzleHttp\Client(),
15 $config
16);
17$tenant_id = 'tenant_id_example'; // string
18$id = 'id_example'; // string
19
20try {
21 $result = $apiInstance->deletePendingWebhookEvent($tenant_id, $id);
22 print_r($result);
23} catch (Exception $e) {
24 echo 'Exception when calling DefaultApi->deletePendingWebhookEvent: ', $e->getMessage(), PHP_EOL;
25}
26

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

參數

Name Type Location Required Description
tenantId string query
commentId string query
externalId string query
eventType string query
type string query
domain string query
attemptCountGT number query

回應

回傳: GetPendingWebhookEventCount200Response

範例

getPendingWebhookEventCount 範例
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$tenant_id = 'tenant_id_example'; // 字串
18$comment_id = 'comment_id_example'; // 字串
19$external_id = 'external_id_example'; // 字串
20$event_type = 'event_type_example'; // 字串
21$type = 'type_example'; // 字串
22$domain = 'domain_example'; // 字串
23$attempt_count_gt = 3.4; // 浮點數
24
25try {
26 $result = $apiInstance->getPendingWebhookEventCount($tenant_id, $comment_id, $external_id, $event_type, $type, $domain, $attempt_count_gt);
27 print_r($result);
28} catch (Exception $e) {
29 echo 'Exception when calling DefaultApi->getPendingWebhookEventCount: ', $e->getMessage(), PHP_EOL;
30}
31

取得待處理的 Webhook 事件 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string query
commentId string query
externalId string query
eventType string query
type string query
domain string query
attemptCountGT number query
skip number query

回應

回傳: GetPendingWebhookEvents200Response

範例

getPendingWebhookEvents 範例
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$tenant_id = 'tenant_id_example'; // string
19$comment_id = 'comment_id_example'; // string
20$external_id = 'external_id_example'; // string
21$event_type = 'event_type_example'; // string
22$type = 'type_example'; // string
23$domain = 'domain_example'; // string
24$attempt_count_gt = 3.4; // float
25$skip = 3.4; // float
26
27try {
28 $result = $apiInstance->getPendingWebhookEvents($tenant_id, $comment_id, $external_id, $event_type, $type, $domain, $attempt_count_gt, $skip);
29 print_r($result);
30} catch (Exception $e) {
31 echo 'Exception when calling DefaultApi->getPendingWebhookEvents: ', $e->getMessage(), PHP_EOL;
32}
33

建立問題設定 Internal Link

參數

Name Type Location Required Description
tenantId string query Yes

回應

回傳: CreateQuestionConfig200Response

範例

createQuestionConfig 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 設定 API 金鑰授權:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 若需要,取消註解下面以設定 API 金鑰的前綴(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 若要使用自訂的 HTTP 用戶端,請傳入實作 `GuzzleHttp\ClientInterface` 的用戶端。
14 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18$tenant_id = 'tenant_id_example'; // string
19$create_question_config_body = new \FastComments\Client\Model\CreateQuestionConfigBody(); // \FastComments\Client\Model\CreateQuestionConfigBody
20
21try {
22 $result = $apiInstance->createQuestionConfig($tenant_id, $create_question_config_body);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling DefaultApi->createQuestionConfig: ', $e->getMessage(), PHP_EOL;
26}
27

刪除問題設定 Internal Link

參數

Name Type Location Required Description
tenantId string query
id string path

Response

回傳: FlagCommentPublic200Response

範例

deleteQuestionConfig 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 設定 API 金鑰授權:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 若需要,取消註解下列內容以設定 API 金鑰的前綴(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果想使用自訂 http 客戶端,傳入實作了 `GuzzleHttp\ClientInterface` 的客戶端。
14 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18$tenant_id = 'tenant_id_example'; // string
19$id = 'id_example'; // string
20
21try {
22 $result = $apiInstance->deleteQuestionConfig($tenant_id, $id);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling DefaultApi->deleteQuestionConfig: ', $e->getMessage(), PHP_EOL;
26}
27

取得問題設定 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string query
id string path

回應

回傳: GetQuestionConfig200Response

範例

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

取得問題設定列表 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string query
skip number query

回應

回傳: GetQuestionConfigs200Response

範例

getQuestionConfigs 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 設定 API Key 授權:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如有需要,取消註解以下以設定 API Key 的前綴(例如 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$tenant_id = 'tenant_id_example'; // 字串
19$skip = 3.4; // 浮點數
20
21try {
22 $result = $apiInstance->getQuestionConfigs($tenant_id, $skip);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling DefaultApi->getQuestionConfigs: ', $e->getMessage(), PHP_EOL;
26}
27

更新問題設定 Internal Link

參數

名稱 型別 位置 必填 說明
tenantId string query
id string path

回應

回傳: FlagCommentPublic200Response

範例

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 // 若要使用自訂的 HTTP client,請傳入實作了 `GuzzleHttp\ClientInterface` 的 client。
15 // This is optional, `GuzzleHttp\Client` will be used as default.
16 // 這是選用的,預設會使用 `GuzzleHttp\Client`。
17 new GuzzleHttp\Client(),
18 $config
19);
20$tenant_id = 'tenant_id_example'; // string
21$id = 'id_example'; // string
22$update_question_config_body = new \FastComments\Client\Model\UpdateQuestionConfigBody(); // \FastComments\Client\Model\UpdateQuestionConfigBody
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

參數

名稱 型別 位置 必需 說明
tenantId string query Yes

回應

回傳: CreateQuestionResult200Response

範例

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$tenant_id = 'tenant_id_example'; // string
19$create_question_result_body = new \FastComments\Client\Model\CreateQuestionResultBody(); // \FastComments\Client\Model\CreateQuestionResultBody
20
21try {
22 $result = $apiInstance->createQuestionResult($tenant_id, $create_question_result_body);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling DefaultApi->createQuestionResult: ', $e->getMessage(), PHP_EOL;
26}
27

刪除問題結果 Internal Link

參數

Name Type Location Required Description
tenantId string query Yes
id string path Yes

回傳

回傳: FlagCommentPublic200Response

範例

deleteQuestionResult 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 設定 API Key 授權:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如有需要,取消註解下方以設定 API key 的前綴(例如 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$tenant_id = 'tenant_id_example'; // string
19$id = 'id_example'; // string
20
21try {
22 $result = $apiInstance->deleteQuestionResult($tenant_id, $id);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling DefaultApi->deleteQuestionResult: ', $e->getMessage(), PHP_EOL;
26}
27

取得問題結果 Internal Link

參數

名稱 型別 位置 必填 描述
tenantId string query Yes
id string path Yes

回應

回傳: GetQuestionResult200Response

範例

getQuestionResult 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 設定 API 金鑰授權:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如需設定 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$tenant_id = 'tenant_id_example'; // string
19$id = 'id_example'; // string
20
21try {
22 $result = $apiInstance->getQuestionResult($tenant_id, $id);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling DefaultApi->getQuestionResult: ', $e->getMessage(), PHP_EOL;
26}
27

取得問題結果列表 Internal Link

參數

Name Type Location Required Description
tenantId string query
urlId string query
userId string query
startDate string query
questionId string query
questionIds string query
skip number query

回應

回傳: GetQuestionResults200Response

範例

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

更新問題結果 Internal Link

參數

Name Type Location Required Description
tenantId string query Yes
id string path Yes

回應

回傳: FlagCommentPublic200Response

範例

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

彙總問題結果 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string query
questionId string query
questionIds array query
urlId string query
timeBucket string query
startDate string query
forceRecalculate boolean query

回應

回傳:AggregateQuestionResults200Response

範例

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$tenant_id = 'tenant_id_example'; // string
19$question_id = 'question_id_example'; // string
20$question_ids = array('question_ids_example'); // string[]
21$url_id = 'url_id_example'; // string
22$time_bucket = new \FastComments\Client\Model\\FastComments\Client\Model\AggregateTimeBucket(); // \FastComments\Client\Model\AggregateTimeBucket
23$start_date = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime
24$force_recalculate = True; // bool
25
26try {
27 $result = $apiInstance->aggregateQuestionResults($tenant_id, $question_id, $question_ids, $url_id, $time_bucket, $start_date, $force_recalculate);
28 print_r($result);
29} catch (Exception $e) {
30 echo 'Exception when calling DefaultApi->aggregateQuestionResults: ', $e->getMessage(), PHP_EOL;
31}
32

批次彙總問題結果 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string query
forceRecalculate boolean query

回應

回傳: BulkAggregateQuestionResults200Response

範例

bulkAggregateQuestionResults 範例
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 client,請傳入實作 `GuzzleHttp\ClientInterface` 的 client。
14 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18$tenant_id = 'tenant_id_example'; // string
19$bulk_aggregate_question_results_request = new \FastComments\Client\Model\BulkAggregateQuestionResultsRequest(); // \FastComments\Client\Model\BulkAggregateQuestionResultsRequest
20$force_recalculate = True; // bool
21
22try {
23 $result = $apiInstance->bulkAggregateQuestionResults($tenant_id, $bulk_aggregate_question_results_request, $force_recalculate);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling DefaultApi->bulkAggregateQuestionResults: ', $e->getMessage(), PHP_EOL;
27}
28

將評論與問題結果結合 Internal Link

參數

Name Type Location Required Description
tenantId string query
questionId string query
questionIds array query
urlId string query
startDate string query
forceRecalculate boolean query
minValue number query
maxValue number query
limit number query

回應

回傳: CombineCommentsWithQuestionResults200Response

範例

combineCommentsWithQuestionResults 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 設定 API 金鑰授權:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如有需要,取消註解下列以設定 API 金鑰的前綴 (例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 若要使用自訂 http 用戶端,請傳入實作 `GuzzleHttp\ClientInterface` 的用戶端。
14 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18$tenant_id = 'tenant_id_example'; // string
19$question_id = 'question_id_example'; // string
20$question_ids = array('question_ids_example'); // string[]
21$url_id = 'url_id_example'; // string
22$start_date = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime
23$force_recalculate = True; // bool
24$min_value = 3.4; // float
25$max_value = 3.4; // float
26$limit = 3.4; // float
27
28try {
29 $result = $apiInstance->combineCommentsWithQuestionResults($tenant_id, $question_id, $question_ids, $url_id, $start_date, $force_recalculate, $min_value, $max_value, $limit);
30 print_r($result);
31} catch (Exception $e) {
32 echo 'Exception when calling DefaultApi->combineCommentsWithQuestionResults: ', $e->getMessage(), PHP_EOL;
33}
34

新增 SSO 使用者 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string query

回應

回傳: 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$tenant_id = 'tenant_id_example'; // string
19$create_apisso_user_data = new \FastComments\Client\Model\CreateAPISSOUserData(); // \FastComments\Client\Model\CreateAPISSOUserData
20
21try {
22 $result = $apiInstance->addSSOUser($tenant_id, $create_apisso_user_data);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling DefaultApi->addSSOUser: ', $e->getMessage(), PHP_EOL;
26}
27

刪除 SSO 使用者 Internal Link

參數

Name Type Location Required Description
tenantId string query Yes
id string path Yes
deleteComments boolean query No
commentDeleteMode string query No

回應

回傳: DeleteSSOUserAPIResponse

範例

deleteSSOUser 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 設定 API 金鑰授權:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 若需要,取消註解下面以設定前綴(例如 Bearer)用於 API 金鑰
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果想使用自訂的 HTTP 用戶端,傳入實作 `GuzzleHttp\ClientInterface` 的用戶端。
14 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18$tenant_id = 'tenant_id_example'; // 字串
19$id = 'id_example'; // 字串
20$delete_comments = True; // 布林
21$comment_delete_mode = 'comment_delete_mode_example'; // 字串
22
23try {
24 $result = $apiInstance->deleteSSOUser($tenant_id, $id, $delete_comments, $comment_delete_mode);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->deleteSSOUser: ', $e->getMessage(), PHP_EOL;
28}
29

以電子郵件取得 SSO 使用者 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string 查詢
email string 路徑

回應

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

以 Id 取得 SSO 使用者 Internal Link

參數

Name Type Location Required Description
tenantId string query
id string path

回應

回傳: GetSSOUserByIdAPIResponse

範例

getSSOUserById 範例
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// 如有需要,取消註解以下以為 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$tenant_id = 'tenant_id_example'; // string
19$id = 'id_example'; // string
20
21try {
22 $result = $apiInstance->getSSOUserById($tenant_id, $id);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling DefaultApi->getSSOUserById: ', $e->getMessage(), PHP_EOL;
26}
27

取得 SSO 使用者列表 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string query
skip integer query

回應

回傳:GetSSOUsers200Response

範例

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

部分更新 SSO 使用者 Internal Link

參數

名稱 類型 位置 必填 描述
tenantId string query
id string path
updateComments boolean query

回應

回傳: 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// 如有需要,取消註解以下以為 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$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
23try {
24 $result = $apiInstance->patchSSOUser($tenant_id, $id, $update_apisso_user_data, $update_comments);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->patchSSOUser: ', $e->getMessage(), PHP_EOL;
28}
29

替換 SSO 使用者 Internal Link

參數

名稱 類型 位置 必要 描述
tenantId string query
id string path
updateComments boolean query

回應

回傳:PutSSOUserAPIResponse

範例

putSSOUser 範例
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 client,請傳入實作 `GuzzleHttp\ClientInterface` 的 client。
14 // 此為可選項,預設會使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
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
23try {
24 $result = $apiInstance->putSSOUser($tenant_id, $id, $update_apisso_user_data, $update_comments);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->putSSOUser: ', $e->getMessage(), PHP_EOL;
28}
29

建立訂閱 Internal Link

參數

名稱 類型 位於 必需 描述
tenantId string query Yes

回應

回傳: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// 如有需要,取消註解以下以設定前綴(例如 Bearer)給 API 金鑰
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果要使用自訂的 http client,請傳入實作 `GuzzleHttp\ClientInterface` 的客戶端。
14 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18$tenant_id = 'tenant_id_example'; // 字串
19$create_api_user_subscription_data = new \FastComments\Client\Model\CreateAPIUserSubscriptionData(); // \FastComments\Client\Model\CreateAPIUserSubscriptionData
20
21try {
22 $result = $apiInstance->createSubscription($tenant_id, $create_api_user_subscription_data);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling DefaultApi->createSubscription: ', $e->getMessage(), PHP_EOL;
26}
27

刪除訂閱 Internal Link

參數

Name Type Location Required Description
tenantId string query
id string path
userId string query

回應

回傳: DeleteSubscriptionAPIResponse

範例

deleteSubscription 範例
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// 若需要,取消註解下列以設定 API 金鑰的前綴(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 若要使用自訂的 http client,請傳入實作 `GuzzleHttp\ClientInterface` 的 client。
14 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18$tenant_id = 'tenant_id_example'; // 字串
19$id = 'id_example'; // 字串
20$user_id = 'user_id_example'; // 字串
21
22try {
23 $result = $apiInstance->deleteSubscription($tenant_id, $id, $user_id);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling DefaultApi->deleteSubscription: ', $e->getMessage(), PHP_EOL;
27}
28

取得訂閱 Internal Link

參數

名稱 型別 位置 必填 說明
tenantId string query
userId string query

回應

回傳: GetSubscriptionsAPIResponse

範例

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

取得租戶每日使用量 Internal Link

參數

Name Type Location Required Description
tenantId string query
yearNumber number query
monthNumber number query
dayNumber number query
skip number query

回應

回傳: GetTenantDailyUsages200Response

範例

getTenantDailyUsages 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 設定 API 金鑰授權:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如有需要,取消註解下方以為 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$tenant_id = 'tenant_id_example'; // 字串
19$year_number = 3.4; // 浮點數
20$month_number = 3.4; // 浮點數
21$day_number = 3.4; // 浮點數
22$skip = 3.4; // 浮點數
23
24try {
25 $result = $apiInstance->getTenantDailyUsages($tenant_id, $year_number, $month_number, $day_number, $skip);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling DefaultApi->getTenantDailyUsages: ', $e->getMessage(), PHP_EOL;
29}
30

建立租戶方案 Internal Link

參數

名稱 類型 位置 必填 描述
tenantId string query

回應

回傳: CreateTenantPackage200Response

範例

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 key 的前綴(例如 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$tenant_id = 'tenant_id_example'; // string
19$create_tenant_package_body = new \FastComments\Client\Model\CreateTenantPackageBody(); // \FastComments\Client\Model\CreateTenantPackageBody
20
21try {
22 $result = $apiInstance->createTenantPackage($tenant_id, $create_tenant_package_body);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling DefaultApi->createTenantPackage: ', $e->getMessage(), PHP_EOL;
26}
27

刪除租戶方案 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string query
id string path

回應

回傳: FlagCommentPublic200Response

範例

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

取得租戶方案 Internal Link

參數

名稱 型別 位置 必須 說明
tenantId string query
id string path

回應

回傳: GetTenantPackage200Response

範例

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

取得租戶方案列表 Internal Link

參數

Name Type Location Required Description
tenantId string query
skip number query

回應

回傳: GetTenantPackages200Response

範例

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

替換租戶方案 Internal Link

參數

名稱 類型 位置 必填 描述
tenantId string query
id string path

回應

回傳: FlagCommentPublic200Response

範例

replaceTenantPackage 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 設定 API 金鑰授權:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 若需要,取消註解下列以設定 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$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
22try {
23 $result = $apiInstance->replaceTenantPackage($tenant_id, $id, $replace_tenant_package_body);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling DefaultApi->replaceTenantPackage: ', $e->getMessage(), PHP_EOL;
27}
28

更新租戶方案 Internal Link

參數

Name Type Location Required Description
tenantId string query
id string path

回應

回傳: FlagCommentPublic200Response

範例

updateTenantPackage 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 設定 API 金鑰授權:api_key
8// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
9// 如有需要,請取消註解下方以設定 API 金鑰前綴(例如 Bearer)
10// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
11
12
13$apiInstance = new FastComments\Client\Api\DefaultApi(
14 // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
15 // 若要使用自訂的 HTTP 客戶端,請傳入實作 `GuzzleHttp\ClientInterface` 的客戶端。
16 // This is optional, `GuzzleHttp\Client` will be used as default.
17 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
18 new GuzzleHttp\Client(),
19 $config
20);
21$tenant_id = 'tenant_id_example'; // string
22$id = 'id_example'; // string
23$update_tenant_package_body = new \FastComments\Client\Model\UpdateTenantPackageBody(); // \FastComments\Client\Model\UpdateTenantPackageBody
24
25try {
26 $result = $apiInstance->updateTenantPackage($tenant_id, $id, $update_tenant_package_body);
27 print_r($result);
28} catch (Exception $e) {
29 echo 'Exception when calling DefaultApi->updateTenantPackage: ', $e->getMessage(), PHP_EOL;
30}
31

建立租戶使用者 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string query

回應

回傳:CreateTenantUser200Response

範例

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 client,請傳入實作 `GuzzleHttp\ClientInterface` 的 client。
14 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18$tenant_id = 'tenant_id_example'; // 字串
19$create_tenant_user_body = new \FastComments\Client\Model\CreateTenantUserBody(); // \FastComments\Client\Model\CreateTenantUserBody
20
21try {
22 $result = $apiInstance->createTenantUser($tenant_id, $create_tenant_user_body);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling DefaultApi->createTenantUser: ', $e->getMessage(), PHP_EOL;
26}
27

刪除租戶使用者 Internal Link

參數

Name Type Location Required Description
tenantId string query
id string path
deleteComments string query
commentDeleteMode string query

回應

回傳: FlagCommentPublic200Response

範例

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

取得租戶使用者 Internal Link

參數

Name Type Location Required Description
tenantId string query
id string path

回應

回傳: GetTenantUser200Response

範例

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

取得租戶使用者列表 Internal Link

參數

Name Type Location Required Description
tenantId string query
skip number query

回應

回傳: GetTenantUsers200Response

範例

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

替換租戶使用者 Internal Link

參數

Name Type Location Required Description
tenantId string query
id string path
updateComments string query

回應

回傳:FlagCommentPublic200Response

範例

replaceTenantUser 範例
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$tenant_id = 'tenant_id_example'; // string
19$id = 'id_example'; // string
20$replace_tenant_user_body = new \FastComments\Client\Model\ReplaceTenantUserBody(); // \FastComments\Client\Model\ReplaceTenantUserBody
21$update_comments = 'update_comments_example'; // string
22
23try {
24 $result = $apiInstance->replaceTenantUser($tenant_id, $id, $replace_tenant_user_body, $update_comments);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->replaceTenantUser: ', $e->getMessage(), PHP_EOL;
28}
29

參數

名稱 類型 位置 必填 描述
tenantId string query Yes
id string path Yes
redirectURL string query No

回應

回傳: FlagCommentPublic200Response

範例

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

更新租戶使用者 Internal Link

參數

Name Type Location Required Description
tenantId string query
id string path
updateComments string query

回應

回傳: FlagCommentPublic200Response

範例

updateTenantUser 範例
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// 如有需要,取消註解下方以為 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$tenant_id = 'tenant_id_example'; // string
22$id = 'id_example'; // string
23$update_tenant_user_body = new \FastComments\Client\Model\UpdateTenantUserBody(); // \FastComments\Client\Model\UpdateTenantUserBody
24$update_comments = 'update_comments_example'; // string
25
26try {
27 $result = $apiInstance->updateTenantUser($tenant_id, $id, $update_tenant_user_body, $update_comments);
28 print_r($result);
29} catch (Exception $e) {
30 echo 'Exception when calling DefaultApi->updateTenantUser: ', $e->getMessage(), PHP_EOL;
31}
32

建立租戶 Internal Link

參數

名稱 類型 位置 必填 描述
tenantId string query

回應

回傳:CreateTenant200Response

範例

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 金鑰的前綴 (e.g. 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$tenant_id = 'tenant_id_example'; // 字串
19$create_tenant_body = new \FastComments\Client\Model\CreateTenantBody(); // \FastComments\Client\Model\CreateTenantBody
20
21try {
22 $result = $apiInstance->createTenant($tenant_id, $create_tenant_body);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling DefaultApi->createTenant: ', $e->getMessage(), PHP_EOL;
26}
27

刪除租戶 Internal Link

參數

名稱 型別 位置 必填 說明
tenantId string query
id string path
sure string query

回應

回傳: FlagCommentPublic200Response

範例

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

取得租戶 Internal Link


參數

Name Type Location Required Description
tenantId string query
id string path

回應

回傳: GetTenant200Response

範例

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

取得租戶列表 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string query
meta string query
skip number query

回應

回傳:GetTenants200Response

範例

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 client,請傳入實作了 `GuzzleHttp\ClientInterface` 的 client。
14 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18$tenant_id = 'tenant_id_example'; // string
19$meta = 'meta_example'; // string
20$skip = 3.4; // float
21
22try {
23 $result = $apiInstance->getTenants($tenant_id, $meta, $skip);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling DefaultApi->getTenants: ', $e->getMessage(), PHP_EOL;
27}
28

更新租戶 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string 查詢
id string 路徑

回應

回傳: FlagCommentPublic200Response

範例

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

上傳圖片 Internal Link

上傳並調整圖片大小

參數

Name Type Location Required Description
tenantId string path
sizePreset string query 大小預設: "Default" (1000x1000px) or "CrossPlatform" (creates sizes for popular devices)
urlId string query Page id that upload is happening from, to configure

回應

回傳: UploadImageResponse

範例

uploadImage 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6
7$apiInstance = new FastComments\Client\Api\PublicApi(
8 // 如果要使用自訂的 http 客戶端,傳入一個實作了 `GuzzleHttp\ClientInterface` 的客戶端。
9 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
10 new GuzzleHttp\Client()
11);
12$tenant_id = 'tenant_id_example'; // string
13$file = '/path/to/file.txt'; // \SplFileObject
14$size_preset = new \FastComments\Client\Model\\FastComments\Client\Model\SizePreset(); // \FastComments\Client\Model\SizePreset | 大小預設: \"Default\" (1000x1000px) 或 \"CrossPlatform\" (為熱門裝置建立尺寸)
15$url_id = 'url_id_example'; // string | 上傳發生的頁面 id,用於設定
16
17try {
18 $result = $apiInstance->uploadImage($tenant_id, $file, $size_preset, $url_id);
19 print_r($result);
20} catch (Exception $e) {
21 echo 'Exception when calling PublicApi->uploadImage: ', $e->getMessage(), PHP_EOL;
22}
23

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

參數

Name Type Location Required Description
tenantId string query
id string path

回應

回傳:GetUserBadgeProgressById200Response

範例

getUserBadgeProgressById 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// Configure API key authorization: api_key
7// 設定 API 金鑰授權:api_key
8$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$tenant_id = 'tenant_id_example'; // string
23$id = 'id_example'; // string
24
25try {
26 $result = $apiInstance->getUserBadgeProgressById($tenant_id, $id);
27 print_r($result);
28} catch (Exception $e) {
29 echo 'Exception when calling DefaultApi->getUserBadgeProgressById: ', $e->getMessage(), PHP_EOL;
30}
31

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

參數

Name Type Location Required Description
tenantId string query
userId string path

回應

回傳:GetUserBadgeProgressById200Response

範例

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

取得使用者徽章進度列表 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string query
userId string query
limit number query
skip number query

回應

回傳: GetUserBadgeProgressList200Response

範例

getUserBadgeProgressList Example
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$tenant_id = 'tenant_id_example'; // string
19$user_id = 'user_id_example'; // string
20$limit = 3.4; // float
21$skip = 3.4; // float
22
23try {
24 $result = $apiInstance->getUserBadgeProgressList($tenant_id, $user_id, $limit, $skip);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->getUserBadgeProgressList: ', $e->getMessage(), PHP_EOL;
28}
29

建立使用者徽章 Internal Link

參數

名稱 型別 位置 必填 描述
tenantId string query

回應

回傳: CreateUserBadge200Response

範例

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

刪除使用者徽章 Internal Link


參數

名稱 類型 位置 必填 描述
tenantId string query
id string path

回應

回傳: UpdateUserBadge200Response

範例

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

取得使用者徽章 Internal Link

參數

Name Type Location Required Description
tenantId string query
id string path

回應

回傳: GetUserBadge200Response

範例

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

取得使用者徽章列表 Internal Link

參數

名稱 類型 位置 必須 說明
tenantId string query
userId string query
badgeId string query
type number query
displayedOnComments boolean query
limit number query
skip number query

回應

回傳: GetUserBadges200Response

範例

getUserBadges 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 設定 API 金鑰授權:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 如有需要,取消註解下面以為 API 金鑰設定前綴(例如 Bearer)
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果想使用自訂的 HTTP 用戶端,請傳入實作 `GuzzleHttp\ClientInterface` 的用戶端。
14 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18$tenant_id = 'tenant_id_example'; // string
19$user_id = 'user_id_example'; // string
20$badge_id = 'badge_id_example'; // string
21$type = 3.4; // float
22$displayed_on_comments = True; // bool
23$limit = 3.4; // float
24$skip = 3.4; // float
25
26try {
27 $result = $apiInstance->getUserBadges($tenant_id, $user_id, $badge_id, $type, $displayed_on_comments, $limit, $skip);
28 print_r($result);
29} catch (Exception $e) {
30 echo 'Exception when calling DefaultApi->getUserBadges: ', $e->getMessage(), PHP_EOL;
31}
32

更新使用者徽章 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string query
id string path

回應

回傳: UpdateUserBadge200Response

範例

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

取得使用者通知數量 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string query
sso string query

回應

回傳: GetUserNotificationCount200Response

範例

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$tenant_id = 'tenant_id_example'; // 字串
13$sso = 'sso_example'; // 字串
14
15try {
16 $result = $apiInstance->getUserNotificationCount($tenant_id, $sso);
17 print_r($result);
18} catch (Exception $e) {
19 echo 'Exception when calling PublicApi->getUserNotificationCount: ', $e->getMessage(), PHP_EOL;
20}
21

取得使用者通知 Internal Link

參數

Name Type Location Required Description
tenantId string query
pageSize integer query
afterId string query
includeContext boolean query
afterCreatedAt integer query
unreadOnly boolean query
dmOnly boolean query
noDm boolean query
includeTranslations boolean query
sso string query

回應

回傳: GetUserNotifications200Response

範例

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$tenant_id = 'tenant_id_example'; // string
13$page_size = 56; // int
14$after_id = 'after_id_example'; // string
15$include_context = True; // bool
16$after_created_at = 56; // int
17$unread_only = True; // bool
18$dm_only = True; // bool
19$no_dm = True; // bool
20$include_translations = True; // bool
21$sso = 'sso_example'; // string
22
23try {
24 $result = $apiInstance->getUserNotifications($tenant_id, $page_size, $after_id, $include_context, $after_created_at, $unread_only, $dm_only, $no_dm, $include_translations, $sso);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling PublicApi->getUserNotifications: ', $e->getMessage(), PHP_EOL;
28}
29

重設使用者通知數量 Internal Link

參數

名稱 類型 位置 必填 描述
tenantId string query
sso string query

回應

回傳: ResetUserNotifications200Response

範例

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$tenant_id = 'tenant_id_example'; // 字串
13$sso = 'sso_example'; // 字串
14
15try {
16 $result = $apiInstance->resetUserNotificationCount($tenant_id, $sso);
17 print_r($result);
18} catch (Exception $e) {
19 echo 'Exception when calling PublicApi->resetUserNotificationCount: ', $e->getMessage(), PHP_EOL;
20}
21

重設使用者通知 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string query
afterId string query
afterCreatedAt integer query
unreadOnly boolean query
dmOnly boolean query
noDm boolean query
sso string query

回應

回傳:ResetUserNotifications200Response

範例

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$tenant_id = 'tenant_id_example'; // string
13$after_id = 'after_id_example'; // string
14$after_created_at = 56; // int
15$unread_only = True; // bool
16$dm_only = True; // bool
17$no_dm = True; // bool
18$sso = 'sso_example'; // string
19
20try {
21 $result = $apiInstance->resetUserNotifications($tenant_id, $after_id, $after_created_at, $unread_only, $dm_only, $no_dm, $sso);
22 print_r($result);
23} catch (Exception $e) {
24 echo 'Exception when calling PublicApi->resetUserNotifications: ', $e->getMessage(), PHP_EOL;
25}
26

更新使用者評論訂閱狀態 Internal Link

啟用或停用特定留言的通知。

參數

名稱 類型 位置 必填 說明
tenantId string query
notificationId string path
optedInOrOut string path
commentId string query
sso string query

回應

回傳:UpdateUserNotificationStatus200Response

範例

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$tenant_id = 'tenant_id_example'; // string
13$notification_id = 'notification_id_example'; // string
14$opted_in_or_out = 'opted_in_or_out_example'; // string
15$comment_id = 'comment_id_example'; // string
16$sso = 'sso_example'; // string
17
18try {
19 $result = $apiInstance->updateUserNotificationCommentSubscriptionStatus($tenant_id, $notification_id, $opted_in_or_out, $comment_id, $sso);
20 print_r($result);
21} catch (Exception $e) {
22 echo 'Exception when calling PublicApi->updateUserNotificationCommentSubscriptionStatus: ', $e->getMessage(), PHP_EOL;
23}
24

更新使用者頁面訂閱狀態 Internal Link


啟用或停用頁面的通知。當使用者訂閱某頁面時,系統會在有新的根留言時建立通知,並且也會

參數

Name Type Location Required Description
tenantId string query
urlId string query
url string query
pageTitle string query
subscribedOrUnsubscribed string path
sso string query

回應

回傳: UpdateUserNotificationStatus200Response

範例

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$tenant_id = 'tenant_id_example'; // string
13$url_id = 'url_id_example'; // string
14$url = 'url_example'; // string
15$page_title = 'page_title_example'; // string
16$subscribed_or_unsubscribed = 'subscribed_or_unsubscribed_example'; // string
17$sso = 'sso_example'; // string
18
19try {
20 $result = $apiInstance->updateUserNotificationPageSubscriptionStatus($tenant_id, $url_id, $url, $page_title, $subscribed_or_unsubscribed, $sso);
21 print_r($result);
22} catch (Exception $e) {
23 echo 'Exception when calling PublicApi->updateUserNotificationPageSubscriptionStatus: ', $e->getMessage(), PHP_EOL;
24}
25

更新使用者通知狀態 Internal Link

參數

名稱 類型 位置 必需 描述
tenantId string query
notificationId string path
newStatus string path
sso string query

回應

回傳: UpdateUserNotificationStatus200Response

範例

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$tenant_id = 'tenant_id_example'; // 字串
13$notification_id = 'notification_id_example'; // 字串
14$new_status = 'new_status_example'; // 字串
15$sso = 'sso_example'; // 字串
16
17try {
18 $result = $apiInstance->updateUserNotificationStatus($tenant_id, $notification_id, $new_status, $sso);
19 print_r($result);
20} catch (Exception $e) {
21 echo 'Exception when calling PublicApi->updateUserNotificationStatus: ', $e->getMessage(), PHP_EOL;
22}
23

取得使用者在線狀態 Internal Link

參數

Name Type Location Required Description
tenantId string query
urlIdWS string query
userIds string query

回應

回傳: GetUserPresenceStatuses200Response

範例

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$tenant_id = 'tenant_id_example'; // 字串
13$url_id_ws = 'url_id_ws_example'; // 字串
14$user_ids = 'user_ids_example'; // 字串
15
16try {
17 $result = $apiInstance->getUserPresenceStatuses($tenant_id, $url_id_ws, $user_ids);
18 print_r($result);
19} catch (Exception $e) {
20 echo 'Exception when calling PublicApi->getUserPresenceStatuses: ', $e->getMessage(), PHP_EOL;
21}
22

搜尋使用者 Internal Link

參數

Name Type Location Required Description
tenantId string path Yes
urlId string query Yes
usernameStartsWith string query Yes
mentionGroupIds array query No
sso string query No

回應

回傳: SearchUsers200Response

範例

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$tenant_id = 'tenant_id_example'; // string
13$url_id = 'url_id_example'; // string
14$username_starts_with = 'username_starts_with_example'; // string
15$mention_group_ids = array('mention_group_ids_example'); // string[]
16$sso = 'sso_example'; // string
17
18try {
19 $result = $apiInstance->searchUsers($tenant_id, $url_id, $username_starts_with, $mention_group_ids, $sso);
20 print_r($result);
21} catch (Exception $e) {
22 echo 'Exception when calling PublicApi->searchUsers: ', $e->getMessage(), PHP_EOL;
23}
24

取得使用者 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string query
id string path

回應

回傳: GetUser200Response

範例

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// 如有需要,取消註解下列以設定 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$tenant_id = 'tenant_id_example'; // string
19$id = 'id_example'; // string
20
21try {
22 $result = $apiInstance->getUser($tenant_id, $id);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling DefaultApi->getUser: ', $e->getMessage(), PHP_EOL;
26}
27

建立投票 Internal Link

參數

名稱 類型 位置 必填 描述
tenantId string query
commentId string query
direction string query
userId string query
anonUserId string query

回應

回傳: VoteComment200Response

範例

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$tenant_id = 'tenant_id_example'; // string
19$comment_id = 'comment_id_example'; // string
20$direction = 'direction_example'; // string
21$user_id = 'user_id_example'; // string
22$anon_user_id = 'anon_user_id_example'; // string
23
24try {
25 $result = $apiInstance->createVote($tenant_id, $comment_id, $direction, $user_id, $anon_user_id);
26 print_r($result);
27} catch (Exception $e) {
28 echo 'Exception when calling DefaultApi->createVote: ', $e->getMessage(), PHP_EOL;
29}
30

刪除投票 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string query
id string path
editKey string query

回應

回傳:DeleteCommentVote200Response

範例

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// 如有需要,取消註解以下以設定 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$tenant_id = 'tenant_id_example'; // 字串
19$id = 'id_example'; // 字串
20$edit_key = 'edit_key_example'; // 字串
21
22try {
23 $result = $apiInstance->deleteVote($tenant_id, $id, $edit_key);
24 print_r($result);
25} catch (Exception $e) {
26 echo 'Exception when calling DefaultApi->deleteVote: ', $e->getMessage(), PHP_EOL;
27}
28

取得投票 Internal Link

參數

名稱 類型 位置 必填 描述
tenantId string query Yes
urlId string query Yes

回應

回傳: GetVotes200Response

範例

getVotes 範例
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 // 如果要使用自訂的 HTTP 客戶端,傳入實作了 `GuzzleHttp\ClientInterface` 的客戶端。
14 // 這是可選的;預設會使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18$tenant_id = 'tenant_id_example'; // string
19$url_id = 'url_id_example'; // string
20
21try {
22 $result = $apiInstance->getVotes($tenant_id, $url_id);
23 print_r($result);
24} catch (Exception $e) {
25 echo 'Exception when calling DefaultApi->getVotes: ', $e->getMessage(), PHP_EOL;
26}
27

取得使用者的投票 Internal Link

參數

名稱 類型 位置 必填 說明
tenantId string query
urlId string query
userId string query
anonUserId string query

回應

回傳: GetVotesForUser200Response

範例

getVotesForUser 範例
Copy Copy
1
2<?php
3require_once(__DIR__ . '/vendor/autoload.php');
4
5
6// 設定 API 金鑰授權:api_key
7$config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
8// 取消下行註解以設定前綴(例如 Bearer)用於 API 金鑰,如有需要
9// $config = FastComments\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');
10
11
12$apiInstance = new FastComments\Client\Api\DefaultApi(
13 // 如果您想使用自訂的 http 客戶端,請傳入實作了 `GuzzleHttp\ClientInterface` 的客戶端。
14 // 這是可選的,預設會使用 `GuzzleHttp\Client`。
15 new GuzzleHttp\Client(),
16 $config
17);
18$tenant_id = 'tenant_id_example'; // 字串
19$url_id = 'url_id_example'; // 字串
20$user_id = 'user_id_example'; // 字串
21$anon_user_id = 'anon_user_id_example'; // 字串
22
23try {
24 $result = $apiInstance->getVotesForUser($tenant_id, $url_id, $user_id, $anon_user_id);
25 print_r($result);
26} catch (Exception $e) {
27 echo 'Exception when calling DefaultApi->getVotesForUser: ', $e->getMessage(), PHP_EOL;
28}
29

需要幫助?

如果您在使用 PHP SDK 時遇到任何問題或有任何疑問,請:

貢獻

歡迎貢獻!請造訪 GitHub 儲存庫 以查看貢獻指南。