muxx/redmine-api-client-php
Composer 安装命令:
composer require muxx/redmine-api-client-php
包简介
PHP API client for Redmine
README 文档
README
PHP API client for Redmine.
Installation
Be sure to provide implementations for psr/http-client-implementation and psr/http-factory-implementation. For example:
composer require nyholm/psr7 guzzlehttp/guzzle
Use composer to install the library:
composer require muxx/redmine-api-client-php
Symfony
Enable PSR-18 in HttpClient
services: Redmine\ApiClient: arguments: $url: 'https://redmine.somehost.com' $apiKey: 'some-api-key'
Usage
require 'vendor/autoload.php'; $c = new Redmine\ApiClient( new HttpClient(), new Psr17Factory(), new Psr17Factory(), 'https://redmine.somehost.com', 'some-api-key' ); $response = $c->requestGet('projects/some-project/memberships'); foreach ($response['memberships'] as $membership) { if (isset($membership['user']['name'])) { echo sprintf("User: %s\n", $membership['user']['name']); } if (isset($membership['group']['name'])) { echo sprintf("Group: %s\n", $membership['group']['name']); } }
统计信息
- 总下载量: 3.26k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-10-30