src/Image.php
public function searchSourceImages($search = [], $sorts = [], $limit = null, $offset = null, $organization = '')
    {
        $options = ['query' => []];

        $sort = SearchHelper::buildSearchSortParameter($sorts);
        if (!empty($sort)) {
            $options['query']['sort'] = $sort;
        }

        if (\is_array($search) && !empty($search)) {
            foreach ($search as $field => $value) {
                if (!SearchHelper::validateFieldName((string) $field)) {
                    throw new \LogicException(sprintf('Invalid field name "%s" as search field', $field));
                }

                $options['query'][$field] = $value;
            }
        }

        if (isset($limit)) {
            $options['query']['limit'] = $limit;
        }
        if (isset($offset)) {
            $options['query']['offset'] = $offset;
        }

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

        return SourceImageCollection::createFromJsonResponse($contents);
    }
public function searchSourceImages($search = [], $sorts = [], $limit = null, $offset = null, $organization = '')
    {
        $options = ['query' => []];

        $sort = SearchHelper::buildSearchSortParameter($sorts);
        if (!empty($sort)) {
            $options['query']['sort'] = $sort;
        }

        if (\is_array($search) && !empty($search)) {
            foreach ($search as $field => $value) {
                if (!SearchHelper::validateFieldName((string) $field)) {
                    throw new \LogicException(sprintf('Invalid field name "%s" as search field', $field));
                }

                $options['query'][$field] = $value;
            }
        }

        if (isset($limit)) {
            $options['query']['limit'] = $limit;
        }
        if (isset($offset)) {
            $options['query']['offset'] = $offset;
        }

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

        return SourceImageCollection::createFromJsonResponse($contents);
    }
public function searchSourceImages ( $ search = [ ] , $ sorts = [ ] , $ limit = null , $ offset = null , $ organization = '' ) { $ options = [ 'query' => [ ] ] ; $ sort = SearchHelper :: buildSearchSortParameter ( $ sorts ) ; if ( ! empty ( $ sort ) ) { $ options [ 'query' ] [ 'sort' ] = $ sort ; } if ( \ is_array ( $ search ) && ! empty ( $ search ) ) { foreach ( $ search as $ field => $ value ) { if ( ! SearchHelper :: validateFieldName ( ( string ) $ field ) ) { throw new \ LogicException ( sprintf ( 'Invalid field name "%s" as search field' , $ field ) ) ; } $ options [ 'query' ] [ $ field ] = $ value ; } } if ( isset ( $ limit ) ) { $ options [ 'query' ] [ 'limit' ] = $ limit ; } if ( isset ( $ offset ) ) { $ options [ 'query' ] [ 'offset' ] = $ offset ; } $ contents = $ this -> call ( 'GET' , self :: SOURCEIMAGE_RESOURCE . '/' . $ this -> getOrganizationName ( $ organization ) , $ options ) -> getBody ( ) -> getContents ( ) ; return SourceImageCollection :: createFromJsonResponse ( $ contents ) ; }
Search and list source images.

Sort direction can either be: "asc", "desc" (or the boolean TRUE value, treated as "asc")

@param array           $search       The search query, as an associative array "field => value"
@param array           $sorts        The sorting parameters, as an associative array "field => sort-direction"
@param int|null        $limit        Optional limit
@param int|string|null $offset       Optional offset, either integer or the "Cursor" value
@param string          $organization Optional organization name

@throws GuzzleException
@throws \RuntimeException

@return SourceImageCollection
Search and list source images .