alpixel / jirabundle
连接您的应用程序到您的 Jira API
dev-master
2017-01-09 08:29 UTC
Requires
- php: >=5.3.0
- symfony/symfony: >=2.8
This package is not auto-updated.
Last update: 2024-09-14 19:09:35 UTC
README
🍜 查询您的 Jira 安装
安装与配置
在您的 AppKernel.php
中添加以下行以激活此包
public function registerBundles()
{
$bundles = [
new Alpixel\Bundle\JiraBundle\AlpixelJiraBundle(),
];
}
然后在您的 config.yml
中
alpixel_jira:
base_url: 'http://my.jira.fr/rest/api/2/'
auth:
method:
basic:
username: MyUsername
password: MyPassword
目前仅提供基本身份验证。
如何使用
您需要使用服务 alpixel_jira.api
示例
# MyAwesomeController.php
....
public function apiAction() {
$jira = $this->get('alpixel_jira.api';
$response = $jira->get('/mypermission');
$data = $response->getData();
$response = $jira->search('(status=resolved AND project=SysAdmin) OR assignee=bobsmith', [
'orderBy' => 'name',
]);
$data = $response->getData();
}