Skip to content

Vuzit_Document_find

bmatzelle edited this page Sep 13, 2010 · 2 revisions

Vuzit::Document.find function

Loads a document document.

Signatures

  • public static Document find(id, options = nil)

Parameters

  • string id : ID of the document.
  • array options : Options for the uploaded file. See “Options” below.

Options

  • included_pages – string : Sets the number of pages that can be previewed in a document.

Return type

  • Document : The new document with an ID and all attributes.

Usage Examples

Simple load example:


Vuzit::Service.public_key = "YOUR_PUBLIC_API_KEY"
Vuzit::Service.private_key = "YOUR_PRIVATE_API_KEY"

doc = Vuzit::Document.find("DOCUMENT_ID")

puts "Document id: " + doc.id
puts "Document title: " + doc.title

Example that allows the user to only see pages 1 – 9 of a document.


Vuzit::Service.public_key = "YOUR_PUBLIC_API_KEY"
Vuzit::Service.private_key = "YOUR_PRIVATE_API_KEY"

doc = Vuzit::Document.find("DOCUMENT_ID", :included_pages => "0-8")

puts "Document id: " + doc.id
puts "Document title: " + doc.title