Sha256: f7b9f27a7387abaef0df902081c62896a8441b34620d7dd1dc225e4a7cc6e134

Contents?: true

Size: 1.24 KB

Versions: 1

Compression:

Stored size: 1.24 KB

Contents

= daywalker

A Ruby wrapper for the Sunlight Labs API: http://wiki.sunlightlabs.com/Sunlight_API_Documentation

== Install

  # Run the following if you haven't already:
  gem sources -a http://gems.github.com
  # Install the gem(s):
  sudo gem install technicalpickles-daywalke

== Get an API key

Before starting you need to register for an API key: http://services.sunlightlabs.com/api/register/

After registering, you will receive an email prompting you to activate the API key.

== Examples

    require 'rubygems'
    require 'daywalker'
    require 'pp'

    Daywalker.api_key = 'this is so sekrit'

    pp Daywalker::District.find_by_zip('27511')
    pp Daywalker::District.find_by_latlng(40.739157, -73.990929)
    pp Daywalker::Legislator.find(:one, :state => 'NY', :district => 4)
    pp Daywalker::Legislator.find_all_by_state_and_senator('NY', :senator)
  

== FAQ

Q:: Why not use the existing gem, available at http://github.com/luigi/sunlight/tree/master ?
A:: Mostly, I didn't have a good experience when just poking around the Sunlight Labs API. I was dense and didn't activate my API key at first, but it didn't notice that. Even after activating, I wasn't getting any data back.

== COPYRIGHT

Copyright (c) 2009 Josh Nichols. See LICENSE for details.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
technicalpickles-daywalker-0.1.0 README.rdoc