An open API service indexing awesome lists of open source software.

https://github.com/gedex/php-janrain-api

A simple Object Oriented wrapper for Janrain API, written with PHP5.
https://github.com/gedex/php-janrain-api

api-client janrain php php-janrain-api

Last synced: 11 months ago
JSON representation

A simple Object Oriented wrapper for Janrain API, written with PHP5.

Awesome Lists containing this project

README

          

PHP Janrain API
===============

[![Build Status](https://travis-ci.org/gedex/php-janrain-api.png?branch=master)](https://travis-ci.org/gedex/php-janrain-api)
[![Coverage Status](https://coveralls.io/repos/gedex/php-janrain-api/badge.png?branch=master)](https://coveralls.io/r/gedex/php-janrain-api?branch=master)

A simple Object Oriented wrapper for [Janrain API](http://developers.janrain.com/documentation/api/), written with PHP5.

# Usage

## Find Entity

~~~php
require_once 'vendor/autoload.php';

$client = new Janrain\Client();
$client->setOption('base_url', 'https://example.janraincapture.com');
$client->setOption('client_id', 'xxx');
$client->setOption('client_secret', 'xxx');

$entities = $client->api('entity')->find(array(
'type_name' => 'user',
'filter' => 'emailVerified is not null',
'attributes' => array('uuid', 'displayName', 'email'),
));
~~~

## Add Entity
~~~php
$result = $client->api('entity')->create(array(
'type_name' => 'user',
'attributes' => array(
'firstName' => 'Akeda',
'lastName' => 'Bagus',
),
));
~~~

See [examples](examples/README.md) for complete references.

# TODO

* Complete unit tests coverage
* More examples

# Credits

* [Janrain API documentation](http://developers.janrain.com/documentation/api/)
* Nicely architectured library [php-github-api](https://github.com/KnpLabs/php-github-api) by [KNPLabs](https://github.com/KnpLabs) where this library borrows the design.

# License

MIT License - see [LICENSE file](LICENSE).