chec / cli

A command line interface for using the Chec API
https://chec.io
BSD 3-Clause "New" or "Revised" License
9 stars 7 forks source link

Update logs command to handle breaking pagination changes in "list logs" API #45

Closed robbieaverill closed 3 years ago

robbieaverill commented 3 years ago

Version 2021-06-02 will introduce breaking changes to the API that this command consumes, so this patch updates to handle it.

ScopeyNZ commented 3 years ago

We really should have updated this a while ago to specify a version in the request headers so it won't immediately break for people without updating. Can you specify the new version in the request for this PR please?

robbieaverill commented 3 years ago

Can you specify the new version in the request for this PR please?

New API keys will use the latest version, and older API keys will use the old version. I went for a simple "use the data key if it's there" approach instead of baking specific API key versions in. Happy to change if you don't like that approach though.

ScopeyNZ commented 3 years ago

I think we should specify 2021-06-02 in the request as we're relying on specifically that version for this to work properly.

robbieaverill commented 3 years ago

It makes sense to specify a version, I've raised a PR for that at #46