init
This commit is contained in:
7
src/clima.ts
Executable file
7
src/clima.ts
Executable 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
|
||||
}
|
||||
Reference in New Issue
Block a user