Skip to content

czapkee/vue-API-openweather-forecast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vue.js API OpenWeather forecast


Usage guide

  1. Change API keys in 'src/App.vue':
const geoResponse =  axios.get(`https://api.openweathermap.org/data/2.5/weather?q=${this.city}&units=metric&appid=API-KEY`) //Change API-KEY to your value
.then(res => (this.info = res.data))

const {lat, lon} = geoResponse.data[0]
const weatherResponse =  axios.get(`https://api.openweathermap.org/data/2.5/weather?lat=${lat}&lon=${lon}&units=metric&appid=API-KEY`) //Change API-KEY to your value

this.info = weatherResponse.data
  1. Run application via using:
npm run dev

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published