danwoolley / numbertwopencil

Ruby library for accessing school data using the education.com web services.

This URL has Read+Write access

danwoolley (author)
Sat Sep 19 09:29:43 -0700 2009
commit  3350881863b1acb1b36f3b378c0b552b60b19302
tree    e26aadbd050dcf147d4cdbe0b23d10e65269e3e2
parent  bd5a968472e23c9cb39bcdf88312bde4f5198e21
name age message
file README Loading commit data...
directory demo/
directory lib/
file numbertwopencil.gemspec
directory sample_data/
README
NumberTwoPencil
Created by Dan Woolley, September 2008.


To install from gem:
$ gem sources -a http://gems.github.com
$ sudo gem install danwoolley-numbertwopencil --include-dependencies


Library requirements: 
* gem install json      # include-dependencies above should take care of this.


Education.com API requirements:
* Docs at http://www.education.com/webservice/documentation/
* Sign up for an API key at http://www.education.com/webservice/request/
* Terms of service at http://www.education.com/webservice/terms/
* This provider is pretty strict about tying your api key to an IP address.  Contact them if you need
multiple IP's.


Sample library usage:
require 'numbertwopencil'
foo = NumberTwoPencil.new(your_api_key)
data = foo.education_com_getSchools "zip" => "33432"
p data
data.each {|item| puts "#{item["schoolname"]}\t#{item["gradelevel"]}\t#{item["city"]}"}



Sample schoolSearch request using curl:
curl 
"http://www.education.com/service/service.php?f=schoolSearch&sn=sf&resf=json&key=your_education_com_api_key&zip=33432"