Skip to content

Commit 3288a9f

Browse files
committed
✨ Add getFolders() API method to retrieve project linked folders
1 parent 8445e70 commit 3288a9f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/EnvoyerApi.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,18 @@ public function getHooks(): Collection
174174
return collect($hooks->hooks ?? []);
175175
}
176176

177+
/**
178+
* Get the specified project's linked folders.
179+
*/
180+
public function getFolders(): Collection
181+
{
182+
$folders = json_decode(
183+
$this->api()->get("/projects/{$this->project}/folders")->body()
184+
);
185+
186+
return collect($folders->folders ?? []);
187+
}
188+
177189
/**
178190
* Create a new deployment.
179191
*/

0 commit comments

Comments
 (0)