Skip to content

Sinatra microserve for the REPresent web application, built to parse the data from the ProPublica and News APIs and expose the necessary data to the REPresent application frontend. Remote group project.

Notifications You must be signed in to change notification settings

Turing-School-Projects/represent-sinatra

 
 

Repository files navigation

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

About

Sinatra microserve for the REPresent web application, built to parse the data from the ProPublica and News APIs and expose the necessary data to the REPresent application frontend. Remote group project.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%