gedex/janrain-api

Janrain API 客户端

0.1.0 2014-02-03 10:09 UTC

This package is not auto-updated.

Last update: 2024-09-25 12:21:14 UTC


README

Build Status Coverage Status

这是一个简单的面向对象的 Janrain API 包装器,使用 PHP5 编写。

用法

查找实体

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'),
));

添加实体

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

查看示例以获取完整参考。

待办事项

  • 完成单元测试覆盖率
  • 更多示例

致谢

许可证

MIT 许可证 - 查看 LICENSE 文件