@idm-plugin/meteo2 0.2.1 → 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.
@@ -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,8 +43,27 @@ export interface OMOptions {
40
43
  meteo2?: boolean;
41
44
  memberLength?: number;
42
45
  }
46
+ export interface MeteoModel {
47
+ rank: number;
48
+ name: string;
49
+ alias?: string;
50
+ model: string;
51
+ disabled?: boolean;
52
+ provider: string;
53
+ country: string;
54
+ resolution: number;
55
+ tips: string;
56
+ length: number;
57
+ frequency: number;
58
+ models: string[];
59
+ categories?: string;
60
+ variables: string;
61
+ }
62
+ export declare const WEATHER_MODELS: MeteoModel[];
63
+ export declare const MARINE_MODELS: MeteoModel[];
43
64
  /**
44
65
  * @see https://open-meteo.com/en/docs
66
+ * @see https://openmeteo.s3.amazonaws.com/index.html
45
67
  */
46
68
  export declare class MeteoHelper2 {
47
69
  private readonly apikey;
@@ -57,7 +79,7 @@ export declare class MeteoHelper2 {
57
79
  * @param params
58
80
  * @param options
59
81
  */
60
- weatherForecast(params: any, options?: OMOptions): Promise<any[]>;
82
+ weatherForecast(params: any, options?: OMOptions): Promise<any>;
61
83
  /**
62
84
  * 海洋数据
63
85
  *
@@ -83,6 +105,10 @@ export declare class MeteoHelper2 {
83
105
  * @private
84
106
  */
85
107
  private parseWeatherData;
108
+ private mergeSegments;
109
+ private mergeMarineData;
110
+ private pickForecastUrl;
111
+ private pickMarineModels;
86
112
  /**
87
113
  * 完善start_hour/end_hour 或者是forecast_days变量,二选一
88
114
  * @param datetime 从指定时间开始,不指定时从当前时间开始
@@ -126,7 +152,7 @@ export declare class MeteoHelper2 {
126
152
  * @param options
127
153
  */
128
154
  spotForecast(lat: number, lng: number, datetime: string | undefined, simplify?: boolean, withDaily?: boolean, withHourly?: boolean, options?: OMOptions): Promise<{
129
- weather: any[];
155
+ weather: any;
130
156
  marine: any[];
131
157
  }>;
132
158
  /**
@@ -151,7 +177,7 @@ export declare class MeteoHelper2 {
151
177
  * @param options
152
178
  */
153
179
  spotHistorical(lat: number, lng: number, startDate: string, endDate: string, withDaily?: boolean, withHourly?: boolean, withMarine?: boolean, options?: OMOptions): Promise<{
154
- weather: any[];
180
+ weather: any;
155
181
  marine: any[] | undefined;
156
182
  }>;
157
183
  /**
@@ -166,7 +192,7 @@ export declare class MeteoHelper2 {
166
192
  * @param options
167
193
  */
168
194
  spotSeasonal(lat: number, lng: number, startDate: string, endDate: string | undefined, with6Hourly?: boolean, options?: OMOptions): Promise<{
169
- weather: any[];
195
+ weather: any;
170
196
  }>;
171
197
  /**
172
198
  * 气候态数据
@@ -189,6 +215,6 @@ export declare class MeteoHelper2 {
189
215
  * @param options
190
216
  */
191
217
  spotClimate(lat: number, lng: number, startDate: string, endDate: string | undefined, options?: OMOptions): Promise<{
192
- weather: any[];
218
+ weather: any;
193
219
  }>;
194
220
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@idm-plugin/meteo2",
3
3
  "private": false,
4
- "version": "0.2.1",
4
+ "version": "0.2.3",
5
5
  "description": "idm plugin for meteo2(open meteo)",
6
6
  "type": "module",
7
7
  "keywords": [