-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtestClass.php
33 lines (27 loc) · 875 Bytes
/
testClass.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
require_once 'SlimTimer.php';
/**
* This tester looks for a config.ini file and in there you can put your details
*/
$email = '';
$password = '';
if(file_exists('config.ini'))
{
$config = parse_ini_file('config.ini');
$email = $config['email'];
$password = $config['password'];
}
$s = new SlimTimer($apiKey);
$userId = $s->authenticate($email, $password, true);
//$tasks = $s->listTasks($userId);
//$s->createTask($userId, "Test via API");
//$s->updateTask($userId, 1879734, null, array('foo', 'bar'));
//$s->showTask($userId, 1899512);
//$s->deleteTask($userId, 1899512);
//$s->listTimes($userId);
//$s->listTimesForTask($userId, 1879734);
//$s->createTime($userId, 1879734, date('Y-m-d H:i:s'), 1);
//$time = $s->showTime($userId, 19016444);
//$s->updateTime($userId, 1879734, $time->id, 10, $time->{'start-time'});
//$s->deleteTime($userId, $time->id);
?>