dev-master
9999999-devPHP library for communication with the Trustpilot API
MIT
The Requires
The Development Requires
by Lars Nieuwenhuizen
Wallogit.com
2017 © Pedro Peláez
PHP library for communication with the Trustpilot API
PHP library for communication with Trustpilot, (*2)
This package is currently being developed (12-04-2017), (*3)
This package will first only support the public routes which require access through api key. Later on the private requests will be added with oAuth support., (*4)
The configuration class with search for a config.yaml file in the root of the project and use those settings by default., (*5)
You can also define a different file using the Configuration constructor like this:, (*6)
$configuration = new Trustpilot\Configuration('path/to/my/config.yaml');
If you've got that file, configuration can be set as such:, (*7)
TrustPilot: baseUrl: 'https://api.trustpilot.com/' basePath: 'v1/' resultsPerPage: 5 orderBy: 'createdat.desc' apiKey: 'myApiKey'
If you do not have a yaml file the Configuration can be created using the setters. The setters can always be used to override any Configuration property., (*8)
$configuration = new \LarsNieuwenhuizen\Trustpilot\Configuration();
$configuration->setBaseUrl('https://api.trustpilot.com/')
->setBasePath('v1/')
->setDefaultResultsPerPage(5)
->setDefaultOrderBy('createdat.desc')
->setApiKey('apikey');
$client = new \LarsNieuwenhuizen\Trustpilot\Client($configuration);
$result = $client->businessDataService->getAllBusinessUnits();
$ composer require larsnieuwenhuizen/trustpilot
PHP library for communication with the Trustpilot API
MIT