PHPackages                             sirprize/basecamp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. sirprize/basecamp

ActiveLibrary[API Development](/categories/api)

sirprize/basecamp
=================

Basecamp Classic API Wrapper for PHP 5.3+

66284↓80%17[1 PRs](https://github.com/sirprize/basecamp/pulls)PHP

Since Jan 1Pushed 10y ago4 watchersCompare

[ Source](https://github.com/sirprize/basecamp)[ Packagist](https://packagist.org/packages/sirprize/basecamp)[ RSS](/packages/sirprize-basecamp/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Basecamp Classic API Wrapper for php 5.3+
=========================================

[](#basecamp-classic-api-wrapper-for-php-53)

This is a php library to access the classic 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 – this is useful for logging or to print current activity to the terminal.

Supported Features
------------------

[](#supported-features)

- Person: startMe(), startById(), startAllByProjectId(), startAll() etc
- Project: startById(), startAll(), copy(), replicate() etc
- Milestone: startAllByProjectId(), create(), update(), delete(), complete(), uncomplete() etc
- Todolist: startById(), startAllByProjectId(), startAllByResponsibiltyParty(), create(), update(), delete() etc
- Todoitems: startAllByTodoListId(), startById(), create(), update(), delete(), complete(), uncomplete() etc
- Comments: startAllByResourceId(), startById()
- Timetracking: startAllByProjectId(), startById()

Requirements
------------

[](#requirements)

- php 5.3+ (uses namespaces)

Getting Started
---------------

[](#getting-started)

Please find plenty of working examples in the *basecamp/example/basecamp* directory. Here’s the basics:

### First Steps

[](#first-steps)

1. *git clone git://github.com/sirprize/basecamp.git sirprize-basecamp*
2. *cd sirprize-basecamp*
3. *curl -sS  | php*
4. *php composer.phar install*
5. create a dummy project in your basecamp account
6. adjust *sirprize-basecamp/example/basecamp/\_config.php* with your own settings
7. make files executable in *sirprize-basecamp/example/basecamp/(milestone|person|project|todoitem|todolist)/\**
8. make writeable *sirprize-basecamp/example/\_logs*
9. run examples

### Setup

[](#setup)

```
use Sirprize\Basecamp\Service;
```

```
$config = array(
	'baseUri' => 'https://xxx.basecamphq.com',
	'username' => 'xxx',
	'password' => 'xxx'
);
```

```
$service = new Service($config);
```

### Fetch all projects

[](#fetch-all-projects)

```
$projects = $service->getProjectsInstance()->startAll();
```

```
foreach($projects as $project)
{
	print $project->getName()."\n";
}
```

### Copy a project

[](#copy-a-project)

```
use Sirprize\Basecamp\Id;
```

```
/*
 *
 * populate the target-project with the milestones,
 * todo-lists and todo-items from the source-project
 *
 */
```

```
$sourceProjectId = new Id('xxx');
$targetProjectId = new Id('yyy');
```

```
$projects = $service->getProjectsInstance();
$sourceProject = $projects->startById($sourceProjectId);
$sourceProject->copy($targetProjectId);
```

### Replicate a project (push deadlines to a new date)

[](#replicate-a-project-push-deadlines-to-a-new-date)

```
use Sirprize\Basecamp\Id;
use Sirprize\Basecamp\Date;
use Sirprize\Basecamp\Schema\Export;
```

```
/*
 *
 * populate the target-project with the milestones,
 * todo-lists and todo-items from the source-project.
 * the last milestone deadline is pushed to 2010-12-30 and
 * all other deadlines will be calculated relative to it
 *
 */
```

```
$sourceProjectId = new Id('xxx');
$targetProjectId = new Id('yyy');
```

```
$projects = $service->getProjectsInstance();
$sourceProject = $projects->startById($sourceProjectId);
$referenceDate = new Date('2010-12-30');
$referenceMilestone = Export::REFERENCE_EXTREMITY_LAST;
$sourceProject->replicate($targetProjectId, $referenceDate, $referenceMilestone);
```

### Create a new milestone

[](#create-a-new-milestone)

```
use Sirprize\Basecamp\Id;
use Sirprize\Basecamp\Date;
```

```
$milestones = $service->getMilestonesInstance();
$milestone = $milestones->getMilestoneInstance();
$deadline = new Date('2010-03-01');
$projectId = new Id('xxx');
$userId = new Id('xxx');
```

```
$milestone
	->setProjectId($projectId)
	->setResponsiblePartyId($userId)
	->setDeadline($deadline)
	->setTitle('Milestoners Everywhere')
	->setWantsNotification(true)
	->create()
;
```

Todo
----

[](#todo)

- Account
- Companies
- Categories
- Messages
- Comments: create(), update(), delete()
- Time tracking: startAllByTodoItemId(), create(), update(), delete()

Contributors
------------

[](#contributors)

- [lacyrhoades](https://github.com/lacyrhoades)
- [morrislaptop](https://github.com/morrislaptop)

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/81617?v=4)[Christian Högl](/maintainers/sirprize)[@sirprize](https://github.com/sirprize)

---

Top Contributors

[![sirprize](https://avatars.githubusercontent.com/u/81617?v=4)](https://github.com/sirprize "sirprize (91 commits)")[![lacyrhoades](https://avatars.githubusercontent.com/u/182621?v=4)](https://github.com/lacyrhoades "lacyrhoades (4 commits)")[![itsazzad](https://avatars.githubusercontent.com/u/54909?v=4)](https://github.com/itsazzad "itsazzad (1 commits)")

### Embed Badge

![Health badge](/badges/sirprize-basecamp/health.svg)

```
[![Health](https://phpackages.com/badges/sirprize-basecamp/health.svg)](https://phpackages.com/packages/sirprize-basecamp)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
