A simple Object Oriented wrapper for Redmine API, written with PHP5.
Uses Redmine API.
- Follows PSR-0 conventions and coding standard: autoload friendly
- API entry points implementation state :
- OK Attachments
- NOK Groups - only partially implemented
- OK Custom Fields
- OK Issues
- OK Issue Categories
- OK Issue Priorities
- NOK Issue Relations - only partially implemented
- OK Issue Statuses
- OK News
- OK Projects
- NOK Project Memberships - only partially implemented
- OK Queries
- OK Roles
- OK Time Entries
- OK Time Entry Activities
- OK Trackers
- OK Users
- OK Versions
- NOK Wiki - only partially implemented
- API entry points :
- Finish implementing Groups
- Finish implementing Issue Relations
- Finish implementing Project Memberships
- Check header's response code (especially for POST/PUT/DELETE requests)
- See http://stackoverflow.com/questions/9183178/php-curl-retrieving-response-headers-and-body-in-a-single-request/9183272#9183272
- Maybe use Buzz or Guzzle for handling http connections
- https://github.com/kriswallsmith/Buzz
- https://github.com/guzzle/guzzle
Redmine is missing some APIs for a full remote management of the data :
- List of activities : http://www.redmine.org/issues/11464
- ...
A possible solution to this would be to create an extra APIs implementing the missing entry points. See existing effort in doing so : https://github.com/rschobbert/redmine-miss-api
- PHP >= 5.3.2 with cURL extension,
- "Enable REST web service" for your Redmine project (/settings/edit?tab=authentication)
- then obtain your API access key in your profile page : /my/account
Through composer, simply run :
$ php composer.phar require kbsali/redmine-api:1.*
<?php
// This file is generated by Composer
require_once 'vendor/autoload.php';
$client = new Redmine\Client('http://redmine.example.com', 'API_ACCESS_KEY');
$client->api('user')->all();
$client->api('user')->listing();
$client->api('issue')->create(array(
'project_id' => 'test',
'subject' => 'some subject',
'description' => 'a long description blablabla',
'assigned_to' => 'user1',
));
$client->api('issue')->all(array(
'limit' => 1000
));
see example.php
- Thanks to Thomas Spycher for the 1st version of the class.
- Thanks to Thibault Duplessis aka. ornicar for the php-github-api library, great source of inspiration!