rrortega/trustpilot-review-collector
Composer 安装命令:
composer require rrortega/trustpilot-review-collector
包简介
TrustpilotReviewCollector is a PHP class designed to fetch and parse profile business data and reviews from Trustpilot.com
README 文档
README
Retrive data from Trustpilot.com TrustpilotReviewCollector is a PHP class designed to fetch and parse reviews and business profile from Trustpilot.com for a specified business unit ID. It supports pagination and allows customization of the number of reviews to fetch, sorting, and ordering. The class uses Symfony\DomCrawler and Symfony\HttpClient.
Installation
You can install TrustpilotReviewCollector library via Composer:
composer require rrortega/trustpilot-review-collector
Usage
Here's an example of how to use TrustpilotReviewCollector:
use RRO\Review\Collector\TrustpilotReviewCollector; $businessUnitId="www.google.com"; $count=5; $orderby = 'time'; $order = 'desc' $trustpilot = new TrustpilotReviewCollector($businessUnitId,$count, $orderby , $order ); $reviews = $trustpilot->getReviews(); // The fetched reviews include details such as review ID, user, avatar, verified status, title, URL, content, rating, time,answer and answer_time. foreach($reviews as $r){ // echo $r["id"]; // echo $r["user"]; // echo $r["avatar"]; // echo $r["verified"]; //true if user is verified in truspilot // echo $r["iso"];//user country iso2 // echo $r["title"]; // echo $r["url"]; // echo $r["body"]; // echo $r["rating"]; //1 to 5 float value // echo $r["time"]; //ex: 2023-03-20T13:30:34.000Z } // The profile include details such as business, category, website, logo, rating, qualification, and total_reviews. $details= $trustpilot->getReviews(); // echo $details["business"]; // echo $details["category"]; // echo $details["website"]; // echo $details["logo"]; // echo $details["rating"]; // echo $details["qualification"]; // echo $details["total_reviews"];
Testing
You can run the unit tests for TrustpilotReviewCollector Library using PHPUnit:
./vendor/bin/phpunit
License
TrustpilotReviewCollector Library is licensed under the MIT license. See the LICENSE file for more information.
NO SEAS MALITO Y REGÁLAME UN CAFECITO 👉 https://ko-fi.com/rrortega
rrortega/trustpilot-review-collector 适用场景与选型建议
rrortega/trustpilot-review-collector 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.87k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 03 月 22 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 rrortega/trustpilot-review-collector 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 rrortega/trustpilot-review-collector 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 2.87k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 10
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-03-22