@idm-plugin/meteo2 0.2.2 → 0.2.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/dist/index.js +743 -491
- package/dist/index.umd.cjs +2 -2
- package/dist/openmeteo/src/index.d.ts +25 -12
- 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;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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[];
|
|
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;
|
|
@@ -64,6 +73,8 @@ export declare class MeteoHelper2 {
|
|
|
64
73
|
private readonly CLIMATE;
|
|
65
74
|
private readonly SEASONAL;
|
|
66
75
|
constructor(apikey: string, debug?: boolean);
|
|
76
|
+
standardWeatherModels(): Promise<MeteoModel[]>;
|
|
77
|
+
standardMarineModels(): Promise<MeteoModel[]>;
|
|
67
78
|
range(start: number, stop: number, step: number): number[];
|
|
68
79
|
/**
|
|
69
80
|
* 大气数据
|
|
@@ -87,7 +98,7 @@ export declare class MeteoHelper2 {
|
|
|
87
98
|
* @param params
|
|
88
99
|
* @param options
|
|
89
100
|
*/
|
|
90
|
-
marineForecast(params: any, options?: OMOptions): Promise<any>;
|
|
101
|
+
marineForecast(params: any, options?: OMOptions): Promise<any[]>;
|
|
91
102
|
/**
|
|
92
103
|
* 解析请求数据
|
|
93
104
|
* @param rsps
|
|
@@ -96,8 +107,10 @@ export declare class MeteoHelper2 {
|
|
|
96
107
|
* @private
|
|
97
108
|
*/
|
|
98
109
|
private parseWeatherData;
|
|
99
|
-
private
|
|
110
|
+
private mergeSegments;
|
|
111
|
+
private mergeMarineData;
|
|
100
112
|
private pickForecastUrl;
|
|
113
|
+
private pickMarineModels;
|
|
101
114
|
/**
|
|
102
115
|
* 完善start_hour/end_hour 或者是forecast_days变量,二选一
|
|
103
116
|
* @param datetime 从指定时间开始,不指定时从当前时间开始
|
|
@@ -142,7 +155,7 @@ export declare class MeteoHelper2 {
|
|
|
142
155
|
*/
|
|
143
156
|
spotForecast(lat: number, lng: number, datetime: string | undefined, simplify?: boolean, withDaily?: boolean, withHourly?: boolean, options?: OMOptions): Promise<{
|
|
144
157
|
weather: any;
|
|
145
|
-
marine: any;
|
|
158
|
+
marine: any[];
|
|
146
159
|
}>;
|
|
147
160
|
/**
|
|
148
161
|
* 历史再分析数据
|
|
@@ -167,7 +180,7 @@ export declare class MeteoHelper2 {
|
|
|
167
180
|
*/
|
|
168
181
|
spotHistorical(lat: number, lng: number, startDate: string, endDate: string, withDaily?: boolean, withHourly?: boolean, withMarine?: boolean, options?: OMOptions): Promise<{
|
|
169
182
|
weather: any;
|
|
170
|
-
marine: any;
|
|
183
|
+
marine: any[] | undefined;
|
|
171
184
|
}>;
|
|
172
185
|
/**
|
|
173
186
|
* 季节预报数据
|