2.5.3
Sweater Weather is a Rails base API service. It provides information to an imaginary front end team across many endpoints.
https://sweater-weather-api-rc.herokuapp.com/
git clone [email protected]:cmpprg/sweater_weather_api.git
- run
bundle install
,
-
/api/v1/forecast?location=city,state
- returns weather information for the location
-
/api/v1/backgrounds?location=city,state
- returns an appropriate image from Unsplash based on location
-
/api/v1/users
- pass json in body of request:
{ email: _user@example_, password: _value_, password_confirmation: _value_ }
- creates users and returns information including email and api-key
-
/api/v1/sessions (returns api-key)
- pass json in body of request:
{ email: _user@example_, password: _value_ }
- returns api-key of user
-
/api/v1/road_trip
- pass json in body of request:
{ origin: _city,state_, destination: _city,state_, api-key: _valid api-key_ }
- returns travel time and forecast of destination upon arrival.
- PostgreSQL
rails db:{create,migrate}
for setup
- Testing with RSpec
bundle exec rspec
to run all testsbundle exec rspec _filepath_
to run individual specs
- Google API:
- Directions
- Geocode
- OpenWeather API
- OneCall
- Unsplash API