2017 © Pedro Peláez
 

library teamworkpm

PHP wrapper for TeamWorkPm API.

image

agykoala/teamworkpm

PHP wrapper for TeamWorkPm API.

  • Thursday, July 26, 2018
  • by AgyKoala
  • Repository
  • 1 Watchers
  • 0 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 44 Forks
  • 0 Open issues
  • 11 Versions
  • 0 % Grown

The README.md

TeamWorkPm PHP Api

Using Api

This is very easy use the method: save, insert, update, delete, (*1)

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

try {
    // set your keys
    // if you do not have a custom domain:
    \TeamWorkPm\Auth::set(API_KEY);
    // if you do have a custom domain:
    // TeamWorkPm\Auth::set(API_URL, API_KEY);

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

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

    // create on milestone
    $milestone = \TeamWorkPm\Factory::build('milestone');
    $milestone_id = $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 one task list
    $taskList = \TeamWorkPm\Factory::build('task.list');
    $task_list_id = $taskList->save([
        'project_id'  => $project_id,
        'milestone_id' => $milestone_id,
        'name'        => 'My first task list',
        'description' => 'Bla, Bla'
    ]);

    // create one task
    $task = \TeamWorkPm\Factory::build('task');
    $task_id = $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 = \TeamWorkPm\Factory::build('time');
    $time_id = $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, (*2)

The Versions

26/07 2018

dev-master

9999999-dev

PHP wrapper for TeamWorkPm API.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Loduis Madariaga

26/07 2018

v1.2.2

1.2.2.0

PHP wrapper for TeamWorkPm API.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Loduis Madariaga

18/07 2018

v1.2.1

1.2.1.0

PHP wrapper for TeamWorkPm API.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Loduis Madariaga

18/07 2018

v1.2

1.2.0.0

PHP wrapper for TeamWorkPm 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