Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Libraries

    VuzitRuby 2.1.1

    Download button

    No screenshots available
    Downloads: 303  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Brent Matzelle | More programs
    MIT/X Consortium Lic... / FREE
    April 23rd, 2010, 10:13 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    VuzitRuby description

    A library that allows developers to directly access the Vuzit Web Service API.

    VuzitRuby is is a library that lets developers access the Vuzit Web
    Service API through a Ruby script.

    Below is a basic upload example:

      require "vuzitruby" 

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

      doc = Vuzit::Document.upload("c:/path/to/document.pdf")

      puts "Document id: " + doc.id 

    To get started all you need to do is download the code, sign up for a free account (https://ssl.vuzit.com/signup) and replace the public and private keys with the keys from your account.

    SETUP

    The client library is a RubyGem called *vuzitruby*. To install, type:

      gem install vuzitruby


    EXAMPLES

    Find Document Example - how to load a document:

      require "vuzitruby"

      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

    Delete (destroy) Document Example:

      require "vuzitruby" 

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

      doc = Vuzit::Document::destroy("DOCUMENT_ID")


    Upload and View with the JavaScript API Example for a Rails RHTML file:

      < %
      require "vuzitruby"
      require 'cgi'

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

      doc = Vuzit::Document.upload("c:/path/to/document.pdf")
      timestamp = Time.now
      sig = Vuzit::Service.get_signature("show", doc.id, timestamp)
      % >
      < html >
        < head >
          < link href="http://vuzit.com/stylesheets/Vuzit-2.6.css" rel="Stylesheet" type="text/css" / >
          < script src="http://vuzit.com/javascripts/Vuzit-2.6.js" type="text/javascript" >< /script >
          < script type="text/javascript" >
            // Called when the page is loaded. 
            function initialize()  {
              vuzit.Base.PublicKeySet("< %= Vuzit::Service.public_key % >");
              var options = {signature: '< %= CGI.escape(sig) % >',
                             timestamp: '< %= timestamp %>', ssl: true}
              var viewer = vuzit.Viewer.fromId("< %= doc.id % >", options);
             
              viewer.display(document.getElementById("vuzit_viewer"), { zoom: 1 });
            }
          < /script >
        < /head >
        < body onload="initialize()" >
          < div id="vuzit_viewer" style="width: 650px; height: 500px;" >< /div >
        < /body >
      < /html >



    Product's homepage

    Requirements:

    · Ruby

      


    TAGS:

    Ruby library | Vuzit access | Ruby | library | Vuzit

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM