Skip to content

Latest commit

 

History

History
48 lines (32 loc) · 1.58 KB

File metadata and controls

48 lines (32 loc) · 1.58 KB

Represent Sinatra

This microservice works in companion with the REPresent application, providing a contact point to API services to gather information on United States representatives, senators, bills, votes and news articles.

Getting Started

  • Click "Fork" in the upper right hand corner of the page
  • Follow instructions below:
git clone git@github.com:YOUR_USER_NAME_HERE/represent-sinatra.git
cd represent-sinatra
- bundle install
- bundle update

Installing

To set up the service, you'll need API keys from Propublica and NewsAPI. In order to set up the API keys, you'll need to run:

bundle exec figaro install

Once it has successfully run, you'll need to access the config/application.yml file. Inside the file, post the two keys like so:

PROPUBLICA_API_KEY: <YOUR_KEY_HERE>
NEWS_API_KEY: <YOUR_KEY_HERE>

You should then be able to run the service locally using localhost:4567

Caution:

The '/bills' endpoint is very call-intensive on the Propublica API, because of the amount of data it collects. Use sparingly, as it is easy to rate-limit your API key with it. It will also take some time to run, thanks to the amount of calls.

Built With

  • Ruby
  • Sinatra

Authors