JotForm API - Ruby Client
Ruby
Latest commit 9d456a6 Sep 15, 2013 @eeertekin eeertekin Create LICENSE
Permalink
Failed to load latest commit information.
JotForm.rb First release Jul 2, 2013
LICENSE Create LICENSE Sep 15, 2013
README.md Small readme fix Aug 14, 2013

README.md

jotform-api-ruby

JotForm API - Ruby Client

Installation

Install via git clone:

    $ git clone git://github.com/jotform/jotform-api-ruby.git
    $ cd jotform-api-ruby

Documentation

You can find the docs for the API of this client at http://api.jotform.com/docs/

Authentication

JotForm API requires API key for all user related calls. You can create your API Keys at API section of My Account page.

Examples

Print all forms of the user

#!/usr/bin/env ruby
require_relative 'JotForm'

jotform = JotForm.new("APIKey")
forms = jotform.getForms()

forms.each do |form|
    puts form["title"]
end

Get latest submissions of the user

#!/usr/bin/env ruby
require_relative 'JotForm'

jotform = JotForm.new("APIKey")
submissions = jotform.getSubmissions()

submissions.each do |submission|
    puts submission["created_at"] + " " 
    submission["answers"].each do | answer|
        puts "\t" + answer.join(" ")
    end
end

First the JotForm class is included from the jotform-api-ruby/JotForm.rb file. This class provides access to JotForm's API. You have to create an API client instance with your API key. In case of an exception (wrong authentication etc.), you can catch it or let it fail with a fatal error.