sitepack-io/reviewpack-sdk

There is no license information available for the latest version (1.0.3) of this package.

The PHP SDK for the ReviewPack API

1.0.3 2021-06-30 08:21 UTC

This package is auto-updated.

Last update: 2024-05-14 14:44:52 UTC


README

Note: this SDK is still is testing phase.

This library is very helpful when you want to implement the ReviewPack API in a project. It has all API calls implemented, so you can call them easily from your application.

Examples

List companies

See also our official documentation for the list companies endpoint.

$companyEndpoint = new \ReviewPack\Endpoint\CompanyEndpoint();
$collection = $companyEndpoint->getCompanies(
    'token',
    'secret',
);
var_dump($collection);

Invite a customer for a review

See also our official documentation to plan a customer invite for a review.

$inviteEndpoint = new \ReviewPack\Endpoint\InviteEndpoint();

$result = $inviteEndpoint->createInvite(
    'token',
    'secret',
    'company',
    'email',
    'first_name'
);
var_dump($result);

Get company review scores (total, average)

See also our official documentation for the average scoring endpoint.

$reviewEndpoint = new \ReviewPack\Endpoint\ReviewEndpoint();
$scores = $reviewEndpoint->getCompanyReviewScores(
    'token',
    'secret',
    'company_uuid'
);
var_dump($scores);

Get the newest reviews of a company

See also our official documentation for the newest reviews of a specific company.

$reviewEndpoint = new \ReviewPack\Endpoint\ReviewEndpoint();
$recentReviews = $reviewEndpoint->getNewestReviews(
    'token',
    'secret',
    'company_uuid'
);
var_dump($recentReviews);

Copyright ReviewPack B.V.