{"id":13858725,"url":"https://github.com/opengovernment/govkit","last_synced_at":"2025-07-14T01:31:40.600Z","repository":{"id":886385,"uuid":"634081","full_name":"opengovernment/govkit","owner":"opengovernment","description":"Ruby wrappers for open government APIs around the web","archived":false,"fork":false,"pushed_at":"2014-04-05T02:43:05.000Z","size":867,"stargazers_count":180,"open_issues_count":2,"forks_count":30,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-06-23T06:17:51.435Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opengovernment.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-04-28T19:48:56.000Z","updated_at":"2025-02-04T04:46:04.000Z","dependencies_parsed_at":"2022-08-16T11:20:27.832Z","dependency_job_id":null,"html_url":"https://github.com/opengovernment/govkit","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/opengovernment/govkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opengovernment%2Fgovkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opengovernment%2Fgovkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opengovernment%2Fgovkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opengovernment%2Fgovkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opengovernment","download_url":"https://codeload.github.com/opengovernment/govkit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opengovernment%2Fgovkit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265230958,"owners_count":23731489,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-05T03:02:18.878Z","updated_at":"2025-07-14T01:31:40.270Z","avatar_url":"https://github.com/opengovernment.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Govkit [![Build Status](https://secure.travis-ci.org/opengovernment/govkit.png)](http://travis-ci.org/opengovernment/govkit)\n\nGovkit is a Ruby gem that provides simple access to US open government APIs around the web, including:\n\n *  [OpenCongress](http://www.opencongress.org/api), which has an API for federal bills, votes, people, and news and blog coverage\n *  [The Open States project](http://fiftystates-dev.sunlightlabs.com/), which has a RESTful API for accessing data about state legislators, bills, votes, etc.\n *  [Project Vote Smart](http://www.votesmart.org/services_api.php), which has an API with congressional addresses, etc.\n *  [Follow The Money](http://www.followthemoney.org/), whose API reveals campaign contribution data for state officials.\n *  [TransparencyData API](http://transparencydata.com/api) (campaign contributions only)\n\n# Installation\n\nFrom gemcutter:\n\n    gem install govkit\n\n# Setup\n\nAdd govkit to your environment.rb or Gemfile\n\nRun \u003ccode\u003erails generate govkit\u003c/code\u003e (Rails 3.x) or \u003ccode\u003escript/generate govkit\u003c/code\u003e (Rails 2.x) to copy a config file into \u003ccode\u003econfig/initializers/govkit.rb\u003c/code\u003e. You will need to add your API keys to this config file.\n\nOutside of Rails you can configure your API keys like so:\n\n    \u003e\u003e GovKit.configure do |config|\n    \u003e\u003e   config.sunlight_apikey   = 'YOUR_SUNLIGHT_API_KEY'\n    \u003e\u003e   config.votesmart_apikey  = 'YOUR_VOTESMART_API_KEY'\n    \u003e\u003e   config.ftm_apikey        = 'YOUR_FTM_API_KEY'\n    \u003e\u003e end\n\n# Usage Examples\n\n    \u003e\u003e GovKit::OpenStates::State.find_by_abbreviation('CA')\n    \u003e\u003e GovKit::VoteSmart::Address.find(votesmart_candidate_id)\n    \u003e\u003e GovKit::OpenCongress::Bill.find(:number =\u003e 5479, :type =\u003e 'h', :congress =\u003e '111')\n\nObjects returned from GovKit will have attributes for each field coming back from the API:\n\n    \u003e\u003e x = GovKit::OpenStates::State.find_by_abbreviation('CA')\n    =\u003e #\u003cGovKit::OpenStates::State:0x00000100f6a5a8 @attributes={\"lower_chamber_title\"=\u003e\"Assemblymember\", \"lower_chamber_name\"=\u003e\"Assembly\", \"upper_chamber_title\"=\u003e\"Senator\", \"terms\"=\u003e[#\u003cGovKit::OpenStates::State::Term:0x00000100f2a8e0 @attributes={\"....\n    \u003e\u003e x.name\n    =\u003e \"California\"\n\nGovKit will raise GovKit::ResourceNotFound if a requested item isn't available.\n\n# Testing \u0026 Debugging\n\nFor debugging purposes, there's a raw_response reader provided for each object, which typically returns an HTTParty::Response object. To see the body of the HTTP response, you might look here:\n\n    (continuing the example from above)\n    \u003e\u003e x.raw_response.response.body\n    =\u003e \"{\\n    \\\"lower_chamber_title\\\": \\\"Assemblymember\\\", \\n    \\\"lower_chamber_name\\\": \\\"Assembly\\\", \\n  ....\n\n# Bugs? Questions?\n\nPlease 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.\n\n[Report a bug](https://participatorypolitics.lighthouseapp.com/projects/51485-govkit) on our Lighthouse page.\n\nGovkit's main repo is on Github: [http://github.com/opengovernment/govkit](http://github.com/opengovernment/govkit), where your contributions, forks, and feedback are greatly welcomed.\n\n# Dear Canadians\n\nFor Canadian open government data, our friends up north have created a [govkit-ca](https://github.com/opennorth/govkit-ca) gem that lives in the GovKit::CA namespace and should interoperate just fine with this gem.\n\n# A GovKit for your country?\n\nLet us know if you'd like to build a govkit for your region! We'd love to link to you. Your gem should be called, for example, govkit-uk (ISO 3166 country code), and your methods should live in the GovKit::GB namespace (for example).\n\nCopyright (c) 2010 Participatory Politics Foundation, released under the MIT license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopengovernment%2Fgovkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopengovernment%2Fgovkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopengovernment%2Fgovkit/lists"}