This Go library calls the Eco2mix API from RTE and returns data about the French electricity grid
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Nicolas Massé 0524211935 doc 3 years ago
LICENSE initial commit 3 years ago
README.md doc 3 years ago
eco2mix.go initial commit 3 years ago
eco2mix_test.go initial commit 3 years ago
go.mod initial commit 3 years ago
go.sum initial commit 3 years ago

README.md

Ego2mix

This Go library calls the Eco2mix API from RTE and returns data about the French electricity grid.

Usage

package main

import (
	"fmt"

	ego2mix "github.com/nmasse-itix/ego2mix"
)

func main() {
	client := ego2mix.NewEco2mixClient("", nil)
	records, err := client.FetchNationalRealTimeData(1) // we want only the last result
	if err != nil {
		panic(err)
	}
	fmt.Printf("Intensité carbone à %s en France: %d gCO2eq / kWh\n", records[0].DateHeure, records[0].TauxCo2)
}