/** * @fileoverview Places API module. * @module meteo-lt-sdk/api/places */ import type { HttpClient } from '../client/http.js'; import type { PlaceSummary, PlaceDetails, PlaceForecastTypes, ForecastType } from '../types/places.js'; import type { Forecast } from '../types/forecasts.js'; /** * API module for place and forecast operations. * Provides methods to query places and retrieve weather forecasts. */ export declare class PlacesApi { private readonly http; constructor(http: HttpClient); /** * Gets a list of all places with weather forecast support. * * @returns Array of place summaries with codes, names, and coordinates * * @example * ```typescript * const places = await client.places.getAll(); * console.log(`Found ${places.length} places`); * places.forEach(p => console.log(`${p.name} (${p.code})`)); * ``` */ getAll(): Promise; /** * Gets detailed information for a specific place. * * @param code - Place code (e.g., 'vilnius', 'kaunas') * @returns Detailed place information including country name * @throws {MeteoNotFoundError} If the place code doesn't exist * * @example * ```typescript * const place = await client.places.get('vilnius'); * console.log(`${place.name}, ${place.country}`); * console.log(`Coords: ${place.coordinates.latitude}, ${place.coordinates.longitude}`); * ``` */ get(code: string): Promise; /** * Gets available forecast types for a place. * * @param code - Place code * @returns Place details and available forecast types * @throws {MeteoNotFoundError} If the place code doesn't exist * * @example * ```typescript * const info = await client.places.getForecastTypes('vilnius'); * info.forecastTypes.forEach(ft => { * console.log(`${ft.type}: ${ft.description}`); * }); * ``` */ getForecastTypes(code: string): Promise; /** * Gets weather forecast for a place. * * @param code - Place code * @param type - Forecast type (currently only 'long-term' is supported) * @returns Complete forecast with timestamps and weather data * @throws {MeteoNotFoundError} If the place code doesn't exist * * @example * ```typescript * const forecast = await client.places.getForecast('vilnius', 'long-term'); * console.log(`Forecast created: ${forecast.forecastCreationTimeUtc}`); * forecast.forecastTimestamps.forEach(ts => { * console.log(`${ts.forecastTimeUtc}: ${ts.airTemperature}°C, ${ts.conditionCode}`); * }); * ``` */ getForecast(code: string, type: ForecastType): Promise; } //# sourceMappingURL=places.d.ts.map