Skip to content

v0.2.1

Choose a tag to compare

@EetuPelkonen EetuPelkonen released this 03 Sep 12:35
· 7 commits to main since this release

Fixes a day's request count and closes the last unvalidated request path.

  • UsageDay.hits was always empty, so hits_on(date) reported no requests however many an account had made. A day in the monthly breakdown carries its total only under apis, with no top-level hits, and the client read the field that is never there. The count is now summed from apis, falls back to a top-level hits if one is present, and is None when neither is — never a misleading zero.
  • usage_month(month) interpolated the month into the request path without validation, so a caller could reach an arbitrary path on the API host with their own key attached. Only YYYY-MM is accepted now, matching how a location is already handled.

The test payloads for these endpoints are copies of real API responses; the hand-written ones they replace are what hid the first bug.