Skip to content

Commit ff78c2a

Browse files
authored
Add support to filter environments by state (#636)
Co-authored-by: Christian Spoo <[email protected]>
1 parent a511bdb commit ff78c2a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Api/Environments.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ public function all($project_id, array $parameters = [])
3131
->setAllowedTypes('name', 'string');
3232
$resolver->setDefined('search')
3333
->setAllowedTypes('search', 'string');
34+
$resolver->setDefined('states')
35+
->setAllowedTypes('states', 'string')
36+
->setAllowedValues('states', ['available', 'stopped']);
3437

3538
return $this->get($this->getProjectPath($project_id, 'environments'), $resolver->resolve($parameters));
3639
}

0 commit comments

Comments
 (0)