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