0.0.1 • Published 4 years ago
async-eancodeboek-client v0.0.1
async-eancodeboek-client
async/await Node.js Wrapper for EANCodeBoek API from Energie Data Services Nederland (EDSN)
Search MeteringPoints with the given search parameters and api-token.
To use this api you need to retrieve an api-token which is send by email after enrollment. You can Enroll here
Allowed parameter combinations:
- product + streetNumber + postalCode
- product + streetNumber + postalCode + streetNumberAddition
- product + city + specialMeteringPoint
- product + streetNumber + city + street
- product + streetNumber + city + street + streetNumberAddition
Definition specialMeteringPoint:
The business logic rules described below are used to determine whether a MeteringPoint can be considered ‘special’.
Based on the BAG-ID and whether a MeteringPoint is a primary or secondary allocationpoint, the specialMeteringPoint property will return either true or false when:
- BAG-ID = Not Empty -> specialMeteringPoint = False
- BAG-ID = Empty & MeteringPoint is a secondary allocationpoint -> specialMeteringPoint = False
- BAG-ID = Empty & MeteringPoint is not a secondary allocationpoint -> specialMeteringPoint = True
Paging:
- limit: the size of the page. Default is 100, max is 1000.
- offset: the record offset to use. Default is 0.
How to use this module
npm install async-eancodeboek-client
const eancodeboek = require('async-eancodeboek-client');
const apiKey = process.env.apiKey
async function main() {
const eancodeboekClient = new eancodeboek.Client(apiKey);
const data = {product: 'ELK', city: 'Rotterdam', specialMeteringPoint: 'true'};
console.log(await eancodeboekClient.search(data))
}
main().catch(
console.log
);
0.0.1
4 years ago