danielbadura / redmine-api-client
This package is abandoned and no longer maintained.
No replacement package was suggested.
A Redmine-Api Client
dev-master
2015-12-29 15:17 UTC
Requires
- php: >=5.4.0
- guzzlehttp/guzzle: ~5.0
- jms/serializer: 0.16.*
- ocramius/proxy-manager: 1.0.*
Requires (Dev)
- phpunit/phpunit: ~4.0
- symfony/debug: ~2.6
- symfony/var-dumper: ~2.6
This package is not auto-updated.
Last update: 2020-08-22 05:59:42 UTC
README
installation
composer require danielbadura/redmine-api-client
usage
You can initialize the client with the login of the redmine user.
// user credentials $apiClient = new Client('redmine.com', 'admin', 'password'); // or with apikey $apiClient = new Client('redmine.com', 'jdal5723n5j7987234jjfsd');
After this you are ready to go. Now you can get your needed repository and get the entities you want.
// to get the issue with id = 1 $apiClient->getIssueRepository()->find(1); // get all issues $apiClient->getIssueRepository()->findAll();
Creating new entities is really simple. Just create an object of this entity and fill the data. Then use the client to save it.
$issue = new Issue(); $issue->setSubject('New Issue'); $apiClient->getIssueRepository()->save($issue);
To update an entity just get it and modify it.
$issue = $apiClient->getIssueRepository()->find(1); $issue->setSubject('New Issue Name'); $apiClient->getIssueRepository()->save($issue);