Skip to content

durnin/typeform

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Typeform

Typeform is a Ruby gem that provides a wrapper for interacting with the Typeform Data API.

Installation

Add this line to your application's Gemfile:

gem 'typeform'

And then execute:

$ bundle

Or install it yourself as:

$ gem install typeform

Usage

Please refer to the Typeform Data API Documentation for more information about the API, or follow the examples below:

require 'typeform'

Typeform.api_key = ENV['TYPEFORM_API_KEY']
typeform_id = "an_id_here"
form = Typeform::Form.new(typeform_id)

all_entries = form.all_entries
incomplete_entries = form.incomplete_entries
complete_entries = form.complete_entries

# Fetches all complete entries since today
newest_entries = form.complete_entries(since: Date.today.to_time.to_i)

For now, the wrapper returns the default format as returned by the Typeform Data API. I have some thoughts on how they should structure their data and how they can be build a Hypermedia APIs, but the current implementation allows you to build your custom logic on top of the responses (e.g. your pagination logic).

Contributing

  1. Fork it ( https://github.com/philipdesmedt/typeform/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

A Ruby interface to the Typeform Data API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%