Skip to content

Repository files navigation

Renault API

Resources url and models to use the Renault API

github cinpm versionlicense

Get everything you need to use the Renault API into a TypeScript/JavaScript project.

Installation

npm install @remscodes/renault-api

Usage

Use GigyaApi or KamereonApi properties to get the url you want.

Each property has its own JSDoc to describe what the corresponding request needs to work.

Examples :

import{GigyaApi,LoginInfoResponse}from'@remscodes/renault-api';consturl=newURL(GigyaApi.LOGIN_URL);url.searchParams.set('apikey',GigyaApi.KEY);url.searchParams.set('loginID','my-renault-login');url.searchParams.set('password','my-renault-password');constresponse: LoginInfoResponse=awaitfetch(url,{method: 'POST'}).then(r=>r.json());const{ cookieValue }=response.sessionInfo;
import{BatteryStatusResponse,KamereonApi}from'@remscodes/renault-api';constaccountId='a1b2c3d4-xxxxxxxx';constvin='VF1XXXXXXXXXXX';consturl=newURL(KamereonApi.READ_BATTERY_STATUS_URL(accountId,vin));url.searchParams.set('country','FR');constheaders={apikey: KamereonApi.KEY,'x-gigya-id_token': 'my-token',};constresponse: BatteryStatusResponse=awaitfetch(url,{method: 'GET', headers }).then(r=>r.json());const{ batteryLevel, batteryTemperature }=response.data.attributes;

Disclaimer

This project is not affiliated with, endorsed by, or connected to Renault. I accept no responsibility for any consequences, intentional or accidental, resulting from interaction with the Renault's API using this project.

Credit

Resources API based on Renault API (hacf-fr) and PyZE (jamesremuscat).

License

MIT © Rémy Abitbol.

About

Resources url and models to use the Renault API

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages