@idm-plugin/meteo2 0.2.2 → 0.2.3
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/dist/index.js +725 -491
- package/dist/index.umd.cjs +2 -2
- package/dist/openmeteo/src/index.d.ts +18 -7
- package/package.json +1 -1
|
@@ -43,18 +43,27 @@ export interface OMOptions {
|
|
|
43
43
|
meteo2?: boolean;
|
|
44
44
|
memberLength?: number;
|
|
45
45
|
}
|
|
46
|
-
export
|
|
46
|
+
export interface MeteoModel {
|
|
47
|
+
rank: number;
|
|
47
48
|
name: string;
|
|
49
|
+
alias?: string;
|
|
48
50
|
model: string;
|
|
51
|
+
disabled?: boolean;
|
|
49
52
|
provider: string;
|
|
50
53
|
country: string;
|
|
51
|
-
resolution:
|
|
54
|
+
resolution: number;
|
|
55
|
+
tips: string;
|
|
52
56
|
length: number;
|
|
53
57
|
frequency: number;
|
|
54
58
|
models: string[];
|
|
55
|
-
|
|
59
|
+
categories?: string;
|
|
60
|
+
variables: string;
|
|
61
|
+
}
|
|
62
|
+
export declare const WEATHER_MODELS: MeteoModel[];
|
|
63
|
+
export declare const MARINE_MODELS: MeteoModel[];
|
|
56
64
|
/**
|
|
57
65
|
* @see https://open-meteo.com/en/docs
|
|
66
|
+
* @see https://openmeteo.s3.amazonaws.com/index.html
|
|
58
67
|
*/
|
|
59
68
|
export declare class MeteoHelper2 {
|
|
60
69
|
private readonly apikey;
|
|
@@ -87,7 +96,7 @@ export declare class MeteoHelper2 {
|
|
|
87
96
|
* @param params
|
|
88
97
|
* @param options
|
|
89
98
|
*/
|
|
90
|
-
marineForecast(params: any, options?: OMOptions): Promise<any>;
|
|
99
|
+
marineForecast(params: any, options?: OMOptions): Promise<any[]>;
|
|
91
100
|
/**
|
|
92
101
|
* 解析请求数据
|
|
93
102
|
* @param rsps
|
|
@@ -96,8 +105,10 @@ export declare class MeteoHelper2 {
|
|
|
96
105
|
* @private
|
|
97
106
|
*/
|
|
98
107
|
private parseWeatherData;
|
|
99
|
-
private
|
|
108
|
+
private mergeSegments;
|
|
109
|
+
private mergeMarineData;
|
|
100
110
|
private pickForecastUrl;
|
|
111
|
+
private pickMarineModels;
|
|
101
112
|
/**
|
|
102
113
|
* 完善start_hour/end_hour 或者是forecast_days变量,二选一
|
|
103
114
|
* @param datetime 从指定时间开始,不指定时从当前时间开始
|
|
@@ -142,7 +153,7 @@ export declare class MeteoHelper2 {
|
|
|
142
153
|
*/
|
|
143
154
|
spotForecast(lat: number, lng: number, datetime: string | undefined, simplify?: boolean, withDaily?: boolean, withHourly?: boolean, options?: OMOptions): Promise<{
|
|
144
155
|
weather: any;
|
|
145
|
-
marine: any;
|
|
156
|
+
marine: any[];
|
|
146
157
|
}>;
|
|
147
158
|
/**
|
|
148
159
|
* 历史再分析数据
|
|
@@ -167,7 +178,7 @@ export declare class MeteoHelper2 {
|
|
|
167
178
|
*/
|
|
168
179
|
spotHistorical(lat: number, lng: number, startDate: string, endDate: string, withDaily?: boolean, withHourly?: boolean, withMarine?: boolean, options?: OMOptions): Promise<{
|
|
169
180
|
weather: any;
|
|
170
|
-
marine: any;
|
|
181
|
+
marine: any[] | undefined;
|
|
171
182
|
}>;
|
|
172
183
|
/**
|
|
173
184
|
* 季节预报数据
|