Giter Site home page Giter Site logo

week-5-the-weather-iuliia-shevtsova's Introduction

Front End 1 Week 5 Assignment Directions

Now we can start using APIs to get information from others applications. Lets create a Weather app like this one.

this project consist on create an app that takes the name of any city via input and display the current weather and the weather for the next 7 days.

The main point of this project is learn how to get info from the API and handle multiple promises.

You will get the input value (city name) from the element with the 'id=city' in the index.html file.

Each time the user clicks the 'search' button the program has to get the city name from the input (validation is required) and make the API call. Write all the javascript code in 'weather.js' file.

You need to create an account in OpenWeather and then you will be able to get an API KEY how to start with OpenWeather API

OpenWeather has differents API calls. You can see all the options here

We are using two of those:

All right first things first. You are going to create a re-useful fetch function to get data form the API

The first API call (current weather data) is getting a response with the current weather for an specific city name (lets use the option By city name). The response also contains the latitude (lat) and longitude (lon) things that you will need for the next API call.

With the second API call (One call API) you will get the weather information for the next 7 days. You need to insert the latitude (lat) and longitude (lon) to the fetching url.

The final result will display:

City: city_name Country: country (abbreviation) Current Weather: current_weather and a table with the 7 days weather information

table contains: day , min temperature, max temperature and the icon of the weather

Insert the result into the div element wth the 'id=info' in the index.html

IMPORTANT

** If the program don't find a city should display an error saying "CITY NOT FOUND" **

Create issues on the link below on the parent repo if you are stuck and want to talk about it. You can paste code, tag people and refer to other issues there. Please use it! It will be helpful for mentors and future students to see where common problems are. Link here: https://github.com/Code-the-Dream-School/Front-End-1-Week-5-Assignment/issues

week-5-the-weather-iuliia-shevtsova's People

Contributors

hifilorau avatar iuliia-shevtsova avatar lorikhamala avatar mariandreamv avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.