Skip to content

Releases: slimcdk/go-eloverblik

v1.3.0

Choose a tag to compare

@github-actions github-actions released this 13 Jul 08:41

This is a minor version, but it is not source-compatible for every consumer.
Nothing was removed, and ordinary call sites keep compiling; the exact breaks are
listed below so nobody has to discover them from a failing build. Several bug
fixes also change results for code that compiles unchanged — those are listed
too, because they are the ones most likely to surprise.

Breaking: code that no longer compiles

  • Client gained GetChargeLinksWithCharges, RefreshTokenClaims and
    DataAccessTokenClaims. Anything that implements Client, Customer or
    ThirdParty — typically a test double — must implement them as well. Code that
    only calls the interfaces is unaffected.
  • NewCustomer and NewThirdParty take functional options:
    func(string, ...Option). Existing calls such as NewCustomer(token) compile
    unchanged; assigning the constructor to a func(string) Customer variable no
    longer does.
  • ThirdPartyMeteringPoint is no longer comparable, because it now carries the
    child metering points the API returns. == on two values, or using one as a
    map key, no longer compiles.

Breaking: code that compiles but behaves differently

  • GetDatesFromPeriod now returns a half-open range: to is the start of the
    period that follows. The API reads dateTo as exclusive, so the old inclusive
    bound made yesterday fail outright (dateFrom == dateTo is rejected with
    error 30002) and made last_week, last_month and last_year silently drop
    their final day.
  • Requests that fail with 401, 429 or 503 now return an error. They previously
    returned an empty result and a nil error, so an expired token or a rate limit
    looked like "no data".
  • TimeSeries.Flatten() derives each point's interval from the period's
    resolution and steps by calendar unit. Day, Month and Year points, and any day
    containing a daylight saving transition, previously got wrong intervals — for
    some resolutions a zero-width one.
  • GetMeteringPoints(includeAll) now actually sends includeAll. It was sent as
    a path parameter to a path with no placeholder, so resty dropped it and the
    argument had no effect.

Added

  • --print-response-headers on the CLI and WithResponseHeaderOutput(w) in the
    library, printing the response status and headers of every API call. It is
    implemented as a transport wrapper, so it also works for the streamed exports.
  • WithRetry(count, maxWait) and WithoutRetry(). The client now retries 429 and
    503 with a backoff instead of failing on the API's rate limit.
  • ParseToken, TokenClaims and the token command, for reading the claims of a
    refresh or data access token. Claims are decoded, not verified.
  • GetChargeLinksWithCharges and the charge-links command. Note that the
    endpoint answers 404 on both the Customer and the ThirdParty API as of
    2026-07-13, although it is documented; the client is ready for the day it is
    deployed.
  • APIError, carrying the status code, the API's error code, and the traceId
    from the problem document, and unwrapping to the existing sentinel errors.
  • ErrorNoCprConsent (10007).
  • The response fields the API returns but the client silently dropped, across
    metering point details, contact addresses, charges and third party metering
    points.
  • The P1D, P1Y and PXD resolutions from the specification, accepted
    alongside the PT1D and PT1Y the live API actually sends.

Fixed

  • Error responses are parsed in both shapes the API answers with: an RFC 7807
    problem document and a bare JSON string such as "[20010] Relation not found".
    A 404 used to surface as could't connect to eloverblik: 404 with the
    traceId thrown away.
  • customer alive probed the ThirdParty host. A single command object was added
    to two cobra parents, and the last parent won.
  • Every request pins api-version: 1.0, so a future default version on the
    server cannot change the responses underneath the client.

CI

  • Releases are built by GoReleaser on a v* tag: five platforms, archives and
    checksums.
  • govulncheck and CodeQL run on every push and weekly; Dependabot now covers Go
    modules and GitHub Actions, not just the devcontainer.
  • The lint job could never have passed: version: latest installs golangci-lint
    v2, which rejects a v1 configuration. The configuration is migrated and the
    action and linter are pinned.

Changelog

Features

  • b2d6f16 feat: add --print-response-headers flag and WithResponseHeaderOutput option
  • cf13191 feat: add getchargelinkswithcharges, the last unimplemented endpoint
  • 6347736 feat: decode token claims, and a token command to read them
  • 56b92a4 feat: model the response fields the API returns but the client dropped

Bug fixes

  • 8c584a9 fix(deps): Bump github.com/go-resty/resty/v2 (#1)
  • 45dfe82 fix: handle every time series resolution and send includeAll as a query param
  • a79c05f fix: read both error body shapes the API answers with
  • 1cce5e2 fix: request periods as a half-open range, so no day is dropped or rejected
  • f06aa15 fix: surface API failures, retry rate limits, pin api-version, fix customer alive

Documentation

  • ded54e0 docs: add a changelog, and publish it as the release notes
  • 4e2bbe1 docs: rewrite the documentation around what the API actually does

CI

  • 4bdc449 ci(deps): Bump actions/cache from 4 to 6 (#4)
  • 4f7701b ci(deps): Bump actions/setup-go from 5 to 6 (#3)
  • 2551228 ci(deps): Bump github/codeql-action from 3 to 4 (#6)
  • 3bb046c ci(deps): Bump golangci/golangci-lint-action from 8 to 9 (#5)
  • 1fda2bd ci(deps): bump actions/checkout from 4 to 7 (#2)
  • 28ebd36 ci: drop the API drift workflow
  • f7390e2 ci: repair the lint job, which could not have passed
  • 6dbdd3f ci: ship real releases, watch the API for drift, scan for vulnerabilities

Install

Download the archive for your platform below, verify it against
checksums.txt, unpack it and put go-eloverblik on your PATH.

Or install with Go:

go install github.com/slimcdk/go-eloverblik@v1.3.0

relative time parsers and period specification

Choose a tag to compare

@slimcdk slimcdk released this 26 Feb 09:13

What's New

  • Relative date parsing for --from/--to flags: now, now-30d, now-4w, now-2m, now-1y
  • Predefined --period flag: yesterday, this_week, last_week, this_month, last_month, this_year, last_year
  • GetDatesFromPeriod() library helper for Go package consumers
  • All CLI commands now output consistent JSON (replaced gout with encoding/json)
  • Fixed errcheck lint errors on output.Write calls
  • Fixed test isolation issues with cobra flag state
  • Updated documentation for Go library and CLI usage

fix rename binary when running go install

Choose a tag to compare

@slimcdk slimcdk released this 25 Feb 21:40
v1.1.1

fix rename binary to elob

v1.0.1: fix: remove .github/README.md to use root README

Choose a tag to compare

@slimcdk slimcdk released this 11 Feb 00:35
Removed .github/README.md so GitHub displays the root README.md
on the repository main page instead.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

v1.0.0

Choose a tag to compare

@slimcdk slimcdk released this 10 Feb 23:33
updated wrapper with missing endpoints + added cli commands for those…

v0.0.4

Choose a tag to compare

@slimcdk slimcdk released this 04 Apr 09:51
cleanup