Skip to content

Commit 3238d7a

Browse files
committed
Added some examples...
1 parent 413a300 commit 3238d7a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

example.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
(async () => {
2+
const yr = require('./index')
3+
const lat = 59.2667259
4+
const lon = 10.4045301
5+
6+
const forecast = await yr.getForecast(lat, lon)
7+
console.log(JSON.stringify(forecast, null, 2))
8+
9+
const nowcast = await yr.getNowcast(lat, lon)
10+
console.log(JSON.stringify(nowcast, null, 2))
11+
12+
const textForecast = await yr.getTextForecast(lat, lon)
13+
console.log(JSON.stringify(textForecast, null, 2))
14+
})()

0 commit comments

Comments
 (0)