jnioche / carbonintensity-api

A simple Rust library to retrieve data from https://api.carbonintensity.org.uk/
Apache License 2.0
10 stars 1 forks source link

Handle date ranges of more than 13 days #3

Closed jnioche closed 11 months ago

jnioche commented 12 months ago

The CI API limits the range between the start and end dates to 14 days. An error is returned if a user provides a greater range. We could at least provide a utility function to return the list of maximum ranges for a given input so that the end users can call the methods themselves for each range.

Later on we could do these calls in parallel and return a unified output.