Library for Joomla CMS to handle communication with Redmine / EasyRedmine REST API (XML format)
PHP
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
rest
LICENSE.txt
README.md
easyredmine_api.xml
http.php
rest.php

README.md

lib_easyredmine_api

  • Joomla library for using EasyRedmine / Redmine REST API to create or manage issues, projects and many more from within Joomla! extensions.

About

Basic usage

Importing library

if (!jimport('easyredmine_api.rest'))
{
	die('Missing EasyRedmine Rest Api library');
}

Getting API instance

$api = EasyRedmineRestApi::getInstance('issues', 'https://example.com', 'XXXXXXXXXXX');

Get list of issues

$filters = array('assigned_to_id' => 27);
$list    = $api->getList($filters)

if ($list !== false)
{
	print_r($list);
}
else
{
	echo 'Error occurred, message = ' . $api->getError();
}

Get detail of issue

$id    = 123;
$issue = $api->get($id)

if ($issue !== false)
{
	print_r($issue);
}
else
{
	echo 'Error occurred, message = ' . $api->getError();
}

Create / Update issue

$issue = (object) array(
	//if 'id' property was set, then UPDATE would be done instead of INSERT
	'subject'    => 'testing issues',
	'project_id' => 123,
);

if ($api->store($issue))
{
	echo 'Success, stored issue id  = ' . $issue->id;
}
else
{
	echo 'Error occurred, message = ' . $api->getError();
}

Delete issue

$id = 123;

if ($api->delete($id))
{
	echo 'Success, issue was deleted id  = ' . $id;
}
else
{
	echo 'Error occurred, message = ' . $api->getError();
}