API for Sweater Weather
- responses are JSON API 1.0 Compliant
N/A Development only
- Clone this repository
- Run
rails db:create
- Run
rails db:migrate
- Run
rails db:seed
- Run
bundle install
- Run
rails s
to start up the local server
Add each of these to your application.yml
- Weather for a city:
GET /api/v1/forecast?location=denver,co
Content-Type: application/json
Accept: application/json
- Background image for a city:
GET /api/v1/backgrounds?location=denver,co
Content-Type: application/json
Accept: application/json
- Registration:
POST /api/v1/users
Content-Type: application/json
Accept: application/json
body:
{
"email": "[email protected]",
"password": "password",
"password_confirmation": "password"
}
- Login:
POST /api/v1/sessions
Content-Type: application/json
Accept: application/json
body:
{
"email": "[email protected]",
"password": "password"
}
- Road Trip:
POST /api/v1/road_trip
Content-Type: application/json
Accept: application/json
body:
{
"origin": "Denver,CO",
"destination": "Pueblo,CO",
"api_key": "jgn983hy48thw9begh98h4539h4"
}
- Run
bundle exec rspec