From 9e4799625d1581c01e8c0012a33cef58363d38cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geir=20G=C3=A5sodden?= Date: Sun, 9 Oct 2022 09:26:30 +0200 Subject: [PATCH] d adds await to example in README (patch) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 88d9929..fb31a63 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ You'll need an access token from [Tibber](https://developer.tibber.com/) import getPriceInfo from '@alheimsins/tibber-get-price-info' const token = 'your-access-token' -console.log(getPriceInfo(token)) //=> [{"total": 2.563, "energy": 2.0424, "tax": 0.5206,"startsAt": "2022-05-07T00:00:00.000+02:00"}] +console.log(await getPriceInfo(token)) //=> [{"total": 2.563, "energy": 2.0424, "tax": 0.5206,"startsAt": "2022-05-07T00:00:00.000+02:00"}] ``` If you have multiple homes, you can use the `homeId` option to specify which home to use. If you don't specify a homeId, the first home will be used.