Warning – This package is no longer maintained.
WorkEtcClient is a thin HTTP client to the WORK[etc] API. It handles login authentication and simple invocations of the WORK[etc] operations.
This library is only available through a Composer package. Add the following to
your composer.json
:
{
"require": {
"jakezatecky/work-etc-client": "^2.0.0"
}
}
Usage is simple. Invoke WorkEtcClient::connect
and pass in your organization's
domain, your email, and your password. Then, call the invoke
method and pass
in the relevant operation and its required parameters as an associative array.
$domain = 'yourcompany';
$email = '[email protected]';
$password = 'yourpassword';
// Authenticate with WORK[etc] and get access to the API
$api = \WorkEtcClient\WorkEtcClient::connect($domain, $email, $password);
// Invoke an operation without any parameters
$stageGroups = $api->invoke('GetProjectStageGroups');
// Invoke an operation with parameters
$projects = $api->invoke('FindProjects', [
'keywords' => 'Install',
]);
The example above is for the following WORK[etc] address. Replace yourcompany
with whatever sub-domain is associated with your organization:
https://yourcompany.worketc.com
MIT license.