UNPKG

rui-weather-service-api

Version:

Weather API service with OpenWeatherMap integration - includes both standalone API and MCP server

133 lines 3 kB
export interface WeatherOptions { apiKey?: string; units?: 'metric' | 'imperial'; language?: string; maxRetries?: number; } export declare class WeatherService { private apiKey; private baseUrl; private units; private language; private maxRetries; constructor(options?: WeatherOptions); getCurrentWeather(city: string): Promise<{ location: { name: any; country: any; coordinates: { lat: any; lon: any; }; }; temperature: { current: any; feelsLike: any; min: any; max: any; }; weather: { main: any; description: any; icon: any; }; wind: { speed: any; direction: any; }; details: { humidity: any; pressure: any; visibility: number; sunrise: Date; sunset: Date; }; updatedAt: Date; raw: any; }>; getForecast(city: string, days?: number): Promise<{ city: { name: any; country: any; coordinates: { lat: any; lon: any; }; }; forecasts: any[]; raw: any; }>; formatCurrentWeather(weatherData: any): string; formatForecast(forecastData: any): string; } export declare function getCurrentWeather(city: string): Promise<string>; export declare const weatherService: WeatherService; export type { WeatherData, ForecastData }; interface WeatherData { location: { name: string; country: string; coordinates: { lat: number; lon: number; }; }; temperature: { current: number; feelsLike: number; min: number; max: number; }; weather: { main: string; description: string; icon: string; }; wind: { speed: number; direction: number; }; details: { humidity: number; pressure: number; visibility: number; sunrise: Date; sunset: Date; }; updatedAt: Date; raw: any; } interface ForecastData { city: { name: string; country: string; coordinates: { lat: number; lon: number; }; }; forecasts: Array<{ date: Date; temperature: { min: number; max: number; avg: number; }; weather: { main: string; description: string; icon: string; }; wind: { speed: number; direction: number; }; details: { humidity: number; pressure: number; }; hourlyForecasts: Array<any>; }>; raw: any; } //# sourceMappingURL=getWeather.d.ts.map