@uniai-fe/ui-legacy 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -27,11 +27,12 @@ import {
|
|
|
27
27
|
* 기상청 API; base URL
|
|
28
28
|
* "본 저작물은 기상청에서 'OO년'작성하여 공공누리 제1유형으로 개방한 '저작물명(작성자:OOO)'을 이용하였으며, 해당 저작물은 '기상청 API허브(apihub.kma.go.kr)에서 무료로 다운받으실 수 있습니다."
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
|
|
31
|
+
const API_BASE = "https://apihub.kma.go.kr";
|
|
31
32
|
/**
|
|
32
33
|
* 기상청 API; 날씨정보 URL
|
|
33
34
|
*/
|
|
34
|
-
const API_WEATHER =
|
|
35
|
+
const API_WEATHER = "/typ02/openApi/VilageFcstInfoService_2.0";
|
|
35
36
|
|
|
36
37
|
const QUERY_URL = {
|
|
37
38
|
forecast: `${API_WEATHER}/getVilageFcst`,
|
|
@@ -70,16 +71,17 @@ const getWeatherParams = ({
|
|
|
70
71
|
* @method GET
|
|
71
72
|
*/
|
|
72
73
|
export const routeWeatherKoreaNow = async ({
|
|
73
|
-
domain,
|
|
74
|
+
domain = API_BASE,
|
|
74
75
|
authKey,
|
|
75
76
|
routeUrl,
|
|
76
77
|
searchParams,
|
|
77
78
|
}: {
|
|
78
|
-
domain: string;
|
|
79
79
|
authKey: string;
|
|
80
80
|
routeUrl: string;
|
|
81
81
|
searchParams: URLSearchParams;
|
|
82
|
-
}
|
|
82
|
+
} & Partial<{
|
|
83
|
+
domain: string;
|
|
84
|
+
}>): Promise<API_Res_WeatherKoreaNow> => {
|
|
83
85
|
const NOW_DATA: API_Res_WeatherKoreaToday = {
|
|
84
86
|
...API_RES_BASE,
|
|
85
87
|
temperature: null,
|
|
@@ -129,16 +131,17 @@ export const routeWeatherKoreaNow = async ({
|
|
|
129
131
|
* @method GET
|
|
130
132
|
*/
|
|
131
133
|
export const routeWeatherKoreaForecast = async ({
|
|
132
|
-
domain,
|
|
134
|
+
domain = API_BASE,
|
|
133
135
|
authKey,
|
|
134
136
|
routeUrl,
|
|
135
137
|
searchParams,
|
|
136
138
|
}: {
|
|
137
|
-
domain: string;
|
|
138
139
|
authKey: string;
|
|
139
140
|
routeUrl: string;
|
|
140
141
|
searchParams: URLSearchParams;
|
|
141
|
-
}
|
|
142
|
+
} & Partial<{
|
|
143
|
+
domain: string;
|
|
144
|
+
}>): Promise<API_Res_WeatherKoreaForecast> => {
|
|
142
145
|
const FORECAST_DATA: API_Res_WeatherKoreaNextDays = {
|
|
143
146
|
...API_RES_BASE,
|
|
144
147
|
max_temperature: null,
|