Download the PHP package tzk/taiga-php without Composer
On this page you can find all versions of the php package tzk/taiga-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tzk/taiga-php
More information about tzk/taiga-php
Files in tzk/taiga-php
Informations about the package taiga-php
TaigaPHP
TaigaPHP is a PHP wrapper used to handle the Taiga.io API easily.
(If you want to use this library with Laravel 5.x, take a look at https://github.com/TZK-/TaigaLaravel)
Installation (Composer)
TaigaPHP has been written and tested for PHP >=5.5 and and earlier versions. The only constraint is to have the cURL extension enabled.
To install the library, just run the command below:
Authentication
To send HTTP request to the API, you'll need to generate an Auth token.
The wrapper has a function to help you and you can just do like the code below or see https://taigaio.github.io/taiga-doc/dist/api.html#_authentication:
Get Taiga instance
Change configuration on the fly
You can change the configuration through HTTP headers on the fly.
You just need to call magic method which has the same name as the header you wanna set prefixed by 'set'.
Some headers are composed by multiple words separated by dashed (Ex. Accept-Language).
To get it works, you should write the header name without dashes and in a camel-case format.
Example
To ease changing auth token or language on the fly, you can use shortcuts specified in src/config/header_shortcuts.php
Register a new service
The wrapper is based on 'Services' which wrap the API calls.
As you can see, it is very simple to add your own methods and interact with the API itself.
If you wanna add new services, the only thing you have to do is to create a new class inside the Service folder and extends the TZK\Taiga\Service class.
TaigaPHP will automatically load the service for you and it will be accessible from a public method which has the same name as your service.
Examples
Get issue types
Create a new issue
Supported features
- Applications
- Application Tokens
- Epics
- Issues
- Issue Statuses
- Issue Types
- Priorities
- Projects
- Resolver
- Severities
- Users
- UserStories
Tests
The library has been tested with Kahlan. If you want to run tests just run the command:
At the moment, the tests are covering the main fatures of the wrapper.
Contributing
TaigaPHP offers a great starting coverage, but there are some endpoints/tests missing.
If you use this wrapper, feel free to share if you have found bugs or added new endpoints / features or tests by opening a new PR.