2017 © Pedro Peláez
 

library teamwork

PHP wrapper for the Teamwork project management API

image

rossedman/teamwork

PHP wrapper for the Teamwork project management API

  • Thursday, March 2, 2017
  • by redata425
  • Repository
  • 2 Watchers
  • 42 Stars
  • 1,741 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 47 Forks
  • 12 Open issues
  • 10 Versions
  • 7 % Grown

The README.md

Laravel 5 Teamwork PM API Bridge

teamwork-graphic, (*1)

Scrutinizer Code Quality Code Coverage Build Status Release License, (*2)

This is a simple PHP Client that can connect to the Teamwork API. This package was developed to be used with Laravel 5 but can also be used stand alone as well. I hope this helps you automate and extend Teamwork to integrate even more into your business! Have fun and good luck. :metal:, (*3)

Installation

Just add this to your composer.json and then run composer update., (*4)

"rossedman/teamwork": "~1.0"

You can also simply add it like this, (*5)

composer require "rossedman/teamwork:~1.0"

Laravel Setup

This wrapper comes with support for Laravel 5. This includes a service provider as well as a facade for easy access. Once this package is pulled into your project just add this to your config/app.php file., (*6)

'providers' => [
    ...
    'Rossedman\Teamwork\TeamworkServiceProvider',
],

and then add the facade to your aliases array, (*7)

'aliases' => [
    ...
    'Teamwork' => 'Rossedman\Teamwork\Facades\Teamwork',
],

Configuration

If you are using Laravel then add a teamwork array to your config/services.php file, (*8)

...
'teamwork' => [
    'key'  => 'YourSecretKey',
    'url'  => 'YourTeamworkUrl'
],

Use

If you are using the Facade with Laravel youc an easily access Teamwork like this, (*9)

Teamwork::people()->all();

If you want to use dependency injection to make your application easy to test the Service Provider binds Rossedman\Teamwork\Factory. Here is an example of how to use it with dependency injection, (*10)

Route::get('/test', function(Rossedman\Teamwork\Factory $teamwork) {
   $activity = $teamwork->activity()->latest();
});

Configuration Without Laravel

If you are not using Laravel you can instantiate the class like this, (*11)

require "vendor/autoload.php";

use GuzzleHttp\Client as Guzzle;
use Rossedman\Teamwork\Client;
use Rossedman\Teamwork\Factory as Teamwork;

$client     = new Client(new Guzzle, 'YourSecretKey', 'YourTeamworkUrl');
$teamwork   = new Teamwork($client);

You are ready to go now!, (*12)


Examples

Not all of the Teamwork API is supported yet but there is still a lot you can do! Below are some examples of how you can access Projects, Companies, and more. To work with a specific Object pass in the ID to perform actions on it. Data can be passed through for creating and editing., (*13)

To see more examples visit the docs, (*14)

// create a project
$teamwork->project()->create([
    "name" => "My New Amazing Project",
    "description" => "This is a project that I will dedicate my whole life too",
    "companyId" => "999"
]);

// get the latest activity on a project
$teamwork->project($projectID)->activity();

Roadmap

1.1 Release

  • [X] Add Support For Comments
  • [ ] Add Support For Permissions
  • [ ] Add Support For Time Endpoint

1.2 Release

  • [ ] Add Support For Categories
  • [ ] Add Support For People Status
  • [ ] Add Support For Files
  • [ ] Add Support For Notebooks

The Versions

02/03 2017

dev-master

9999999-dev

PHP wrapper for the Teamwork project management API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ross Edman

laravel api project management teamwork

02/03 2017

v1.1.0

1.1.0.0

PHP wrapper for the Teamwork project management API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ross Edman

laravel api project management teamwork

12/04 2016

v1.0.6

1.0.6.0

PHP wrapper for the Teamwork project management API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ross Edman

laravel api project management teamwork

05/02 2016

v1.0.5

1.0.5.0

PHP wrapper for the Teamwork project management API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ross Edman

laravel api project management teamwork

27/01 2016

v1.0.4

1.0.4.0

PHP wrapper for the Teamwork project management API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ross Edman

laravel api project management teamwork

18/11 2015

v1.0.3

1.0.3.0

PHP wrapper for the Teamwork project management API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ross Edman

laravel api project management teamwork

07/08 2015

v1.0.2

1.0.2.0

PHP wrapper for the Teamwork project management API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ross Edman

laravel api project management teamwork

16/06 2015

v1.0.1

1.0.1.0

PHP wrapper for the Teamwork project management API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ross Edman

laravel api project management teamwork

25/05 2015

v1.0.0

1.0.0.0

PHP wrapper for the Teamwork project management API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ross Edman

laravel api project management teamwork

03/04 2015

dev-develop

dev-develop

PHP wrapper for the Teamwork project management API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ross Edman

laravel api project management teamwork