Vuzit_Document_find
bmatzelle edited this page Sep 13, 2010
·
2 revisions
Loads a document document.
- public static Document find(id, options = nil)
- string id : ID of the document.
- array options : Options for the uploaded file. See “Options” below.
- included_pages – string : Sets the number of pages that can be previewed in a document.
- Document : The new document with an ID and all attributes.
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