Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.
/ govtrack-elixir Public archive

Simple Elixir package for the govtrack.us API

License

Notifications You must be signed in to change notification settings

walterbm/govtrack-elixir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Govtrack

Build Status Hex.pm

⛔️ DEPRECATED ⛔️

The GovTrack API was shutdown in December 2016


An elixir wrapper for the govtrack.us API that provides programmatic access to information about the U.S. Congress.

Installation

Available through Hex, and can be installed by:

  1. Adding govtrack to your list of dependencies in mix.exs:
def deps do
  [{:govtrack, "~> 0.7.3"}]
end
  1. Ensuring govtrack is initialized before your main elixir application:
def application do
  [applications: [:govtrack]]
end

Usage

This Govtrack module is meant to be a simple wrapper for the official govtrack.us API. The module automatically parses the JSON response and provides a few sensible defaults to common queries.

Supported Endpoints:

Basic Usage

Govtrack.bills        #=> Fetch all bills, ordered by most recently updated

Govtrack.bill(12700)  #=> Fetch information about a specific bill

Querying

An optional query parameter can be passed to all the supported endpoints to narrow the results. The specific query strings are dictated by the govtrack API.

Govtrack.roles([current: true, state: "NY"])    #=> Fetch all representatives for the State of New York.

About

Simple Elixir package for the govtrack.us API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages