2020-01-17 22:53:14 -06:00
|
|
|
const _ = require("lodash");
|
2019-09-13 13:53:15 +02:00
|
|
|
|
2021-06-30 15:13:15 +02:00
|
|
|
/**
|
|
|
|
* @param extendedData
|
|
|
|
*/
|
2019-09-13 13:53:15 +02:00
|
|
|
function generateWeather(extendedData = {}) {
|
2020-05-11 22:22:32 +02:00
|
|
|
return JSON.stringify(
|
|
|
|
_.merge(
|
|
|
|
{},
|
2020-01-17 22:53:14 -06:00
|
|
|
{
|
2020-05-11 22:22:32 +02:00
|
|
|
coord: {
|
|
|
|
lon: 11.58,
|
|
|
|
lat: 48.14
|
|
|
|
},
|
|
|
|
weather: [
|
|
|
|
{
|
|
|
|
id: 615,
|
|
|
|
main: "Snow",
|
|
|
|
description: "light rain and snow",
|
|
|
|
icon: "13d"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 500,
|
|
|
|
main: "Rain",
|
|
|
|
description: "light rain",
|
|
|
|
icon: "10d"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
base: "stations",
|
|
|
|
main: {
|
|
|
|
temp: 1.49,
|
|
|
|
pressure: 1005,
|
|
|
|
humidity: 93.7,
|
|
|
|
temp_min: 1,
|
|
|
|
temp_max: 2
|
|
|
|
},
|
|
|
|
visibility: 7000,
|
|
|
|
wind: {
|
|
|
|
speed: 11.8,
|
|
|
|
deg: 250
|
|
|
|
},
|
|
|
|
clouds: {
|
|
|
|
all: 75
|
|
|
|
},
|
|
|
|
dt: 1547387400,
|
|
|
|
sys: {
|
|
|
|
type: 1,
|
|
|
|
id: 1267,
|
|
|
|
message: 0.0031,
|
|
|
|
country: "DE",
|
|
|
|
sunrise: 1547362817,
|
|
|
|
sunset: 1547394301
|
|
|
|
},
|
|
|
|
id: 2867714,
|
|
|
|
name: "Munich",
|
|
|
|
cod: 200
|
2020-01-17 22:53:14 -06:00
|
|
|
},
|
2020-05-11 22:22:32 +02:00
|
|
|
extendedData
|
|
|
|
)
|
|
|
|
);
|
2019-09-13 13:53:15 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = generateWeather;
|