Skip to content

Library for Joomla CMS to handle communication with Redmine / EasyRedmine REST API (XML format)

License

Notifications You must be signed in to change notification settings

vikijel/lib_easyredmine_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lib_easyredmine_api

  • 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:

About

Requirements

  • SimpleXML extension installed and enabled in PHP

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();
}

About

Library for Joomla CMS to handle communication with Redmine / EasyRedmine REST API (XML format)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages