Skip to content

v0.2.0

Latest
Compare
Choose a tag to compare
@markus-k markus-k released this 20 Oct 18:30
· 1 commit to main since this release

This release revamps most of the existing API, hopefully for the better. This sadly also means that the API is almost completely incompatible to the previous v0.1.0 release. Migration should be fairly straight forward though.

query_prices and query_prices_now have been deprecated and replaced by the new struct PriceData, which queries data from the API and provides some convenience methods like min_price and max_price for working with the returned data. This struct is also time-zone aware, so it's easier to work with the price slots in the correct time zones.

FIelds on PriceSlot are now private and data is accessed via methods with the same name. price_cents_per_kwh() -> i32 has been removed, as the rounding error introduced with this method is way to big for practical uses.