Skip to content

EDF API client reverse engineered for javascript

License

Notifications You must be signed in to change notification settings

dallegoet/edf-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

edf-api

EDF API client reverse engineered for javascript

⛔ [DEPRECATED] No longer works, the edf api has been modified.

NPM JavaScript Style Guide

Install

yarn add "@dallegoet/edf-api"

Usage

import { Client } from '@dallegoet/edf-api';
import moment from 'moment';

const client = new Client('email', 'password'); // from edf.fr

const begin = moment().startOf('month');
const end = moment();

client.getDailyElectricConsumptions(begin, end).then(console.log);

// output
{ dailyElecEnergies:
   [ { consumption: [Object],
       day: '2019-02-02',
       standingCharge: 0.368,
       totalCost: 2.8453,
       qualityIndicator: 1,
       consumptionStatus: 'normal' } ],
  monthlyElecEnergies:
   [ { month: '2019-02',
       beginDay: '2019-02-01',
       endDay: '2019-02-05',
       standingCharge: 0.368,
       totalCost: 2.8453,
       consumption: [Object] } ] }

License

MIT © dallegoet