@idm-plugin/meteo2 0.2.0 → 0.2.2

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.
@@ -17,14 +17,17 @@ export interface OMParams {
17
17
  forecast_days?: number;
18
18
  past_days?: number;
19
19
  forecast_hours?: number;
20
+ start_dates?: string[];
20
21
  start_date?: string;
21
22
  start_hour?: string;
23
+ end_dates?: string[];
22
24
  end_date?: string;
23
25
  end_hour?: string;
24
26
  cell_selection?: string;
25
- url?: string;
27
+ url?: string | string[];
26
28
  apikey?: string;
27
29
  fake?: boolean;
30
+ fakes?: boolean[];
28
31
  }
29
32
  /**
30
33
  * 请求参数
@@ -40,6 +43,16 @@ export interface OMOptions {
40
43
  meteo2?: boolean;
41
44
  memberLength?: number;
42
45
  }
46
+ export declare const WEATHER_MODELS: {
47
+ name: string;
48
+ model: string;
49
+ provider: string;
50
+ country: string;
51
+ resolution: string;
52
+ length: number;
53
+ frequency: number;
54
+ models: string[];
55
+ }[];
43
56
  /**
44
57
  * @see https://open-meteo.com/en/docs
45
58
  */
@@ -57,7 +70,7 @@ export declare class MeteoHelper2 {
57
70
  * @param params
58
71
  * @param options
59
72
  */
60
- weatherForecast(params: any, options?: OMOptions): Promise<any[]>;
73
+ weatherForecast(params: any, options?: OMOptions): Promise<any>;
61
74
  /**
62
75
  * 海洋数据
63
76
  *
@@ -74,7 +87,7 @@ export declare class MeteoHelper2 {
74
87
  * @param params
75
88
  * @param options
76
89
  */
77
- marineForecast(params: any, options?: OMOptions): Promise<any[]>;
90
+ marineForecast(params: any, options?: OMOptions): Promise<any>;
78
91
  /**
79
92
  * 解析请求数据
80
93
  * @param rsps
@@ -83,6 +96,8 @@ export declare class MeteoHelper2 {
83
96
  * @private
84
97
  */
85
98
  private parseWeatherData;
99
+ private mergeWeatherData;
100
+ private pickForecastUrl;
86
101
  /**
87
102
  * 完善start_hour/end_hour 或者是forecast_days变量,二选一
88
103
  * @param datetime 从指定时间开始,不指定时从当前时间开始
@@ -126,8 +141,8 @@ export declare class MeteoHelper2 {
126
141
  * @param options
127
142
  */
128
143
  spotForecast(lat: number, lng: number, datetime: string | undefined, simplify?: boolean, withDaily?: boolean, withHourly?: boolean, options?: OMOptions): Promise<{
129
- weather: any[];
130
- marine: any[];
144
+ weather: any;
145
+ marine: any;
131
146
  }>;
132
147
  /**
133
148
  * 历史再分析数据
@@ -150,9 +165,9 @@ export declare class MeteoHelper2 {
150
165
  * @param withMarine
151
166
  * @param options
152
167
  */
153
- spotHistorical(lat: number, lng: number, startDate: string, endDate: string, withMarine?: boolean, options?: OMOptions): Promise<{
154
- weather: any[];
155
- marine: any[] | undefined;
168
+ spotHistorical(lat: number, lng: number, startDate: string, endDate: string, withDaily?: boolean, withHourly?: boolean, withMarine?: boolean, options?: OMOptions): Promise<{
169
+ weather: any;
170
+ marine: any;
156
171
  }>;
157
172
  /**
158
173
  * 季节预报数据
@@ -166,7 +181,7 @@ export declare class MeteoHelper2 {
166
181
  * @param options
167
182
  */
168
183
  spotSeasonal(lat: number, lng: number, startDate: string, endDate: string | undefined, with6Hourly?: boolean, options?: OMOptions): Promise<{
169
- weather: any[];
184
+ weather: any;
170
185
  }>;
171
186
  /**
172
187
  * 气候态数据
@@ -189,6 +204,6 @@ export declare class MeteoHelper2 {
189
204
  * @param options
190
205
  */
191
206
  spotClimate(lat: number, lng: number, startDate: string, endDate: string | undefined, options?: OMOptions): Promise<{
192
- weather: any[];
207
+ weather: any;
193
208
  }>;
194
209
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@idm-plugin/meteo2",
3
3
  "private": false,
4
- "version": "0.2.0",
4
+ "version": "0.2.2",
5
5
  "description": "idm plugin for meteo2(open meteo)",
6
6
  "type": "module",
7
7
  "keywords": [