Mackenzie-Frey / sweater_weather

Sweater Weather utilizes API's to provide weather data endpoints.

Home Page:https://weather-for-sweaters.herokuapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README

Description

Sweater Weather is a 5-day, solo project during module three, of Turing School's Back-End Engineering Program.

Sweater Weather is a web application designed to consume and produce API's. The application utilizes Ruby on Rails, with a PostgrSQL database, to consume the Dark Sky API for weather, the Google Maps API for geocoding, and the Unsplash API for city images.

Wireframe of Sweater Weather

Getting Started

To run Sweater Weather on your local machine, navigate to the directory in which you would like the project to be located in, then execute the following commands:

$ git clone git@github.com:Mackenzie-Frey/sweater_weather.git
$ cd sweater_weather
$ bundle
$ rails g rspec:install
$ bundle exec figaro install

Setup your environment variables:

Sign Up for the following API's:

Add the following code snippet to your config/application.yml file. Make sure to insert the key/secret without the alligator clips ( < > ).

dark_sky_key: <insert>
google_maps_key: <insert>
unsplash_client_id: <insert>
unsplash_client_secret: <insert>
amypode_key: oscar_the_grouch

Running Tests

To run the test suite, execute the following command: rspec.

Deployment

To view Sweater Weather in development, execute the following command from the project directory: rails s. To view the application in a web browser, visit localhost:3000.

To view the application in production, from the project directory, execute the following commands:

$ createuser -s -r sweater_weather
$ RAILS_ENV=production rake db:{drop,create,migrate}
$ rake assets:precompile
$ rails s -e production

Available Endpoints

GET /api/v1/forecast?location=<location name ie denver,co>
GET /api/v1/backgrounds?location=<location name>
GET /api/v1/antipode?loc=hongkong
POST /api/v1/users, params: { email: example@email.com, password: password123, password_confirmation: password123 }
POST /api/v1/sessions, params: { email: example@email.com, password: password123 }
POST /api/v1/favorites, body: {"location": "Denver, CO", "api_key": "jgn983hy48thw9begh98h4539h4"}
GET /api/v1/favorites, body: {"api_key": "jgn983hy48thw9begh98h4539h4"}
DELETE /api/v1/favorites, body: {"location": "Denver, CO", "api_key": "jgn983hy48thw9begh98h4539h4"}

Tools

  • Fast JSON API
  • Dark Sky API
  • Google Maps API
  • Unsplash Image API
  • Postman
  • Faraday
  • Figaro
  • GitHub Projects
  • RSpec
  • Capybara
  • Pry
  • SimpleCov

Rubric/Project Description

[View the Project Description and Rubric]http://backend.turing.io/module3/projects/sweater_weather

Author

Mackenzie Frey

About

Sweater Weather utilizes API's to provide weather data endpoints.

https://weather-for-sweaters.herokuapp.com/


Languages

Language:Ruby 90.2%Language:HTML 7.5%Language:JavaScript 1.5%Language:CSS 0.9%