0.1.1 • Published 6 years ago
conditionjs v0.1.1
Condition.js
Weather module for Node.js
Usage
npm install conditionjs
const condition = require('conditionjs')
condition('San Francisco, CA, US', weather => {
console.log(weather)
})
Response
{ units:
{ distance: 'mi', pressure: 'in', speed: 'mph', temperature: 'F' },
location:
{ city: 'San Francisco', country: 'United States', region: 'CA' },
wind: { speed: '25', direction: '260', chill: '57' },
atmosphere:
{ humidity: '80',
pressure: '1011.0',
rising: '0',
visibility: '16.1' },
astronomy: { sunrise: '6:57 am', sunset: '7:7 pm' },
conditions:
{ temp: '60',
desc: 'Breezy',
date: 'Sat, 22 Sep 2018 03:00 PM PDT' },
forecast:
[ { code: '28',
date: '22 Sep 2018',
day: 'Sat',
high: '62',
low: '53',
text: 'Mostly Cloudy' },
{ code: '34',
date: '23 Sep 2018',
day: 'Sun',
high: '63',
low: '55',
text: 'Mostly Sunny' },
{ code: '34',
date: '24 Sep 2018',
day: 'Mon',
high: '69',
low: '54',
text: 'Mostly Sunny' },
{ code: '34',
date: '25 Sep 2018',
day: 'Tue',
high: '70',
low: '55',
text: 'Mostly Sunny' },
{ code: '30',
date: '26 Sep 2018',
day: 'Wed',
high: '70',
low: '56',
text: 'Partly Cloudy' },
{ code: '30',
date: '27 Sep 2018',
day: 'Thu',
high: '66',
low: '56',
text: 'Partly Cloudy' },
{ code: '28',
date: '28 Sep 2018',
day: 'Fri',
high: '65',
low: '55',
text: 'Mostly Cloudy' },
{ code: '30',
date: '29 Sep 2018',
day: 'Sat',
high: '65',
low: '56',
text: 'Partly Cloudy' },
{ code: '30',
date: '30 Sep 2018',
day: 'Sun',
high: '65',
low: '55',
text: 'Partly Cloudy' },
{ code: '30',
date: '01 Oct 2018',
day: 'Mon',
high: '63',
low: '55',
text: 'Partly Cloudy' } ] }