Compatible with application/vnd.gathercontent.v0.5+json
- GET: /me
$gc->meGet()
- GET: /accounts
$gc->accountsGet()
- GET: /accounts/:account_id
$gc->accountGet()
- GET: /projects
$gc->projectsGet()
- GET: /projects/:project_id
$gc->projectGet()
- POST: /projects
$gc->projectsPost()
- GET: /projects/:project_id/statuses
$gc->projectStatusesGet()
- GET: /projects/:project_id/statuses/:status_id
$gc->projectStatusGet()
- GET: /items
$gc->itemsGet()
- GET: /items/:item_id
$gc->itemGet()
- POST: /items
$gc->itemsPost()
- POST: /items/:item_id/save
$gc->itemSavePost()
- POST: /items/:item_id/apply_template
$gc->itemApplyTemplatePost()
- POST: /items/:item_id/choose_status
$gc->itemChooseStatusPost()
- GET: /items/:item_id/files
$gc->itemFilesGet()
- GET: /templates
$gc->templatesGet()
- GET: /templates/:template_id
$gc->templateGet()
To create the GatherContentClient simply pass in a Guzzle client in the constructor.
You will need:
- your e-mail address to log into GatherContent
- your API key from GatherContent
<?php
$email = 'YOUR_GATHERCONTENT_EMAIL';
$apiKey = 'YOUR_GATHERCONTENT_API_KEY';
$client = new \GuzzleHttp\Client();
$gc = new \Cheppers\GatherContent\GatherContentClient($client);
$gc
->setEmail($email)
->setApiKey($apiKey);
try {
$me = $gc->meGet();
}
catch (\Exception $e) {
echo 'ERROR: ' . $e->getMessage() . PHP_EOL;
exit(1);
}
echo "Email = {$me->email}" . PHP_EOL;
echo "First name = {$me->firstName}" . PHP_EOL;
echo "Last name = {$me->lastName}" . PHP_EOL;