github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

technicalpickles / daywalker

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 9
    • 0
  • Source
  • Commits
  • Network (0)
  • Issues (1)
  • Downloads (7)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (7)
    • v0.3.1
    • v0.3.0
    • v0.2.1
    • v0.2.0
    • v0.1.2
    • v0.1.1
    • v0.1.0
Sending Request…
Click here to lend your support to: daywalker and make a donation at www.pledgie.com ! Edit Pledgie Setup

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

A Ruby wrapper around the Sunlight Labs API using httparty and happymapper — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Vendored graticule. Also switched setup to before, since it seems to be 
unavailable in recent rspec. 
technicalpickles (author)
Fri Apr 17 22:40:21 -0700 2009
commit  9c1c148626b0c36c72f25d7895a91aedd795eef7
tree    3fb5e99e07b8224e9eeb366222b088285b1715ad
parent  397f709219d88a6fa2dd17e6a114a2d9d1248d10
daywalker /
name age
history
message
file .gitignore Sun Feb 08 23:35:53 -0800 2009 Ignore rdoc. [technicalpickles]
file LICENSE Mon Feb 09 21:01:47 -0800 2009 Fixed year in license. [technicalpickles]
file README.rdoc Mon Mar 30 15:04:12 -0700 2009 Updated code examples in README to reflect new ... [technicalpickles]
file Rakefile Sat Feb 14 23:53:13 -0800 2009 First pass at geocoding for district. [technicalpickles]
file VERSION.yml Mon Mar 30 15:04:34 -0700 2009 Version bump to 0.3.1 [technicalpickles]
file daywalker.gemspec Mon Mar 30 15:04:35 -0700 2009 Regenerated gemspec for version 0.3.1 [technicalpickles]
directory examples/ Mon Feb 16 14:46:38 -0800 2009 Cleaned up example. [technicalpickles]
directory lib/ Mon Feb 16 23:19:27 -0800 2009 Switched Legislator.all_by_latitude_and_longitu... [technicalpickles]
directory spec/ Fri Apr 17 22:40:21 -0700 2009 Vendored graticule. Also switched setup to befo... [technicalpickles]
directory vendor/ Fri Apr 17 22:40:21 -0700 2009 Vendored graticule. Also switched setup to befo... [technicalpickles]
README.rdoc

daywalker

A Ruby wrapper for the Sunlight Labs API: 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-daywalker

Get an API key

Before starting you need to register for an API key: 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.all_by_zipcode('27511')

    pp Daywalker::District.unique_by_latitude_and_longitude(40.739157, -73.990929)

    pp Daywalker::District.unique_by_address('One City Hall Square, Boston, MA 02201')

    pp Daywalker::Legislator.all_by_zip('02201')

    pp Daywalker::Legislator.unique(:state => 'NY', :district => 4)

    pp Daywalker::Legislator.unique_by_state_and_district('NY', 4)

    pp Daywalker::Legislator.all(:state => 'NY', :title => :senator)

    pp Daywalker::Legislator.all_by_state_and_title('NY', :senator)

FAQ

Q:Why not use the existing gem, available at 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 © 2009 Josh Nichols. See LICENSE for details.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server