This commit is contained in:
2026-01-24 14:00:49 -03:00
parent 7a4d94fbc4
commit 275a7600a3
6 changed files with 108 additions and 1 deletions

7
src/clima.ts Executable file
View File

@@ -0,0 +1,7 @@
import { log } from "./logger.js"
export async function ubicacion(lugar: string, limit = '1') {
const response = await fetch(`${process.env.WEATHER_URL}/geo/1.0/direct?q=${lugar}&limit=${limit}&appid=${process.env.WEATHER_API_KEY}`)
log('GET', response.url, response.status)
return response
}