1. Go to this page and download the library: Download izap/redmine-api library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
izap / redmine-api example snippets
// This file is generated by Composer
e.example.com', 'username', 'password');
// This file ships with php-redmine-api
example.com', 'username', 'password');
// For Composer users (this file is generated by Composer)
.
// S_KEY');
//-- OR --
$client = new Redmine\Client('http://redmine.example.com', 'username', 'password');
$client->user->all();
$client->user->listing();
$client->issue->create([
'project_id' => 'test',
'subject' => 'some subject',
'description' => 'a long description blablabla',
'assigned_to' => 'user1',
]);
$client->issue->all([
'limit' => 1000
]);
$client = new Redmine\Client('http://redmine.example.com', 'API_ACCESS_KEY');
// impersonate user
$client->setImpersonateUser('jsmith');
// create a time entry for jsmith
$client->time_entry->create($data);
// remove impersonation for further calls
$client->setImpersonateUser(null);
bash
$ php composer.phar
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.