Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nmasse-itix/ego2mix

This Go library calls the Eco2mix API from RTE and returns data about the French electricity grid
https://github.com/nmasse-itix/ego2mix

electricity-grid rte smartcity

Last synced: 3 days ago
JSON representation

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

Awesome Lists containing this project

README

        

# Ego2mix

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

## Usage

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