@oliverhodge2/weather-wrapper
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -7,6 +7,5 @@ import axios from 'axios' | ||
try { | ||
const currentWeatherObject = {} | ||
const charlie = await axios.get(`https://api.weather.gov/points/${latitude},${longitude}`) | ||
const delta = await axios.get(charlie.data.properties.forecast) | ||
for (let i = 0; i < delta.data.properties.periods.length; i++) { | ||
@@ -17,2 +16,4 @@ delete delta.data.properties.periods[i].number | ||
} | ||
const currentWeatherObject = {} | ||
@@ -22,2 +23,3 @@ currentWeatherObject.city = charlie.data.properties.relativeLocation.properties.city | ||
currentWeatherObject.periods = delta.data.properties.periods | ||
resolve(currentWeatherObject) | ||
@@ -24,0 +26,0 @@ } catch (e) { |
{ | ||
"name": "@oliverhodge2/weather-wrapper", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Lightweight wrapper for weather.gov APIs", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
1996