Project Files
dist / weather.d.ts
/**
* Tiny wttr.in client. No API key, no deps, no JS rendering needed.
*
* wttr.in returns plain text when called with `?format=…` or `?T` (terminal).
* We use the "j1" JSON endpoint for structure, then format a compact text
* summary so the model gets clean, low-token output.
*/
export interface WeatherOptions {
userAgent: string;
timeoutMs: number;
units?: "metric" | "imperial";
lang?: string;
}
export interface WeatherResult {
location: string;
resolved_location?: string;
current: {
description: string;
temperature: string;
feels_like: string;
humidity: string;
wind: string;
observed_local_time?: string;
};
forecast: Array<{
date: string;
summary: string;
min: string;
max: string;
sunrise?: string;
sunset?: string;
}>;
source: string;
source_url: string;
}
export declare function getWeather(location: string, opts: WeatherOptions): Promise<WeatherResult | {
error: string;
source: string;
source_url: string;
}>;
//# sourceMappingURL=weather.d.ts.map