PHP code example of sitepack-io / reviewpack-sdk

1. Go to this page and download the library: Download sitepack-io/reviewpack-sdk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sitepack-io / reviewpack-sdk example snippets


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

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

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

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

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