You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-5Lines changed: 17 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,11 +89,11 @@ console.log(weather);
89
89
90
90
One of the main benefits of this library is the ability to seamlessly switch between weather providers while maintaining a consistent API. This is particularly useful for:
91
91
92
-
• Fallback Mechanism: Use a free provider by default and fallback to a paid provider if necessary.
93
-
• Coverage: Some providers may not support certain locations; having multiple providers ensures broader coverage.
94
-
• Cost Optimization: Reduce costs by prioritizing free or cheaper providers.
92
+
-**Fallback Mechanism**: Use a free provider by default and fallback to a paid provider if necessary.
93
+
-**Coverage**: Some providers may not support certain locations; having multiple providers ensures broader coverage.
94
+
-**Cost Optimization**: Reduce costs by prioritizing free or cheaper providers.
95
95
96
-
Available Providers
96
+
#### Available Providers
97
97
98
98
- 'nws' - National Weather Service
99
99
- Notes:
@@ -325,10 +325,22 @@ interface IWeatherData {
325
325
unit:string; // Always "string"
326
326
original:string; // Original provider condition text
327
327
};
328
+
cloudiness: { // Percentage of cloud cover
329
+
value:number;
330
+
unit:string; // Always "percent"
331
+
};
332
+
sunrise: { // Available for some providers (e.g., OpenWeather)
333
+
value:string; // Sunrise time
334
+
unit:string; // Always "iso8601"
335
+
};
336
+
sunset: { // Available for some providers (e.g., OpenWeather)
337
+
value:string; // Sunset time
338
+
unit:string; // Always "iso8601"
339
+
};
328
340
}
329
341
```
330
342
331
-
Note today the response is fairly basic, but we're working on adding more data all of the time.
343
+
Note that the availability of specific data fields may vary depending on the weather provider being used. The library continues to expand with additional weather data over time.
0 commit comments