|
@@ -38,7 +38,14 @@ exports.handler = async (event, context) => {
|
|
|
|
|
|
const bot = new BotClima(mastodon, weather);
|
|
|
const data = await bot.getCurrentWeather();
|
|
|
- const message = `La temperatura actual en ${process.env.OPENWEATHERAPI_CITY} es: ${data.weather.temp.cur}\u00B0C`;
|
|
|
+ console.log('Data', data );
|
|
|
+ const message = `
|
|
|
+ El reporte del clima en ${process.env.OPENWEATHERAPI_CITY} es:\n
|
|
|
+ La temperatura actual es de ${data.weather.temp.cur}\u00B0C
|
|
|
+ La humedad es del ${data.weather.humidity}%
|
|
|
+ Vientos de ${data.weather.wind.speed} m/s
|
|
|
+ Condición ${data.weather.description.charAt(0).toUpperCase() + data.weather.description.slice(1)}\n ${data.weather.icon.url}
|
|
|
+ `;
|
|
|
await bot.post(message);
|
|
|
const response = { statusCode: 200, body: JSON.stringify(message) };
|
|
|
return response;
|