Skip to content

arturf/basecamp-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A PHP Wrapper for use with the new Basecamp API.

Simple PHP library to communicate with Basecamp. Works only with new Basecamp.

This library use HTTP caching ETag according this recommendation.

TODO: Pagination.

Installation

Install Composer

$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer

Add the following to your require block in composer.json config.

"arturf/basecamp-api": "dev-master"

Include Composer's autoloader:

require_once dirname(__DIR__).'/vendor/autoload.php';

API Usage

Get client

$client = new \Basecamp\Client([
    'accountId' => '', // Basecamp account ID
    'appName' => '', // Application name (used as User-Agent header)

    // OAuth token
    'token' => '',
    // or
    'login' => '', // 37Signal's account login
    'password' => '', // 37Signal's account password
]);

List of all active projects

$projects = $client->projects()->active();

Create new project

$newProject = $client->projects()->create(
    [
        'name' => 'Name of project',
        'description' => 'Some description',
    ]
);

Update existing project

$updateProject = $client->projects()->update(
    $projectId,
    [
        'name' => 'New name of project',
        'description' => 'Some description',
    ]
);

Contributing

Welcome :)

About

PHP wrapper for new Basecamp API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages