itspirit / trustpilot-authenticator
A PHP library for obtaining Trustpilot API access tokens
1.0.0
2017-07-05 06:11 UTC
Requires
- php: >=5.5.0
- guzzlehttp/guzzle: ~6.0
Requires (Dev)
- codeception/codeception: ^2.2
This package is auto-updated.
Last update: 2024-10-29 02:52:47 UTC
README
A PHP library for obtaining Trustpilot Business User API access tokens.
Install
Install using composer:
composer install itspirit/trustpilot-authenticator
Usage
$authenticator = new Trustpilot\Api\Authenticator\Authenticator($apiKey, $apiToken, $username, $password); $accessToken = $authenticator->getAccessToken(); // $accessToken->getToken(): string // $accessToken->hasExpired(): bool // $accessToken->getExpiry(): \DateTimeImmutable // $accessToken->serialize(): string
Tests
This package use Codeception for testing. To run the tests just type
vendor/bin/codecept run