public function getSearch($query, $type = null)
    {
        $uri = 'search';
        $uriData = [
            'q' => $query
        ];
        if ( $type ) { $uriData['type'] = $type; }

        try {
            $response = $this->_request(
                [
                    'uri' => $uri,
                    'type' => 'get',
                    'data' => $uriData
                ]
            );
        } catch (\Exception $e) {
            throw new InvalidException($e->getMessage());
        }

        return $response->getBody()->getContents();
    }
public function getSearch($query, $type = null)
    {
        $uri = 'search';
        $uriData = [
            'q' => $query
        ];
        if ( $type ) { $uriData['type'] = $type; }

        try {
            $response = $this->_request(
                [
                    'uri' => $uri,
                    'type' => 'get',
                    'data' => $uriData
                ]
            );
        } catch (\Exception $e) {
            throw new InvalidException($e->getMessage());
        }

        return $response->getBody()->getContents();
    }
public function getSearch ( $ query , $ type = null ) { $ uri = 'search' ; $ uriData = [ 'q' => $ query ] ; if ( $ type ) { $ uriData [ 'type' ] = $ type ; } try { $ response = $ this -> _request ( [ 'uri' => $ uri , 'type' => 'get' , 'data' => $ uriData ] ) ; } catch ( \ Exception $ e ) { throw new InvalidException ( $ e -> getMessage ( ) ) ; } return $ response -> getBody ( ) -> getContents ( ) ; }
Search the info in providers for a movie

@param string $query The (partial) movie name you want to search for
@param string|null $type Search for a specific media type. Leave empty to search all.
@return string
@throws InvalidException
Search the info in providers for a movie