Skip to content

Commit

Permalink
Merge branch 'master' of github.com:opengovernment/govkit
Browse files Browse the repository at this point in the history
  • Loading branch information
saki committed May 13, 2010
2 parents c7ec80a + 973f0d3 commit 983114b
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 17 deletions.
20 changes: 11 additions & 9 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
Govkit
======
# Govkit

Govkit is a Ruby gem that provides simple access to open government APIs around the web.

Setup
=====
# Installation

From gemcutter:

gem install govkit

# Setup

Add govkit to your environment.rb or Gemfile

Run <code>./script/generate govkit</code> to copy a config file into <code>config/initializers/govkit.rb</code>. You will need to add your API keys to this config file.

Example
=======
# Example

[http://fiftystates-dev.sunlightlabs.com/](The Fifty States project) has a RESTful API for accessing data about state legislators, bills, votes, etc.

>> Govkit::FiftyStates::State.find_by_abbrev('CA')
>> Govkit::FiftyStates::State.find_by_abbreviation('CA')

(TODO: add usage examples...)

Bugs? Questions?
================
# Bugs? Questions?

Please join the [Govkit Google Group](http://groups.google.com/group/govkit), especially if you'd like to talk about a new feature and get announcements.

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.0.pre
0.0.1
20 changes: 14 additions & 6 deletions govkit.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

Gem::Specification.new do |s|
s.name = %q{govkit}
s.version = "0.0.0.pre"
s.version = "0.0.1"

s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Participatory Politics Foundation", "Srinivas Aki", "Carl Tashian"]
s.date = %q{2010-04-28}
s.date = %q{2010-05-10}
s.description = %q{Govkit lets you quickly get encapsulated Ruby objects for common open government APIs. We're starting with Sunlight's Fifty States API and the Project Vote Smart API.}
s.email = %q{carl@ppolitics.org}
s.extra_rdoc_files = [
Expand All @@ -24,18 +24,26 @@ Gem::Specification.new do |s|
"Rakefile",
"USAGE",
"VERSION",
"generators/govkit_generator.rb",
"generators/templates/govkit.rb",
"generators/govkit/govkit_generator.rb",
"generators/govkit/templates/govkit.rb",
"govkit.gemspec",
"lib/govkit.rb",
"lib/govkit/configuration.rb",
"lib/govkit/fifty_states.rb",
"rails/init.rb"
"rails/init.rb",
"spec/fifty_states_spec.rb",
"spec/spec.opts",
"spec/spec_helper.rb"
]
s.homepage = %q{http://github.com/opengovernment/govkit}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
s.rubygems_version = %q{1.3.6}
s.summary = %q{Simple access to open government APIs around the web}
s.test_files = [
"spec/fifty_states_spec.rb",
"spec/spec_helper.rb"
]

if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
Expand Down
9 changes: 8 additions & 1 deletion lib/govkit/fifty_states.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,14 @@ class Role < Base; end

class Action < Base; end

class Vote < Base; end
class Vote < Base
def self.find(vote_id)
response = get("/votes/#{vote_id}")
instantiate_record(response)
end
end

class Roll < Base; end

class Sponsor < Base; end

Expand Down

0 comments on commit 983114b

Please sign in to comment.