-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathClient.php
66 lines (54 loc) · 1.58 KB
/
Client.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
declare(strict_types=1);
namespace Motion;
use Motion\Contracts\ClientContract;
use Motion\Contracts\Resources\CommentsContract;
use Motion\Contracts\Resources\ProjectsContract;
use Motion\Contracts\Resources\RecurringTasksContract;
use Motion\Contracts\Resources\TasksContract;
use Motion\Contracts\Resources\UsersContract;
use Motion\Contracts\Resources\WorkspacesContract;
use Motion\Contracts\TransporterContract;
use Motion\Resources\Comments;
use Motion\Resources\Projects;
use Motion\Resources\RecurringTasks;
use Motion\Resources\Schedules;
use Motion\Resources\Tasks;
use Motion\Resources\Users;
use Motion\Resources\Workspaces;
final class Client implements ClientContract
{
public const VERSION = '0.1.0';
public function __construct(private readonly TransporterContract $transporter)
{
//..
}
public function tasks(): TasksContract
{
return new Tasks($this->transporter);
}
public function users(): UsersContract
{
return new Users($this->transporter);
}
public function workspaces(): WorkspacesContract
{
return new Workspaces($this->transporter);
}
public function schedules(): Schedules
{
return new Schedules($this->transporter);
}
public function comments(): CommentsContract
{
return new Comments($this->transporter);
}
public function recurringTasks(): RecurringTasksContract
{
return new RecurringTasks($this->transporter);
}
public function projects(): ProjectsContract
{
return new Projects($this->transporter);
}
}