flooris/php-toggl

PHP SDK for Toggl, the time tracker app

1.0.0 2018-05-26 09:24 UTC

This package is auto-updated.

Last update: 2024-12-17 10:24:12 UTC


README

PHP library for the Toggl Timetracker API (v8)

Getting Started

Composer (recommended)

composer require flooris/php-toggl

Download

Download the zip or git clone git@github.com:flooris/php-toggl.git

Dependencies: PHP >= 5.5.9 and Guzzle >=6.2

Example:

$toggl = new Toggl($api_key)
$toggl->startTimer($data);

Methods

Clients

$toggl->getClients($id);
$toggl->getClientProjects($id);
$toggl->saveClient($id, $data);
$toggl->deleteClient($id);

Dashboard

$toggl->getDashboard($workspace_id);

Me

$toggl->getMe();
$toggl->saveMe($data);
$toggl->resetApiKey();

Projects

$toggl->getProject($id);
$toggl->getProjectTasks($id);
$toggl->saveProject($id, $data);
$toggl->deleteProject($id);
$toggl->getProjectUsers($project_id);
$toggl->saveProjectUser($id, $data);
$toggl->deleteProjectUser($id);

Tags

$toggl->saveTag($id, $data);
$toggl->deleteTag($id);

Tasks

$toggl->getTask($id);
$toggl->saveTask($id, $data);
$toggl->deleteTask($id);

Time Entries

$toggl->getTimeEntry($id);
$toggl->getTimer();
$toggl->saveTimeEntry($id, $data, $start_timer);
$toggl->startTimer($data);
$toggl->stopTimer($id);

Users

$toggl->createUser($data);

Workspaces

$toggl->getWorkspaces($id);
$toggl->getWorkspaceUsers($id);
$toggl->getWorkspaceClients($id);
$toggl->getWorkspaceProjects($id);
$toggl->getWorkspaceTasks($id);
$toggl->getWorkspaceTags($id);
$toggl->updateWorkspace($id, $data);

Workspace Users

$toggl->inviteUsers($id, $email);
$toggl->deleteWorkspaceUser($id);