This package makes it easy to interact with the OrgManager API.
You can install the package via composer:
composer require orgmanager/orgmanager-api
You must pass a Guzzle client and the API token to the constructor of OrgManager\ApiClient\OrgManager
.
$orgmanager = new \OrgManager\ApiClient\OrgManager('YOUR_ORGMANAGER_API_TOKEN');
or you can skip the token and use the connect()
method later
$orgmanager = new \OrgManager\ApiClient\OrgManager();
$orgmanager->connect('YOUR_ORGMANAGER_API_TOKEN');
$orgmanager->getUser();
$orgmanager->getOrgs();
$orgmanager->getOrg('ORG_ID');
$orgmanager->changeOrgPassword('ORG_ID', 'NEW_PASSWORD');
$orgmanager->updateOrg('ORG_ID');
$orgmanager->deleteOrg('ORG_ID');
$orgmanager->getStats();
$orgmanager->regenerateToken($set);
where $set
is false if you don't want to use the new token on future requests.
$orgmanager->getClient();
$client = new \GuzzleHttp\Client(); // Example Guzzle client
$orgmanager->setClient($client);
where $client is an instance of \GuzzleHttp\Client
.
Please see CHANGELOG for more information what has changed recently.
$ composer test
Please see CONTRIBUTING for details.
If you discover any security related issues, please email soy@miguelpiedrafita.com instead of using the issue tracker.
The Mozilla Public License 2.0 (MPL-2.0). Please see License File for more information.