2017 © Pedro Peláez
 

library trustpilot

PHP library for communication with the Trustpilot API

image

larsnieuwenhuizen/trustpilot

PHP library for communication with the Trustpilot API

  • Wednesday, May 31, 2017
  • by lars.nieuwenhuizen
  • Repository
  • 1 Watchers
  • 1 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Code Climate Test Coverage Build Status StyleCI, (*1)

Trustpilot

PHP library for communication with Trustpilot, (*2)

Under development

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)

Functioning calls

Example setup

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();

Install via composer

$ composer require larsnieuwenhuizen/trustpilot

The Versions

31/05 2017

dev-master

9999999-dev

PHP library for communication with the Trustpilot API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Lars Nieuwenhuizen