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