Skip to content

diego-ninja/blackmine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blackmine Logo

Latest Version on Packagist Total Downloads Packagist PHP Version Support Scrutinizer Code Quality Scrutinizer build (GitHub/Bitbucket) GitHub GitHub release (latest by date including pre-releases)

Blackmine

Blackmine is a full-featured Redmine API client written in PHP8. It implements a simple interface and converts responses into models and collections.

Installation

composer require blackmine/blackmine

Quick example

$options = new \Blackmine\Client\ClientOptions([
    ClientOptions::CLIENT_OPTION_BASE_URL => "https://your.redmine.url",
    ClientOptions::CLIENT_OPTION_API_KEY => "your.api.key"
]);

$client = new \Blackmine\Client\Client($options);
$issues = $client->getRepository("issues");

$data = $issues
    ->addFilter(Issues::ISSUE_FILTER_ISSUE_ID, [41432, 41436])
    ->with([Issues::ISSUE_RELATION_WATCHERS])
    ->search();

$issue = new \Blackmine\Model\Issue\Issue();
$issue->setSubject("Test Issue");
$issue->setDescription("An issue description, yeah, a real one...");
$issue->setStartDate(\Carbon\CarbonImmutable::create(2021, 10, 31));
$issue->setDueDate(\Carbon\CarbonImmutable::create(2022, 10, 31));
$issues->create($issue);

Status

Actually only JSON format is supported, yeah, JSON is cool and XML isn't. If you think XML is cool enough you can fork the project, start the feature/xml_is_cool branch and pull request your coolness.

Almost all exposed Redmine APIs are supported by Blackmine. There a few bugs that we are trying to fis as soon as possible.

Blackmine uses Requests as transport layer, in a near or not so near future, I will try to pivot to a PSR18 implementation. If you can't wait, you can fork the project, start the feature/psr18_or_death and pull request your hurry ups.

Blackmine uses Carbon to manage dates.

Things that are almost complete:

Things that are incomplete:

  • Documentation
  • Search fluent API (80%)
  • Error handling and exceptions (0%)
  • Model functionality (50%)
  • Unit tests (0%)
  • Magic methods signatures on models and repositories (50%)
  • Date conversion from and to CarbonImmutable objects

About

A full featured Redmine API client written in php8 with a lot of witchcraft and black magic in it.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages