-
Notifications
You must be signed in to change notification settings - Fork 31
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
Re-Implement property value handling #75
Conversation
Replace the `LanguageMap` approach with static `getValue`/`getValues` methods that accept a single locale with `PropertyValue` that offers member methods that accept zero, one or more locales.
Hi @jbaiter |
Hey Ed, I'd love to, but I'm not sure how I could make the I just tried to make This works in principle, but the -- update: |
✔️ It should be backwards-compatible with the old API now, I sprinkled a few asserts on that throughout the test suite. |
Awesome. Happy to merge @stephenwf ? |
Looks great 👍 |
This PR re-implements the handling of "property values" to be closer to the IIIF Presentation API spec.
Previously this was implemented in the
LanguageMap
andLanguage
types, this PR replaces this with a singlePropertyValue
type.This is a breaking change, since it changes the public API.The implementation is backwards-compatible with the old
LanguageMap
/Language
API.Before/After samples:
New features of the API:
getValue
/getValues
: