week 03 - day 02 - weather API - working with APIs
Closed this issue · 2 comments
ads6495 commented
Cloudy with a chance of Syntax Error
Using a popular weather API, Create a web site that allows a user to search for a location and gets that location's weather.
Objectives
- Practice working with an API
- Practice working with data that was structure by a third party
Requirements
- Using
openweathermap.org
, create a simple UI that allows a user to search for the current weather by zip code or city.
SIGN UP!
- Visit
openweathermap.org
and signup for an account - Visit
API Keys
in your dashboard - Copy your API key
- You can use the API key in any of the URLs by appending
appid=KEY
- Example: from the docs
https://api.openweathermap.org/data/2.5/weather?q=Tampa
becomeshttps://api.openweathermap.org/data/2.5/weather?q=Tampa&appid=cbb5b6537cd4a6eccd9aee04ffffffff
- NOTE: It will take about 10 to 30 minutes for your API key to be active
- Example: from the docs
Explorer Mode
- Create a simple HTML page that has a text box and a search
button
- Allow the user to type in a place, click the search button, and , using
openweathermap.org
, get the current weather for that location. - Display the weather to user by adding elements to the DOM.
- Allow the user to search by zip or city name.
Adventure Mode
- Using the HTML5 Geolocation API, search for the users current location when page loads.
- Store the Users last search and use it to search for the value on page load. HINT: localstorage
- remove the need for the search button and search when the user stops typing. HINT: use setTimeout and the change event. to track when the user stops typing.
Epic Mode
- Add a type a head using Google Places API
- Head back to Blackjack and use this as your API.
ads6495 commented
Your homework week 03 - day 02 - weather API - working with APIs was marked: Meets Expectations
“Great job!”
— via Jason L Perry