Project

civic_info

0.0
No commit activity in last 3 years
No release in over 3 years
Wrapper to Google's civic info API
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

active_support
>= 0
>= 0
 Project Readme

Civic Info

Note: You MUST have a google API key, and it must be set in your environment as GOOGLE_API_KEY

gem install civic_info
> ci = CivicInfo.new
> ci.elections
=> {"kind"=>"civicinfo#electionsQueryResponse", "elections"=>[{"id"=>"2000", "name"=>"VIP Test Election", "
electionDay"=>"2013-06-06"}, {"id"=>"4000", "name"=>"U.S. 2012 General Election", 
"electionDay"=>"2012-11-06"}]}
> ci.voter_info(4000, '1263 Pacific Ave. Kansas City KS')
=> {
                "kind" => "civicinfo#voterInfoResponse",
              "status" => "success",
            "election" => {
                 "id" => "4000",
               "name" => "U.S. 2012 General Election",
        "electionDay" => "2012-11-06"
    },
     "normalizedInput" => {
        "line1" => "1263 Pacific Ave",
         "city" => "Kansas City",
        "state" => "KS",
          "zip" => "66102"
    },
    "pollingLocations" => [
        [0] {
                 "address" => {
.....