PHP code example of iadvize / apirestclient
1. Go to this page and download the library: Download iadvize/apirestclient 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/ */
iadvize / apirestclient example snippets
use Iadvize\ApiRestClient\Client;
// Create client
$client = new Client();
$client->setAuthenticationKey(API_KEY);
// Get resource
$website = $client->getResource('website', 123);
// Display resource
if ($website) {
printf(
'[%s] — %s - http://%s' . PHP_EOL,
$website['id'],
$website['name'],
$website['url']
);
} else {
echo $client->getLastResponse()->getMeta()->getMessage();
}
composer
cp ./phpunix.xml.dist ./phpunix.xml
./vendor/bin/phpunit -c phpunit.xml