2017 © Pedro Peláez
 

library youtrack-client

A PHP YouTrack client library

image

coldbrain/youtrack-client

A PHP YouTrack client library

  • Sunday, February 14, 2016
  • by ColdBrain
  • Repository
  • 2 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 36 Forks
  • 0 Open issues
  • 12 Versions
  • 0 % Grown

The README.md

YouTrack Client PHP Library

Build Status, (*1)

The bugtracker YouTrack provides a REST-API. Because a lot of web applications are written in PHP I decided to write a client library for it. To make it easier for developers to write connectors to YouTrack., (*2)

The initial development was sponsored by Telematika GmbH. The current development is made by nepda., (*3)

The source of this library is released under the BSD license (see LICENSE for details)., (*4)

Requirements

  • PHP >= 5.4 (Tested with >= 5.5, Travis runs tests with 5.4, 5.5 and 5.6)
  • curl
  • simplexml
  • json
  • YouTrack 3.0+ with REST-API enabled (currently, the production system runs with YouTrack 6.0)

Changelog

2016-02-08 - v1.0.10

  • A lot of new methods added (updateIssue, deleteIssue, createAttachment, importAttachment, importLinks, importIssues, importWorkitems, getWorkitems)
  • Merged #7 from REDLINK/fix-createIssue
  • Merged #8 from REDLINK/replace-urlencode-with-rawurlencode
  • Merged #9 from REDLINK/feature-createAttachment
  • Merged #10 from REDLINK/set-mimetype
  • Merged #12 from REDLINK/feature-newIssueMethods

2015-02-10 - v1.0.9

  • Merged #6 'Fetch issues by filter only + with comments'. Thanks @chabberwock

(Please look into CHANGELOG for a complete list of the past releases), (*5)

Usage

<?php
require_once("YouTrack/Connection.php");
$youtrack = new \YouTrack\Connection("http://example.com", "login", "password");
$issue = $youtrack->getIssue("TEST-1");
...

See ./examples folder for more usage examples., (*6)

Usage with ZF2 ZendSkeletonApplication

In your /init_autoloader.php, (*7)

<?php
// ... snip
if ($zf2Path) {
    if (isset($loader)) {
        $loader->add('Zend', $zf2Path);
    } else {
        include $zf2Path . '/Zend/Loader/AutoloaderFactory.php';
        Zend\Loader\AutoloaderFactory::factory(array(
            'Zend\Loader\StandardAutoloader' => array(
                'autoregister_zf' => true,
                'namespaces' => [                            // add this
                    'YouTrack' => 'vendor/YouTrack'          // ...
                ],                                           // ...
            )
        ));
    }
}
// ... snip

From now on you can use YouTrack-Client-PHP-Library from any file in you ZF2-App., (*8)

<?php
// ...
// example
use YouTrack\Connection as YouTrackConnection;

class ExampleController extends AbstractActionController
{

    public function anyAction()
    {
        $youtrack = new YouTrackConnection("http://example.com", "login", "password");
        $issue = $youtrack->getIssue("TEST-1");
        // ...
    }
}

Tests

The testsuite depends on PHPUnit. You can install it with composer.phar:, (*9)

curl -sS https://getcomposer.org/installer | php --
php composer.phar install

The unit tests are incomplete but you can run them using phpunit like this:, (*10)

./vendor/bin/phpunit ./test

Contributors

(and more: https://github.com/nepda/youtrack/network/members), (*11)

The Versions

14/02 2016

dev-fixCreateIssue

dev-fixCreateIssue

A PHP YouTrack client library

  Sources   Download

BSD-4-Clause

The Requires

  • php >=5.6
  • ext-json >=1
  • lib-curl >=7

 

The Development Requires

by Sergey Susikov

11/02 2016

dev-php54-back

dev-php54-back

A PHP YouTrack client library

  Sources   Download

BSD-4-Clause

The Requires

  • php >=5.4
  • ext-json >=1
  • lib-curl >=7

 

The Development Requires

by Sergey Susikov

11/02 2016

dev-php54-support

dev-php54-support

A PHP YouTrack client library

  Sources   Download

BSD-4-Clause

The Requires

  • ext-json >=1
  • lib-curl >=7
  • php >=5.4

 

The Development Requires

by Sergey Susikov

08/02 2016

dev-master

9999999-dev

A PHP YouTrack client library

  Sources   Download

BSD-4-Clause

The Requires

  • php >=5.4
  • ext-json >=1
  • lib-curl >=7

 

The Development Requires

by Sergey Susikov

08/02 2016

v1.0.10

1.0.10.0

A PHP YouTrack client library

  Sources   Download

BSD-4-Clause

The Requires

  • php >=5.4
  • ext-json >=1
  • lib-curl >=7

 

The Development Requires

by Sergey Susikov

10/02 2015

v1.0.9

1.0.9.0

A PHP YouTrack client library

  Sources   Download

BSD-4-Clause

The Requires

  • php >=5.4
  • ext-json >=1
  • lib-curl >=7

 

The Development Requires

15/01 2015

v1.0.8

1.0.8.0

A PHP YouTrack client library

  Sources   Download

BSD-4-Clause

The Requires

  • php >=5.4
  • ext-json >=1
  • lib-curl >=7

 

The Development Requires

02/12 2014

1.0.7

1.0.7.0

A PHP YouTrack client library

  Sources   Download

BSD-4-Clause

The Requires

  • php >=5.4
  • ext-json >=1
  • lib-curl >=7

 

The Development Requires

29/11 2014

1.0.6

1.0.6.0

A PHP YouTrack client library

  Sources   Download

BSD-4-Clause

The Requires

  • php >=5.4
  • lib-curl >=7

 

The Development Requires

29/11 2014

1.0.5

1.0.5.0

A PHP YouTrack client library

  Sources   Download

BSD-4-Clause

The Requires

  • php >=5.4
  • lib-curl >=7

 

The Development Requires

05/11 2014

1.0.4

1.0.4.0

A PHP YouTrack client library

  Sources   Download

BSD-4-Clause

The Requires

  • php >=5.4
  • lib-curl >=7

 

The Development Requires

01/09 2014

1.0.1

1.0.1.0

A PHP YouTrack client library

  Sources   Download

BSD-4-Clause

The Requires

  • php >=5.4
  • lib-curl >=7

 

The Development Requires