Skip to content

Commit

Permalink
Merge pull request #15 from open-weather-vision/v2.0.0
Browse files Browse the repository at this point in the history
v2.0.0 Release!
  • Loading branch information
harrydehix committed Jul 17, 2024
2 parents 0f76b46 + 2bc844b commit bdbe859
Show file tree
Hide file tree
Showing 176 changed files with 9,852 additions and 12,588 deletions.
8 changes: 0 additions & 8 deletions .eslintignore

This file was deleted.

13 changes: 0 additions & 13 deletions .eslintrc.js

This file was deleted.

20 changes: 20 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**"
],
"program": "${workspaceFolder}/dist/tests/test.js",
"outFiles": [
"${workspaceFolder}/**/*.js"
]
}
]
}
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ vantjs is a platform-independent javascript and typescript interface to the Davi
- Getting **hourly, daily, monthly** and **yearly highs and lows** (read more [here](https://open-weather-vision.github.io/vantjs/classes/structures.HighsAndLows.html))

```ts
const highsAndLows = await device.getHighsAndLows();
const highsAndLows = await station.getHighsAndLows();

console.log(
`Todays minimum temperature was ${highsAndLows.tempOut.day.low} °F!`
Expand All @@ -26,10 +26,10 @@ console.log(
// Output: The maximum rain rate in the current hour was 0.2 in/h!
```

- Getting **realtime weather data** (read more [here](https://open-weather-vision.github.io/vantjs/classes/structures.RichRealtimeData.html))
- Getting **realtime weather data** (read more [here](https://harrydehix.github.io/vantjs/classes/structures.DetailedRealtimeData.html))

```ts
const realtime = await device.getRichRealtimeData();
const realtime = await station.getDetailedRealtimeData();

console.log(`Currently it's ${realtime.tempOut} °F!`);
// Output: Currently it's 45.2 °F!
Expand All @@ -43,7 +43,7 @@ console.log(
- **Converting** the weather data automatically to the **desired units**

```ts
const device = await VantPro2Interface.create({
const station = await WeatherStation.connect({
units: {
temperature: "°C",
wind: "km/h",
Expand All @@ -53,12 +53,19 @@ const device = await VantPro2Interface.create({
....
});

const realtime = await device.getRichRealtimeData();
const realtime = await station.getDetailedRealtimeData();
console.log(`It's ${realtime.tempIn} °C`);
// Output: It's 23.1233 °C
```

- and more (read the [docs](https://open-weather-vision.github.io/vantjs/index.html)!)

- **Stable connection** management: On disconnect vantjs repeatedly tries to reconnect in the background, your application won't crash!


- and more (read the [docs](https://harrydehix.github.io/vantjs/index.html)!)




# Installation

Expand All @@ -73,4 +80,8 @@ Read a guide about realtime data containers [here](/guides/2-realtime-data-conta

# Documentation

Read the full documentation [here](https://open-weather-vision.github.io/vantjs/).
Read the full documentation [here](https://harrydehix.github.io/vantjs/).

# Community

This project is updated on demand. If you have discovered a bug or want to suggest a feature🚀, please create an issue [here](https://github.com/harrydehix/vantjs/issues/new/choose).
7 changes: 7 additions & 0 deletions docs/assets/highlight.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
--dark-hl-7: #D4D4D4;
--light-hl-8: #008000;
--dark-hl-8: #6A9955;
--light-hl-9: #098658;
--dark-hl-9: #B5CEA8;
--light-code-background: #FFFFFF;
--dark-code-background: #1E1E1E;
}
Expand All @@ -31,6 +33,7 @@
--hl-6: var(--light-hl-6);
--hl-7: var(--light-hl-7);
--hl-8: var(--light-hl-8);
--hl-9: var(--light-hl-9);
--code-background: var(--light-code-background);
} }

Expand All @@ -44,6 +47,7 @@
--hl-6: var(--dark-hl-6);
--hl-7: var(--dark-hl-7);
--hl-8: var(--dark-hl-8);
--hl-9: var(--dark-hl-9);
--code-background: var(--dark-code-background);
} }

Expand All @@ -57,6 +61,7 @@
--hl-6: var(--light-hl-6);
--hl-7: var(--light-hl-7);
--hl-8: var(--light-hl-8);
--hl-9: var(--light-hl-9);
--code-background: var(--light-code-background);
}

Expand All @@ -70,6 +75,7 @@
--hl-6: var(--dark-hl-6);
--hl-7: var(--dark-hl-7);
--hl-8: var(--dark-hl-8);
--hl-9: var(--dark-hl-9);
--code-background: var(--dark-code-background);
}

Expand All @@ -82,4 +88,5 @@
.hl-6 { color: var(--hl-6); }
.hl-7 { color: var(--hl-7); }
.hl-8 { color: var(--hl-8); }
.hl-9 { color: var(--hl-9); }
pre, code { background: var(--code-background); }
2 changes: 1 addition & 1 deletion docs/assets/navigation.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bdbe859

Please sign in to comment.