Skip to content

Commit b5a6db0

Browse files
committed
Add recursion paramater to all projects endpoint
1 parent 9cc84e9 commit b5a6db0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Endpoint/Projects.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,15 @@ protected function getEndpoint()
1515
*
1616
* @return array
1717
*/
18-
public function all()
18+
public function all(int $recursion = 0)
1919
{
2020
$projects = [];
21+
$config = [];
22+
if ($recursion > 0) {
23+
$config["recursion"] = $recursion;
24+
}
2125

22-
foreach ($this->get($this->getEndpoint()) as $project) {
26+
foreach ($this->get($this->getEndpoint(), $config) as $project) {
2327
$x = str_replace('/'.$this->client->getApiVersion().$this->getEndpoint(), '', $project);
2428
$x = str_replace('?project=' . $this->client->getProject(), '', $x);
2529

0 commit comments

Comments
 (0)