Skip to content

Commit

Permalink
Merge pull request #10 from clach04/openweathermap_v3_onecallapi
Browse files Browse the repository at this point in the history
OpenWeathermap version 3.0 one call api mattrossman#71
  • Loading branch information
clach04 authored May 31, 2024
2 parents 825899c + a7ae4a2 commit dd13161
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pkjs/weather/openweathermap.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ OpenWeatherMapProvider.prototype.constructor = OpenWeatherMapProvider;
OpenWeatherMapProvider.prototype._super = WeatherProvider;

OpenWeatherMapProvider.prototype.withOwmResponse = function (lat, lon, callback) {
var url = 'https://api.openweathermap.org/data/2.5/onecall?appid=' + this.apiKey + '&lat=' + lat + '&lon=' + lon + '&units=imperial&exclude=alerts,minutely';
var url = 'https://api.openweathermap.org/data/3.0/onecall?appid=' + this.apiKey + '&lat=' + lat + '&lon=' + lon + '&units=imperial&exclude=alerts,minutely';
request(url, 'GET', function (response) {
var weatherData = JSON.parse(response);
console.log('Found timezone: ' + weatherData.timezone);
Expand Down Expand Up @@ -81,4 +81,4 @@ OpenWeatherMapProvider.prototype.withProviderData = function (lat, lon, callback
}).bind(this))
}

module.exports = OpenWeatherMapProvider;
module.exports = OpenWeatherMapProvider;

0 comments on commit dd13161

Please sign in to comment.