valentinfily/trustpilot-invitation-api
Composer 安装命令:
composer create-project valentinfily/trustpilot-invitation-api
包简介
A PHP library for accessing the Trustpilot Invitation API and fetching recieved Product reviews
README 文档
README
A PHP library for accessing the Trustpilot Invitation API.
Install
Install using composer:
composer install itspirit/trustpilot-invitation-api
Usage Invitation
use Trustpilot\Api\Authenticator\Authenticator; use Trustpilot\Api\Invitation\Client; use Trustpilot\Api\Invitation\Recipient; use Trustpilot\Api\Invitation\Sender; use Trustpilot\Api\Invitation\Context; $authenticator = new Authenticator($apiKey, $apiToken, $username, $password); $accessToken = $authenticator->getAccessToken(); $client = new Client($accessToken); $context = new Context($businessUnitId, $templateId, $redirectUri); // The last two arguments to the Context constructor ($tags and $locale) are optional // $context = new Context($templateId, $redirectUri, $tags = array(), $locale = 'en-US'); $recipient = new Recipient($recipientEmail, $recipientName); $sender = new Sender($senderEmail, $senderName, $replyTo); $client->invite($context, $recipient, $sender, $reference) /* : array */
Usage fetch Product reviews
use Trustpilot\Api\Authenticator\Authenticator; use Trustpilot\Api\Invitation\Client; $authenticator = new Authenticator($apiKey, $apiToken, $username, $password); $accessToken = $authenticator->getAccessToken(); $client = new Client($accessToken); $reviews = $client->getProductReviews(TRUSTPILOT_BUSINESS_UNIT_ID, null, ['published', 'unpublished', 'underModeration', 'archived'], 'de', $page, 100)
统计信息
- 总下载量: 497
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-05-13