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

Improve V1 compatibility #16

Merged
merged 4 commits into from
Jan 9, 2024
Merged

Improve V1 compatibility #16

merged 4 commits into from
Jan 9, 2024

Conversation

hbruch
Copy link
Collaborator

@hbruch hbruch commented Dec 10, 2023

This PR makes some minor adaptations to prepare the api.parkendd.de server switch:

  • if total is unknown for a lot, the v1 api returns 0, as total is mandatory
  • if last_updated is unknown, we fall back to last_downloaded, as last_updated is mandatory
  • root (/) is redirected to api/, so current clients accessing api.parkendd.de will not break
  • /<city> requests are redirected to /api/<city>, so current clients accessing api.parkendd.de will not break
  • the page stats which is currently served at / is moved to /stats/
  • if no source_url is declared, public_url is returned, as source_url is mandatory.
  • free is only returned if known (Note: while this is conform to the schema, current v1 seems to return 0 if no data is availble, so this might break clients)

@hbruch hbruch requested a review from jklmnn December 10, 2023 15:09
@hbruch hbruch merged commit fdf1f4b into master Jan 9, 2024
3 checks passed
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.

2 participants