- Joomla library for using EasyRedmine / Redmine REST API to create or manage issues, projects and many more from within Joomla! extensions.
- https://www.easyredmine.com/resources/rest-api
- https://app.swaggerhub.com/apis-docs/easysoftware/EasyProject/
- Author: Easy Software s.r.o. [email protected]
- License: http://opensource.org/licenses/GPL-3.0 GPL-3.0
- Copyright: 2015 Easy Software s.r.o.
- 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();
}