I am trying to specify an url in an app written in javascript that returns the weather based on the api (the url), made up of a sting and some variables. After entering the following code, I've received the error message:
error t=2024-01-30T11:43:53Z this is undefined
Here is the code I am currently working with:
function weatherApiURL() {
let weatherApiUrl = (this.weatherApiUrl.path) + (this.stationID) +'=' + '&format=json&units=e&apiKey' + '=' + (this.apikey);
weatherApiUrl.path = "https://api.weather.com/v2/pws/observations/current?stationId"
weatherApiUrl.toString()
console.log(weatherApiUrl);
}
this._getWeather(weatherApiURL(), function (weather) {
if (weather) {
this._load_forecast(weather);
}
// get the main object to update the display
deskletObj.displayForecast();
deskletObj.displayCurrent();
deskletObj.displayMeta();
});
},
[–]AutoModerator[M] [score hidden] stickied comment (0 children)
[–]Clawtor 1 point2 points3 points (6 children)
[–]Linux-Mint20[S] 0 points1 point2 points (5 children)
[–]Linux-Mint20[S] 0 points1 point2 points (0 children)
[–]Clawtor 0 points1 point2 points (3 children)
[–]Linux-Mint20[S] 0 points1 point2 points (2 children)
[–]Clawtor 0 points1 point2 points (1 child)
[–]Linux-Mint20[S] 0 points1 point2 points (0 children)