Working with the FormKeep API

I’m super happy with FormKeep from thoughtbot. FormKeep lets you create forms for static sites and is perfect for Middleman or Jekyll sites. I’m using a FormKeep form on Pixelsnatch. I wanted to be able to access FormKeep’s API data easily, so I wrote a little library gem that does that. It’s on RubyGems. The library will help you pull up all submissions, the latest submission, all read submissions and all unread submissions. It also comes with a bin file that will let you run formkeep unread FORM and see if you have any unread submissions. What the command line will return is merely the count. This could be used in conjunction with a shell script to run in the background as a Launch Agent and then notify you if you have unread submissions. Something along the lines of:

if [[ `formkeep unread form` -gt 0 ]]; then
  # do some notification thing
fi

Published on October 23, 2014


Related Posts