Method: Crocodoc::Download.document
- Defined in:
- lib/crocodoc/download.rb
.document(uuid, is_pdf = false, is_annotated = false, filter = nil) ⇒ String
Download a document’s original file from Crocodoc. The file can optionally be downloaded as a PDF, as another filename, with annotations, and with filtered annotations.
32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/crocodoc/download.rb', line 32 def self.document(uuid, is_pdf=false, is_annotated=false, filter=nil) get_params = {uuid: uuid} get_params['pdf'] = 'true' if is_pdf get_params['annotated'] = 'true' if is_annotated if filter filter = filter.join(',') if filter.is_a? Array get_params['filter'] = filter end Crocodoc._request(self.path, 'document', get_params, nil, false) end |