Code Monkey home page Code Monkey logo

weather-vue's Introduction

weather-vue

API Calls

  • run node script.js to make the calls in the script • axios.get(${base_url}/weather?q=${city}&APPID=${API_key})
Weather in London,uk
{
  coord: { lon: -0.1257, lat: 51.5085 },
  weather: [
      {
      id: 803,
      main: 'Clouds',
      description: 'broken clouds',
      icon: '04n'
    }
  ],
  base: 'stations',
  main: {
    temp: 287.68,
    feels_like: 287.56,
    temp_min: 286.64,
    temp_max: 288.59,
    pressure: 1010,
    humidity: 91
  },
  visibility: 10000,
  wind: { speed: 4.63, deg: 120 },
  clouds: { all: 75 },
  dt: 1665949971,
  sys: {
    type: 2,
    id: 2075535,
    country: 'GB',
    sunrise: 1665901540,
    sunset: 1665939971
  },
  timezone: 3600,
  id: 2643743,
  name: 'London',
  cod: 200
}

• axios.get(${base_url}/forecast?q=${town}&APPID=${API_key})

Forecast in Dublin
{
  cod: '200',
  message: 0,
  cnt: 40,
  list: [
    {
      dt: 1665954000,
      main: [Object],
      weather: [Array],
      clouds: [Object],
      wind: [Object],
      visibility: 10000,
      pop: 0,
      sys: [Object],
      dt_txt: '2022-10-16 21:00:00'
    },
    {
      dt: 1665964800,
      main: [Object],
      weather: [Array],
      clouds: [Object],
      wind: [Object],
      visibility: 10000,
      pop: 0,
      sys: [Object],
      dt_txt: '2022-10-17 00:00:00'
    },
    .
    .
    .,
    {
      dt: 1666364400,
      main: [Object],
      weather: [Array],
      clouds: [Object],
      wind: [Object],
      visibility: 10000,
      pop: 0,
      sys: [Object],
      dt_txt: '2022-10-21 15:00:00'
    },
    {
      dt: 1666375200,
      main: [Object],
      weather: [Array],
      clouds: [Object],
      wind: [Object],
      visibility: 10000,
      pop: 0,
      sys: [Object],
      dt_txt: '2022-10-21 18:00:00'
    }
  ],
  city: {
    id: 5344157,
    name: 'Dublin',
    coord: { lat: 37.7021, lon: -121.9358 },
    country: 'US',
    population: 46036,
    timezone: -25200,
    sunrise: 1665929814,
    sunset: 1665970157
  }
}

weather-vue's People

Contributors

jonwk avatar desleehl avatar

Watchers

 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.