2017 © Pedro Peláez
 

library teamworkpm

PHP wrapper for Teamwork.com API

image

myabakus/teamworkpm

PHP wrapper for Teamwork.com API

  • Wednesday, July 18, 2018
  • by loduis
  • Repository
  • 9 Watchers
  • 51 Stars
  • 2,887 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 44 Forks
  • 14 Open issues
  • 9 Versions
  • 3 % Grown

The README.md

Teamwork.com PHP API

Latest Stable Version Total Downloads, (*1)

This library allows you to interact with the Teamwork.com API for managing projects, tasks, milestones, people, and more. It’s designed for developers looking to automate or integrate project management processes within their PHP applications., (*2)

Installation

To install the package, run the following command in your terminal:, (*3)

composer require myabakus/teamworkpm

Using the Api

In the following example, you will see how to use the API to create a project, add a person, define a milestone, create a task list, and assign a task with time tracking:, (*4)

require __DIR__ . '/vendor/autoload.php';

// START configuration
const API_KEY = 'horse48street';
const API_URL = 'https://yourcustomdomain.com'; // only required if you have a custom domain

try {
    // set your keys
    // if you do not have a custom domain:
    Tpm::auth(API_KEY);

    // if you do have a custom domain:
    // Tpm::auth(API_URL, API_KEY);

    // if you do have a need use different format:
    // Tpm::auth(API_URL, API_KEY, API_FORMAT);

    // create a project
    $project_id = Tpm::project()->save([
        'name' => 'This is a test project',
        'description' => 'Bla, Bla, Bla',
    ]);

    // create one people and add to project
    $person_id = Tpm::people()->save([
        'first_name' => 'Test',
        'last_name' => 'User',
        'user_name' => 'test',
        'email_address' => 'email@hotmail.com',
        'password' => 'foo123',
        'project_id' => $project_id,
    ]);

    // create a milestone
    $milestone_id = Tpm::milestone()->save([
        'project_id' => $project_id,
        'responsible_party_ids' => $person_id,
        'title' => 'Test milestone',
        'description' => 'Bla, Bla, Bla',
        'deadline' => date('Ymd', strtotime('+10 day')),
    ]);

    // create a task list
    $task_list_id = Tpm::taskList()->save([
        'project_id' => $project_id,
        'milestone_id' => $milestone_id,
        'name' => 'My first task list',
        'description' => 'Bla, Bla',
    ]);

    // create a task
    $task_id = Tpm::task()->save([
        'task_list_id' => $task_list_id,
        'content' => 'Test Task',
        'notify' => false,
        'description' => 'Bla, Bla, Bla',
        'due_date' => date('Ymd', strtotime('+10 days')),
        'start_date' => date('Ymd'),
        'private' => false,
        'priority' => 'high',
        'estimated_minutes' => 1000,
        'responsible_party_id' => $person_id,
    ]);

    // add time to task
    $time_id = Tpm::time()->save([
        'task_id' => $task_id,
        'person_id' => $person_id,
        'description' => 'Test Time',
        'date' => date('Ymd'),
        'hours' => 5,
        'minutes' => 30,
        'time' => '08:30',
        'isbillable' => false,
    ]);

    echo 'Project Id: ' . $project_id . "\n";
    echo 'Person Id: ' . $person_id . "\n";
    echo 'Milestone Id: ' . $milestone_id . "\n";
    echo 'Task List Id: ' . $task_list_id . "\n";
    echo 'Task Id: ' . $task_id . "\n";
    echo 'Time id: ' . $time_id . "\n";
} catch (Exception $e) {
    print_r($e);
}

View the tests folder for more details, (*5)

Console

The console provides a visual interface for interacting with the API and viewing responses or debugging., (*6)

console, (*7)

Save your tests fixtures, (*8)

  > stf(Tpm::me()->get())

The Versions

18/07 2018

dev-master

9999999-dev

PHP wrapper for Teamwork.com API

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Loduis Madariaga

18/07 2018

v1.1.1

1.1.1.0

PHP wrapper for Teamwork.com API

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Loduis Madariaga

26/02 2018

dev-cleanup

dev-cleanup

PHP wrapper for TeamWorkPm API.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Loduis Madariaga

26/02 2018

v1.1.0

1.1.0.0

PHP wrapper for TeamWorkPm API.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Loduis Madariaga

26/02 2015

v1.0.6

1.0.6.0

PHP wrapper for TeamWorkPm api.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Loduis Madariaga

10/10 2014

v1.0.5

1.0.5.0

PHP wrapper for TeamWorkPm api.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Loduis Madariaga

26/03 2014

v1.0.4

1.0.4.0

PHP wrapper for TeamWorkPm api.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Loduis Madariaga

16/03 2014

v1.0.3

1.0.3.0

PHP wrapper for TeamWorkPm api.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Loduis Madariaga

16/03 2014

v1.0.2

1.0.2.0

PHP wrapper for TeamWorkPm api.

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Loduis Madariaga