Omnibus is a hybrid web service/node module that provides a clean API for accessing data on activities of the US Congress.
- Using Omnibus
Omnibus is extremely versatile. It can be run as a standalone web service, incorporated as router into another Express app, or required as a node module and used through it's API directly. It can even run in the browser. Omnibus is in active development. If you'd like to see a specific endpoint added, open an issue, or better yet, a pull request.
Deploying as a web service
git clone https://github.com/omnibus-app/omnibuscd omnibus && npm startcurl -X GET localhost:3000/api/bills/113-hr2397
The web service includes optional support for a Redis cache that can be used to dramatically speed up the response time of repeated requests.
Requiring as a Node module
require() the module.
var omnibus = ;omnibus;
We haven't tested it in the browser extensively but it seems to work great with Browserify. Yep, it's both a deployable web service and a client-side library.
Using as an Express router
Finally, Omnibus provides access to its application router. This allows an existing Express application to incorporate the HTTP interface.
Omnibus was initially developed as a RESTful web service. A typical URL might look like this
// REST endpoint bills/:id/version // JS omnibus.bills(id).version(); // REST endpoint bills/search?q='searchString' // jS omnibus.bills().search('searchString');
All JS examples assume that Omnibus is available as
var omnibus = require( 'omnibus' ). All methods return promises - Omnibus uses Bluebird interally. The REST endpoints assume that the router is serving at
When deploying as a web service you should make them available under
The bills API supports methods/endpoints for amendments, general info, text search, subjects, versions, and votes.
The "id" associated with a given Congress is it's number. The current Congress is 113.
The "id" associated with a given month is the month in