- Joomla library for using EasyRedmine / Redmine REST API to create or manage issues, projects and many more from within Joomla! extensions.
OBSOLETE / DEPRECATED / NOT MAINTAINED => GOTO:
- SimpleXML extension installed and enabled in PHP
if (!jimport('easyredmine_api.rest'))
{
die('Missing EasyRedmine Rest Api library');
}
$api = EasyRedmineRestApi::getInstance('issues', 'https://example.com', 'XXXXXXXXXXX');
$filters = array('assigned_to_id' => 27);
$list = $api->getList($filters)
if ($list !== false)
{
print_r($list);
}
else
{
echo 'Error occurred, message = ' . $api->getError();
}
$id = 123;
$issue = $api->get($id)
if ($issue !== false)
{
print_r($issue);
}
else
{
echo 'Error occurred, message = ' . $api->getError();
}
$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();
}
$id = 123;
if ($api->delete($id))
{
echo 'Success, issue was deleted id = ' . $id;
}
else
{
echo 'Error occurred, message = ' . $api->getError();
}