betterweekdays/glassdoor
最新稳定版本:1.3.0
Composer 安装命令:
composer require betterweekdays/glassdoor
包简介
Glassdoor API
README 文档
README
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require betterweekdays/glassdoor "*"
or add
"betterweekdays/glassdoor": "*"
to the require section of your composer.json file.
Example
- To connect to the glassdoor API first create a config object.
$config = new \Glassdoor\Config('partner id', 'partner key', 'http://api.glassdoor.com/api/api.htm', 'json');
Then Create the Connection Object.
$conn = new \Glassdoor\Connection($config);
Next create an Action and add parameters.
$action = new \Glassdoor\Action\JobProgression();
$action->addparam('job_title', 'cashier');
Finally make the call
$response = $conn->call($action);
The response will be an instance of \Glassdoor\ResponseObject\ResponseInterface which is specified by the Action.
Custom PSR7 Middleware
If you wish to add a custom PS7 Middleware then you can add a custom HandlerStack. See http://docs.guzzlephp.org/en/latest/handlers-and-middleware.html for more details
use GuzzleHttp\Client;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Handler\CurlHandler;
$handler = new CurlHandler();
$stack = HandlerStack::create($handler); // Wrap w/ middleware
$connection->setHandlerStack($stack)
Running Unit Tests
First, install any composer dependencies by running composer install.
Next, from the root directory run php vendor/bin/phpunit or simply phpunit
if you've set up global install.
To run tests with code coverage, run phpunit --coverage-text.
To run acceptance (end-to-end) tests with your API credentials, run PARTNER_ID=XXX PARTNER_KEY=YYYYY phpunit.
If you're green, you're good!
Code Standards
We are using Drupal's Code Standards and PHP_CodeSniffer to test for them.
Run the code sniffer using ./vendor/bin/phpcs --standard=./vendor/drupal/coder/coder_sniffer/Drupal src/
Actions
Implemented Endpoinsts:
统计信息
- 总下载量: 5.68k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPLv2
- 更新时间: 2015-08-22