kokoroe/kokoroe-sdk-php

v1.0.0-alpha.4 2016-06-15 08:16 UTC

README

Build Status SensioLabs Insight Coveralls HHVM Packagist

Install

Add kokoroe/kokoroe-sdk-php to your composer.json:

% php composer.phar require kokoroe/kokoroe-sdk-php:~1.0

Usage

Example

<?php

$kokoroe = new Kokoroe\Kokoroe([
    'client_id'             => '{client-id}',
    'client_secret'         => '{client-secret}',
    'country'               => 'FR',
    'locale'                => 'fr',
    'user_ip'               => $_SERVER['REMOTE_ADDR'], // use real ip of user.
    'default_access_token'  => '{access-token}', // optional
    'signature'             => true // optional
]);

// If you provided a 'default_access_token', the '{access-token}' is optional.
$response = $kokoroe->get('/me', '{access-token}');

if ($response->isSuccessful()) {
    var_dump($response->getContent()); // dump array
}

?>

Options

License

kokoroe-sdk-php is licensed under the MIT license.