-
Notifications
You must be signed in to change notification settings - Fork 0
/
PlayGround.php
44 lines (33 loc) · 1.03 KB
/
PlayGround.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
34
35
36
37
38
39
40
41
42
43
44
<?php
/**
* PlayGround
* @author George Martinec <github.com/george-martinec>
*/
declare(strict_types = 1);
use Unirest\Request as Request;
require_once __DIR__ . '/Helper.php';
require_once __DIR__ . '/GoodDay.php';
ini_set('display_errors', 'true');
ini_set('display_startup_errors', 'true');
error_reporting(E_ALL);
/**
* Initialize Classes
*/
$Helper = new Helper();
$GoodDay = new GoodDay('YOUR_API_TOKEN'); // https://www.goodday.work/developers/api-v2/connect
/**
* PlayGround
*/
$currentDate = $Helper::currentDate();
$projects = $GoodDay->getProjects();
$Helper::d($projects, $Helper::toObject( Request::getInfo() ));
/** Users */
//$users = $GoodDay->getUsers();
//$Helper::d($users, $Helper::toObject( Request::getInfo() ));
/** Project Users */
//$projectUsers = $GoodDay->getProjectUsers('PROJECT_ID');
//$Helper::d($users, $Helper::toObject( Request::getInfo() ));
/** Project Tasks */
//$projectTasks = $GoodDay->getTasks('PROJECT_ID');
//$Helper::d($projectTasks, $Helper::toObject( Request::getInfo() ));
/** ... */