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