iadvize/apirestclient

iAdvize API Rest client

Installs: 21 352

Dependents: 0

Stars: 1

Watchers: 4

Forks: 3

Language: PHP

1.3.0 2015-04-27 16:21 UTC

README

Build Status Scrutinizer Code Quality Code Coverage

This project gives you access to iAdvize API easily.

Basic usage

Example: List websites

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

Install dependencies

composer install --dev

Launch tests

cp ./phpunix.xml.dist ./phpunix.xml
./vendor/bin/phpunit -c phpunit.xml