-
Notifications
You must be signed in to change notification settings - Fork 18
Home
sirprize edited this page Sep 14, 2010
·
17 revisions
This is a php library to access the Basecamp api. Collection classes provide methods to query the api and wrap each result item in an entity object. Entity objects come with methods such as update() and delete() to persist themselfes via the api. Functionality is provided to attach and detach observers to collections and entities.
- Milestone: fully implemented
- Person: fully implemented
- Project: fully implemented
- Todolist: fully implemented
- Todolistitems: fully implemented
- php 5.3+ (uses namespaces)
- Recent version of zend framework (tested with 1.10) > uses Zend_Http_Client & Zend_Log (optional)
Please find plenty of working examples in the basecamp/example/basecamp directory and adjust basecamp/example/basecamp/_config.php with your own settings
$config = array( 'baseUri' => 'https://xxx.basecamphq.com', 'username' => 'xxx', 'password' => 'xxx' );
require_once 'Sirprize/Basecamp.php'; $basecamp = new \Sirprize\Basecamp($config);
$projects = $basecamp->getProjectsInstance()->findAll();
foreach($projects as $project) { print $project->getName()."\n"; }
$milestones = $basecamp->getMilestoneCollectionInstance(); $milestone = $milestones->getMilestoneInstance();
require_once 'Sirprize/Basecamp/Date.php'; $deadline = new \Sirprize\Basecamp\Date('2010-03-01');
require_once 'Sirprize/Basecamp/Id.php'; $projectId = new \Sirprize\Basecamp\Id('xxx'); $userId = new \Sirprize\Basecamp\Id('xxx');
$milestone ->setProjectId($projectId) ->setResponsiblePartyId($userId) ->setDeadline($deadline) ->setTitle('Milestoners Everywhere') ->setWantsNotification(true) ->create() ;
- Account
- Companies
- Categories
- Messages
- Comments
- Time tracking