@@ 71-81 (lines=11) @@ | ||
68 | * @throws exceptions\LPTrackerResponseException |
|
69 | * @throws exceptions\LPTrackerServerException |
|
70 | */ |
|
71 | public function getProjectList() |
|
72 | { |
|
73 | $response = LPTrackerRequest::sendRequest('/projects', [], 'GET', $this->token, $this->address); |
|
74 | ||
75 | $result = []; |
|
76 | foreach ($response as $projectData) { |
|
77 | $result[] = new Project($projectData); |
|
78 | } |
|
79 | ||
80 | return $result; |
|
81 | } |
|
82 | ||
83 | ||
84 | /** |
|
@@ 91-100 (lines=10) @@ | ||
88 | * @throws exceptions\LPTrackerResponseException |
|
89 | * @throws exceptions\LPTrackerServerException |
|
90 | */ |
|
91 | public function getProject($id) |
|
92 | { |
|
93 | $url = '/project/'.$id; |
|
94 | ||
95 | $response = LPTrackerRequest::sendRequest($url, [], 'GET', $this->token, $this->address); |
|
96 | ||
97 | $project = new Project($response); |
|
98 | ||
99 | return $project; |
|
100 | } |
|
101 | ||
102 | ||
103 | /** |