https://github.com/abn/node-vattenfall-europe-sales-api
Typescript client for the Vattenfall Europe Sales GmbH Service API
https://github.com/abn/node-vattenfall-europe-sales-api
Last synced: 4 months ago
JSON representation
Typescript client for the Vattenfall Europe Sales GmbH Service API
- Host: GitHub
- URL: https://github.com/abn/node-vattenfall-europe-sales-api
- Owner: abn
- License: mit
- Created: 2024-11-03T19:42:35.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-24T07:34:58.000Z (about 1 year ago)
- Last Synced: 2025-12-13T03:46:49.688Z (6 months ago)
- Language: TypeScript
- Size: 543 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Vattenfall Europe Sales GmbH API Client
This is a node client libary written in Typescript, which provides methods to interact with the Vattenfall Europe Sales GmbH service's API.
## Installation
```bash
# using npm
npm install vattenfall-europe-sales-api
# using pnpm
pnpm add vattenfall-europe-sales-api
```
## Example Usage
```typescript
import { VattenfallService, VattenfallServiceHelpers } from "vattenfall-europe-sales-api";
async function displayMeterReadings() {
const service = new VattenfallService("your-username", "your-password");
try {
const contract_ids = VattenfallServiceHelpers.getContractIDs(await service.getContractList());
for (const contract_id of contract_ids) {
console.log(`Meter readings for contract ${contract_id}:`);
const meter_readings = VattenfallServiceHelpers.mapMeterReadings(
await service.getMeterReadings(contract_id),
);
console.log(meter_readings);
}
} catch (e) {
await service.logOut();
throw e;
}
}
```