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