happyr / api-php-client
Happyr 公共API客户端库。
2.1.1
2018-01-23 08:23 UTC
Requires
- php: ^5.6 || ^7.0
- php-http/client-common: ^1.1
- php-http/discovery: ^1.0
- php-http/httplug: ^1.0
- webmozart/assert: ^1.2
Requires (Dev)
- guzzlehttp/psr7: ^1.3
- nyholm/nsa: ^1.0
- php-http/curl-client: ^1.6
- php-http/message: ^1.0
- php-http/message-factory: ^1.0.2
- phpunit/phpunit: ^5.6
README
这个PHP库是api.happyr.com API的客户端。
安装
composer require happyr/api-php-client
配置
有几个必填的配置参数。它们是 'identifier' 和 'secret'。您可以从Happyr-API网站获取这两个参数。
用法
use Happyr\ApiClient\HappyrClient; class MyClass { public function myFunc() { $api = HappyrClient::create('myApiIdentifier', 'myApiSecret'); $patterns = $api->profilePattern()->index('sv'); } }