Get a preview for a file.

 @param [String] path
 @return [Dropbox::FileMetadata] metadata
 @return [HTTP::Response::Body] body
438940
def get_preview(path)
      resp, body = content_request('/files/get_preview', path: path)
      return FileMetadata.new(resp), body
    end
388304
def parse_file(path, target_ext=nil)
      return nil if path.nil?
      return nil if File.directory? path
      _load_from_file path, target_ext
      # if File.directory? path
      #   _load_from_directory path
      # else
      #   _load_from_file path, target_ext
      # end
    end
77146
def parse
      opts = OptionParser.new(&method(:options))
      opts.parse!(@args)
      return opts.help if @args.last.nil?

      file_preview = Filepreviews.generate(@args.last)
      @metadata ? file_preview.metadata(js: true) : file_preview
    end
396235
def get(path, &block)
      path = @uri.merge(path).path
      body = @handler.request_returning_body(:get, path, @headers, &block)
      body
    end
47801
def get(path, query=nil, headers={})
      response = execute :get, path, query, headers
      hash = JSON.parse response.body
    end
1349779
def get_file(self, file_path):
    

    try:
      resp = self._conn.get_object(
        Bucket=self._path.bucket,
        Key=self.get_path_to_file(file_path),
      )

      encoding = ''
      if 'ContentEncoding' in resp:
        encoding = resp['ContentEncoding']

      return resp['Body'].read(), encoding
    except botocore.exceptions.ClientError as err: 
      if err.response['Error']['Code'] == 'NoSuchKey':
        return None, None
      else:
        raise
1237099
public String getData(String path) throws ZooKeeperException {
        byte[] data = getDataRaw(path);
        return data != null ? new String(data, UTF8) : null;
    }
822541
def get(path, params = nil, headers = {})
      response = http_client.get(request_uri(path), params, request_headers(headers))
      if response.status == 200
        parse_response(response)
      else
        handle_error_response(response)
      end
    end
629299
def get(self, path):
        
        data = self.app.test_client().get("/%s" % path).data
        return data
414313
def get_data(self, path, **params):
        
        xml = self.get_response(path, **params)
        try:
            return parse(xml)
        except Exception as err:
            print(path)
            print(params)
            print(err)
            raise
18847
def read_yaml(path)
      return unless File.exist?(path)
      source = YAML.load_file(path)
      return unless source.is_a?(Hash)

      update_with { |config| read_yaml_key(source, config[:key]) }
    end
1150792
def metadata(js: false)
      url = send(:url)
      response = Filepreviews::HTTP.default_connection(url).get(nil)
      json = JSON.parse(response.body)

      js ? json : self.responsify(json)
    end
900821
public function getImagePreview($path, $size)
    {
        $response = $this->sendRequest(
            'GET',
            $path,
            [
                'query' => [
                    'preview' => '',
                    'size' => $size
                ]
            ]
        );

        $result = [];
        foreach ($response->getHeaders() as $key => $value) {
            $result['headers'][strtolower($key)] = $value[0];
        }

        $result['body'] = $response->getBody();
        return $result;
    }
655031
def file_get_contents(self, path):
        

        with open(self.get_full_file_path(path), 'r') as f: return  f.read()
498686
def load!(path)
      settings = YAML.safe_load(ERB.new(File.new(path).read).result)['api']
      from_hash(settings) if settings.is_a? Hash
    end
1083046
def get_document_preview(user_name, intra_hash, file_name, size)
      response = @conn.get get_document_href(user_name, intra_hash, file_name), { :preview => size }
      if response.status == 200
        return [response.body, 'image/jpeg']
      end
      return nil, nil
    end
72033
def get_temporary_link(path)
      resp = request('/files/get_temporary_link', path: path)
      return FileMetadata.new(resp['metadata']), resp['link']
    end