Skip to content

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

License

Notifications You must be signed in to change notification settings

nmasse-itix/ego2mix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)
}

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages