kokoroe / kokoroe-sdk-php
Kokoroe SDK for PHP
v1.0.0-alpha.4
2016-06-15 08:16 UTC
Requires
- ext-curl: *
- jakeasmith/http_build_url: ^1.0
- psr/log: ~1.0.0
Requires (Dev)
- leaphub/phpcs-symfony2-standard: ~2.0.1
- phpmd/phpmd: @stable
- phpunit/phpunit: ^4.7
- satooshi/php-coveralls: dev-master
This package is not auto-updated.
Last update: 2024-11-09 18:27:35 UTC
README
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.