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+

66282↓75%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 1w 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 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity29

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://www.gravatar.com/avatar/d2aa6b6ece804d8a151ee35b0be09d68fda456edea22a53986bb49ece0a86782?d=identicon)[sirprize](/maintainers/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

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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