src/Image.php
public function listStacks($limit = null, $offset = null, $organization = '')
    {
        $options = [];

        if ($limit || $offset) {
            $options = ['query' => ['limit' => $limit, 'offset' => $offset]];
        }

        $contents = $this
            ->call('GET', self::STACK_RESOURCE.'/'.$this->getOrganizationName($organization), $options)
            ->getBody()
            ->getContents();

        return StackCollection::createFromJsonResponse($contents);
    }
public function listStacks($limit = null, $offset = null, $organization = '')
    {
        $options = [];

        if ($limit || $offset) {
            $options = ['query' => ['limit' => $limit, 'offset' => $offset]];
        }

        $contents = $this
            ->call('GET', self::STACK_RESOURCE.'/'.$this->getOrganizationName($organization), $options)
            ->getBody()
            ->getContents();

        return StackCollection::createFromJsonResponse($contents);
    }
public function listStacks ( $ limit = null , $ offset = null , $ organization = '' ) { $ options = [ ] ; if ( $ limit || $ offset ) { $ options = [ 'query' => [ 'limit' => $ limit , 'offset' => $ offset ] ] ; } $ contents = $ this -> call ( 'GET' , self :: STACK_RESOURCE . '/' . $ this -> getOrganizationName ( $ organization ) , $ options ) -> getBody ( ) -> getContents ( ) ; return StackCollection :: createFromJsonResponse ( $ contents ) ; }
List stacks.

```language-php
use Rokka\Client\Core\Stack;
$client = \Rokka\Client\Factory::getImageClient('testorganization', 'apiKey');
$stacks = $client->listStacks();
foreach ($stacks as $stack) {
echo 'Stack ' . $stack->getName() . PHP_EOL;
}
```

@param null|int $limit        Optional limit
@param null|int $offset       Optional offset
@param string   $organization Optional organization name

@throws GuzzleException
@throws \RuntimeException

@return StackCollection
List stacks .