Skip to content

samaphp/desktime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Desktime (WIP)

PHP library for desktime.com API.

You need to get your API key value. You can find your api_key value here: https://desktime.com/app/api

PRs Welcome saythanks

Examples:

$Account = new Account();
$Account->setCredentials(['api_key' => 'API_KEY_HERE']);
$company = $Account->company();
print_r($company);

stdClass Object
(
    [pass] => 1
    [code] => 200
    [body] => stdClass Object
        (
            [name] => Company name
            [work_starts] => 07:15:00
            [work_ends] => 18:00:00
            [work_duration] => 28800
            [working_days] => 79
            [work_start_tracking] => 07:00:00
            [work_stop_tracking] => 22:45:00
            [timezone_identifier] => Asia/Riyadh
            [__request_time] => 1578933311
        )

)

You can get all employees or api_key employee owner.

$Employee = new Employee();
$Employee->setCredentials(['api_key' => 'API_KEY_HERE']);

// Getting all employees.
// $all = $Employee->all(['date' => '2019-11-13', 'period' => 'month']); //.
$all_employees = $Employee->all();
print_r($all_employees);

// Getting current employee. (the owner of this API key)
$current_employee = $Employee->get();
print_r($current_employee);

// Load employee data by his Desktime email.
$email = '[email protected]';
$employee = $Employee->getEmployeeByEmail($email);
print_r($employee);

About

PHP library for desktime.com API.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages