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