Download the PHP package cheppers/gathercontent-client without Composer
On this page you can find all versions of the php package cheppers/gathercontent-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cheppers/gathercontent-client
More information about cheppers/gathercontent-client
Files in cheppers/gathercontent-client
Package gathercontent-client
Short Description GatherContent client
License GPL-2.0-or-later
Informations about the package gathercontent-client
GatherContent REST client
Supported endpoints
Legacy
Compatible with application/vnd.gathercontent.v0.5+json
These endpoints are essential, so we kept the support for them in this new version. In the future these endpoints will be in the v2 API and we will replace them accordingly.
- 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()
- POST: /items/:item_id/choose_status
$gc->itemChooseStatusPost()
Current
Compatible with application/vnd.gathercontent.v2+json
Items
- GET: /projects/:project_id/items
$gc->itemsGet()
- GET: /items/:item_id
$gc->itemGet()
- POST: /projects/:project_id/items
$gc->itemPost()
- POST: /items/:item_id/content
$gc->itemUpdatePost()
- POST: /items/:item_id/rename
$gc->itemRenamePost()
- POST: /items/:item_id/move
$gc->itemMovePost()
- POST: /items/:item_id/apply_template
$gc->itemApplyTemplatePost()
- POST: /items/:item_id/disconnect_template
$gc->itemDisconnectTemplatePost()
- POST: /items/:item_id/duplicate
$gc->itemDuplicatePost()
Templates
- GET: /projects/:project_id/templates
$gc->templatesGet()
- GET: /templates/:template_id
$gc->templateGet()
- POST: /projects/:project_id/templates
$gc->templatePost()
- DELETE: /templates/:template_id/delete
$gc->templateDelete()
- POST: /templates/:template_id/rename
$gc->templateRenamePost()
- POST: /templates/:template_id/duplicate
$gc->templateDuplicatePost()
Structures
- GET: /structures/:structure_uuid
$gc->structureGet()
- PUT: /structures/:structure_uuid
$gc->structureAlterPut()
- POST: /structures/:structure_uuid/save_as_template
$gc->structureSaveAsTemplatePost()
Folders
- GET: /folders
$gc->foldersGet()
- POST: /folders
$gc->folderPost()
- POST: /folders
$gc->folderRenamePost()
- POST: /folders
$gc->folderMovePost()
- DELETE: /folders
$gc->folderDelete()
- POST: /folders
$gc->folderRestorePost()
Basic usage
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
The listing endpoints are returning pagination data in this new version, you can access it like this:
For additional parameters please visit the documentation: /projects/:project_id/items.
The get template endpoint is returning structure object data in this new version, you can access it like this:
To create an item with assets, you can do the following:
To update an item with assets, you can do the following: