This project is accompanied by https://github.com/noahaklem/weather-watcher-frontend
Weather Watch is a backend RESTful api that make calls to two external apis. The api responds to the following endpoints:
- get api/v1/forecasts
- post api/v1/forecasts
- get api/v1/users
- post api/v1/users
- post '/login'
- post '/signup'
The external api's called are :
- OpenWeather:
This api retrieves weather information any location across the globe. Most api's are paid on requests.
- MapQuestApi:
This is a geocoding api for any location across the globe. Most api's are paid on requests.
** These apis require keys to work. This project makes use of, and walks through, a .env file that stores these keys but is not included in your download. You will need to sign up and retrieve api keys in order for this application to work. How you choose to plug these api keys into your fetch calls, is up to you.
In the command line run the following:
$ bundle install
$ rails db:migrate
- Create a .env in the root folder of the project
- Navigate to the folder
- Add your api keys with the following format: 'COORD_API_KEY'='your api key here' 'WEATHER_API_KEY'='your api key here'
- Add your .env file to your gitignore
- You can now access your keys anywhere in your code with ENV['NAME_OF_KEY']