alpixel/jirabundle

Connect your application to your Jira API

dev-master 2017-01-09 08:29 UTC

This package is not auto-updated.

Last update: 2024-11-09 19:56:29 UTC


README

🍜 Query your Jira installation

Installation & Configuration

Active the bundle by add these line in your AppKernel.php

public function registerBundles()
{
    $bundles = [
      new Alpixel\Bundle\JiraBundle\AlpixelJiraBundle(),
    ];
}

Then in your config.yml

alpixel_jira:
    base_url: 'http://my.jira.fr/rest/api/2/'
    auth:
        method:
            basic:
                username: MyUsername
                password: MyPassword

Only the basic authentication is available for now.

How to use

You need to use the service alpixel_jira.api

Example :

  # 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();
  }