Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use v1 timezones API #315

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

chore: use v1 timezones API #315

wants to merge 1 commit into from

Conversation

toph-allen
Copy link
Collaborator

Intent

Use v1 timezones API.

Because this is a really simple switch, I took the opportunity to think about how to handle checking the server version before trying the old request.

Currently not ready. Right now the server version isn't cached in any way so it results in two requests every time, and is no better than just trying the new URL first.

There are a bunch of existing functions around checking the server version, but they grouped "version not available" with "old version", which is the opposite of what we need, so I did some light refactoring to treat "version not available" as NULL and preserve that. I don't know if I like this approach though; maybe better to just not touch those functions and write a version as a dynamic, cached property of the server object.

Fixes #300

Approach

Explain how you solved the problem and any tradeoffs.

If applicable:

  • Include guidance for reviewers (rewrites ..., start with ..., commit-by-commit, etc.).
  • Link to notes and discussions about this work.
  • Any relevant information about tests, automated or manual.

Checklist

  • Does this change update NEWS.md (referencing the connected issue if necessary)?
  • Does this change need documentation? Have you run `document()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

use /__api__/v1/timezones rather than /__api__/timezones (2024.09.0)
1 participant