gedex / janrain-api
Janrain API 客户端
0.1.0
2014-02-03 10:09 UTC
Requires
- php: >=5.3.2
- ext-curl: *
- guzzle/guzzle: >=3.8
Requires (Dev)
- phpunit/phpcov: 2.0.*@dev
- phpunit/phpunit: >3.6.0
- satooshi/php-coveralls: dev-master
This package is not auto-updated.
Last update: 2024-09-25 12:21:14 UTC
README
这是一个简单的面向对象的 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', ), ));
查看示例以获取完整参考。
待办事项
- 完成单元测试覆盖率
- 更多示例
致谢
- Janrain API 文档
- 由 KNPLabs 开发的优雅架构库 php-github-api,其中此库借鉴了其设计。
许可证
MIT 许可证 - 查看 LICENSE 文件。