mirror of
https://github.com/cubixle/trustpilot-api-wrapper.git
synced 2026-04-24 21:14:45 +01:00
536 B
536 B
trustpilot-api-wrapper
Simple wrapper for the trustpilot api.
Currently only supports the api to retreive a companies reviews.
<?php
$dir = dirname(__DIR__);
include $dir . '/vendor/autoload.php';
$trustPilot = new \LukeRodham\TrustPilot\TrustPilot($apikey = '');
$reviews = $trustPilot->reviews()->latest(['language' => 'en']);
$starRating = $trustPilot->reviews()->getStarRating();
$numberOfReviews = $trustPilot()->reviews()->getTotalNumberOfReviews();
$trustScore = $trustPilot()->reviews()->getTrustScore();