Skip to content

Commit a21b2fc

Browse files
author
Robin Hansson
committed
improve doc
1 parent fe47e1e commit a21b2fc

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ import Enstoe, { BiddingZones } from "entsoe-api-node";
2222

2323
const client = Entsoe({ apiToken: "YOUR-SECURITY-TOKEN" });
2424

25-
const result = await client.dayAheadPrices({ biddingZone: BiddingZones.SW4 });
25+
const result = await client.dayAheadPrices({
26+
startDate: new Date().toISOString(),
27+
biddingZone: BiddingZones.SW4,
28+
});
2629
```
2730

2831
Require using commonjs.
@@ -47,7 +50,12 @@ Time is always expressed in UTC.
4750
Get the published prices for given bidding zone. The result is always returned as 24 hours, starting from midnight local time of the specified bidding zone.
4851

4952
```js
50-
console.log(await client.dayAheadPrices({ biddingZone: "10Y1001A1001A47J" }));
53+
console.log(
54+
await client.dayAheadPrices({
55+
startDate: new Date().toISOString(),
56+
biddingZone: "10Y1001A1001A47J",
57+
})
58+
);
5159
```
5260

5361
| Param | Type | Required | Default | Info |
@@ -130,7 +138,7 @@ console.log(await client.dayAheadPrices({ biddingZone: "10Y1001A1001A47J" }));
130138
Customize the result by passing a function to handle the XML response.
131139

132140
```js
133-
console.log(await client.dayAheadPrices({ startDate: new Date().toISOString(), biddingZone: "10Y1001A1001A47J" }, (xmlString) async => /* parse the `xmlString` and return some magic */));
141+
console.log(await client.dayAheadPrices({ biddingZone: "10Y1001A1001A47J" }, (xmlString) async => /* parse the `xmlString` and return some magic */));
134142
```
135143

136144
#### BiddingZones

0 commit comments

Comments
 (0)