Module 4 | Contributors: Autumn Martin
Powder Keg finds the ski resort with the most ideal conditions for a great powder day! This API provides weather data (snowfall, wind, sunshine, etc.) specific to Colorado ski resorts to help skiers and snowboarders plan their trip to the mountain. It also provides awesome pics of skiers & snowboarders to get users in the zone.
PowderKeg is deployed here.
PowderKeg is an API which consumes weather data from DarkSky and World Weather Online. PowderKeg is deployed here, and you are looking at its source repository here. PowderKeg is consumed by my other app, Ski Meow. Ski Meow is a JavaScript single page app that displays weather data for local Ski Resorts. PowderKeg also consumes data from Unsplash, which Ski Meow uses to feature a random image for the background.
Rails 5.2.1, Ruby 2.5.1, RSpec, PostgreSQL, Faraday
Request:
GET /api/v1/images?query=ski,snowboard
Content-Type: application/json
Accept: application/json
Request:
GET /api/v1/snowcast?location=crested_butte
Content-Type: application/json
Accept: application/json
Request:
POST /api/v1/users
Content-Type: application/json
Accept: application/json
{
"email": "[email protected]",
"password": "password"
"password_confirmation": "password"
}
Response:
status: 201
body:
{
"api_key": "asd8987dfajskdl238j23h",
}
Request:
POST /api/v1/sessions
Content-Type: application/json
Accept: application/json
{
"email": "[email protected]",
"password": "password"
}
Response:
status: 200
body:
{
"api_key": "uio1423dfaj234l238j45z",
}
This app has been deployed to Heroku. It may be viewed in production here: https://powderkeg.herokuapp.com/
First, clone this repository via git clone [email protected]:Autumn-Martin/powderkeg.git
.
Run rails g figaro
to create a application.yml file to hold your API keys that will be gitignored. You will need API keys from DarkSky, World Weather Service, & Unplash.
You will also need the Rails application's secret key (Rails.application.credentials.secret_key_base
). More info about this here
Install the required gems for this application using Bundler. Run bundle
in the CLI.
Run rake db:setup
to create the database, build tables and columns based the schema, & seed the data.
Start a server with rails s
.
Now view the app locally in development by visiting http://localhost:3000/
in your browser.
The test suite is created through RSpec. To run this test suite, run rspec
. Currently, this repo maintains 100% test coverage.