devhun / wideshot-api-client
针对wideshot.co.kr的PHP API客户端(SEJONG电信服务)
1.0.4
2020-10-26 07:55 UTC
Requires
- php: >=7.1
- ext-json: *
- guzzlehttp/guzzle: ^6.4
Requires (Dev)
- phpunit/phpunit: >=7.0
This package is auto-updated.
Last update: 2024-09-15 02:32:39 UTC
README
使用composer安装
打开一个shell,cd
到你的项目目录,然后输入
composer require devhun/wideshot-api-client
或者编辑composer.json并添加
{ "require": { "devhun/wideshot-api-client": "~1.0" } }
如果你想使用GuzzleHttpAdapter
,你需要添加Guzzle 6。
使用示例
Guzzle
require 'vendor/autoload.php'; use Wideshot\WideshotClient; use Wideshot\Adapter\GuzzleHttpAdapter; // Using Guzzle 6... $client = new WideshotClient( new GuzzleHttpAdapter('your-api-key') ); $result = $client->result()->all(); var_export($result);
CURL
require 'vendor/autoload.php'; use Wideshot\WideshotClient; use Wideshot\Adapter\CurlAdapter; // Using regular CURL, courtesy of 'malc0mn' $client = new WideshotClient( new CurlAdapter('your-api-key') ); $result = $client->result()->all(); var_export($result);