https://github.com/trickfilm400/primagas-api
NodeJS API for accessing data from primagas.de customer portal
https://github.com/trickfilm400/primagas-api
api gas nodejs nodejs-api nodejs-modules npm npm-module npm-package npm-registry primagas
Last synced: about 2 months ago
JSON representation
NodeJS API for accessing data from primagas.de customer portal
- Host: GitHub
- URL: https://github.com/trickfilm400/primagas-api
- Owner: Trickfilm400
- License: mit
- Created: 2022-03-12T14:38:05.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2026-02-22T10:43:04.000Z (3 months ago)
- Last Synced: 2026-03-19T02:47:01.272Z (3 months ago)
- Topics: api, gas, nodejs, nodejs-api, nodejs-modules, npm, npm-module, npm-package, npm-registry, primagas
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@trickfilm400/primagas-api
- Size: 96.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# primagas-api
This NPM package provides a full nodejs-api for the Primagas-Website to fetch data of your account, your gas tank and more.
~~Note: As of July 2023, there is a new customer portal, which is a complete rewrite of the old one. This script will currently not work with the new one and the old one is offline.~~
Some information about the new portal:
- OAuth2 Authorization URL: `https://depgprodaadb2c.b2clogin.com/depgprodaadb2c.onmicrosoft.com/b2c_1a_signinorsignup/oauth2/v2.0/authorize`
- OAuth2 Token URL: `https://depgprodaadb2c.b2clogin.com/depgprodaadb2c.onmicrosoft.com/b2c_1a_signinorsignup/oauth2/v2.0/token`
- OAuth2 Client ID: `15f4b687-8555-413c-bafd-acb38cff6837`
- OAuth2 redirect URL: `https://kunden.primagas.de/api/auth/callback/azureadb2c`
- OAuth2 flow uses PKCE with SHA256
- API Endpoint for tank data: `https://api.shvenergy.com/assets-api/v1/business-units/DE-PG/accounts//delivery-points/_T_1/assets/_T_1/readings?$filter=`
This NPM package provides a full nodejs-api for the Primagas-Website to fetch data of your account, our gas tank...
**Note:** Currently, not all API functions are implemented which are available of the [shvenergy-api](https://github.com/Trickfilm400/shvenergy-api)
## Usage
- Install NPM package from GitHub.
- Functions return a Promise
- For detailed information about the function return values, view the Typescript interface files in `/src/interfaces`
## Example
```typescript
import PrimaGasClient from "@trickfilm400/primagas-api";
const client = new PrimaGasClient<"timestamp">("", "", "", "timestamp");
client.tankDaten().then(console.log, console.error);
// client.rechnungsDaten().then(console.log, console.error);
// client.stammDaten().then(console.log, console.error);
```
© 2022-2024 Trickfilm400