public function readAll()
    {
        $resourcesGetMethod = $this->resourcesGetMethod;
        if (!is_null($resourcesGetMethod)) {
            foreach ($this->call->responses() as $response) {
                foreach ($response->$resourcesGetMethod() as $resource) {
                    yield $resource;
                }
            }
        } else {
            foreach ($this->call->responses() as $response) {
                yield $response;
            }
        }
        $status = $this->call->getStatus();
        if (!($status->code == Code::OK)) {
            throw ApiException::createFromStdClass($status);
        }
    }
public function readAll()
    {
        $resourcesGetMethod = $this->resourcesGetMethod;
        if (!is_null($resourcesGetMethod)) {
            foreach ($this->call->responses() as $response) {
                foreach ($response->$resourcesGetMethod() as $resource) {
                    yield $resource;
                }
            }
        } else {
            foreach ($this->call->responses() as $response) {
                yield $response;
            }
        }
        $status = $this->call->getStatus();
        if (!($status->code == Code::OK)) {
            throw ApiException::createFromStdClass($status);
        }
    }
public function readAll ( ) { $ resourcesGetMethod = $ this -> resourcesGetMethod ; if ( ! is_null ( $ resourcesGetMethod ) ) { foreach ( $ this -> call -> responses ( ) as $ response ) { foreach ( $ response -> $ resourcesGetMethod ( ) as $ resource ) { yield $ resource ; } } } else { foreach ( $ this -> call -> responses ( ) as $ response ) { yield $ response ; } } $ status = $ this -> call -> getStatus ( ) ; if ( ! ( $ status -> code == Code :: OK ) ) { throw ApiException :: createFromStdClass ( $ status ) ; } }
A generator which yields results from the server until the streaming call
completes. Throws an ApiException if the streaming call failed.

@throws ApiException
@return \Generator|mixed
A generator which yields results from the server until the streaming call completes . Throws an ApiException if the streaming call failed .