날씨 진행 중 세이브

This commit is contained in:
leeheejin
2025-10-23 12:31:14 +09:00
parent 8ab36f32a0
commit 8ec54b4e7d
8 changed files with 461 additions and 8 deletions

View File

@@ -15,6 +15,8 @@ import { apiClient } from './client';
export interface WeatherData {
city: string;
country: string;
lat?: number;
lng?: number;
temperature: number;
feelsLike: number;
humidity: number;
@@ -79,6 +81,15 @@ export async function getWeather(
return response.data.data;
}
/**
* 여러 도시의 날씨 정보 일괄 조회
* @param cities 도시명 배열
*/
export async function getMultipleWeather(cities: string[]): Promise<WeatherData[]> {
const promises = cities.map(city => getWeather(city));
return Promise.all(promises);
}
/**
* 환율 정보 조회
* @param base 기준 통화 (기본값: KRW)