psecio/userappio

A library to work with the UserApp.io API

dev-master 2014-03-19 20:57 UTC

This package is auto-updated.

Last update: 2024-03-15 09:17:22 UTC


README

Usage:

This is an example of its usage with a Guzzle client instance:

require_once 'vendor/autoload.php';
use Guzzle\Http\Client;

$client = new Client();

$appId = '<your app ID>';
$apiToken = '<your API token>';

$service = new \Psecio\Userappio\Service($appId, $apiToken, $client);

// User login
$result = $service->user->login('darthsidious', 'test1234');
print_r($result);

// User save
$result = $service->user->save(array(
	'user_id' => $result->user_id,
	'login' => 'darthsidious',
	'first_name' => 'Test'
));

// User logoff
$result = $service->user->logout();

// Set logging
$service->setLogger(new Logger())