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

ISSUE-122: Europeana Entity Suggest Webform element and Controller + cache #123

Merged
merged 4 commits into from
Jul 23, 2021

Conversation

DiegoPino
Copy link
Member

What? Europeana?

See #122

Europeana Accepts types: agent, place, concept.

Requires: an api key set inside settings.php. For now Europeana (Alpha 0.5 V) has a single one for everyone but this can change.

IMPROTANT: To test put this:

$settings['webform_strawberryfield.europeana_entity_apikey'] = 'apidemo';

In your settings.php. If not the controller will not query and a message to the user (somewhere when the user is in the Page and not in the controller url of course)

The API is quite unstable and may change in the future so I see this as experimental. Actually the DOCS are not 1:1 with the API response anyways..

Also updates README.md and.. wait for it.

Caches queries/responses for a week. This should give some LoD endpoints some peace of mind and helps with repeating responses. Caches are dependent on the user and 500 codes, 401 and 404 codes are not cached. We may want to add somewhere a "clear all caches just for this" but for now it seems to work ok.

@giancarlobi @alliomeria should we have a "bypass" cache flag? Like for admins?
AGAIN: can only be tested if you add the settings

Test: http://localhost:8001/webform_strawberry/auth_autocomplete/europeana/concept/thing/?q=techno

And implemented in a webform

Screen Shot 2021-05-31 at 5 01 59 PM

…nses

Europeana Accepts types: agent, place, concept.

Requires: an api key set inside settings.php. For now Europeana (Alpha 0.5 V) has a single one for everyone but this can change.

To test put this:

$settings['webform_strawberryfield.europeana_entity_apikey'] = 'apidemo';
In your settings.php. If not the controller will add a message to the user (somewhere)

Also updates README.md AND!

Caches responses for a week! This should give some LoD endpoints some peace of mind. Caches are dependent on the user and 500 codes, 401 and 404 codes are not cached.
@DiegoPino DiegoPino self-assigned this May 31, 2021
@DiegoPino DiegoPino added enhancement New feature or request External API Things we do not control but we depend on question Further information is requested UI/UX The thing people do when in front of a screen Webform Elements Things with input to fill and interact with while ingesting metadata labels May 31, 2021
@DiegoPino DiegoPino added this to the 1.0.0-RC3 milestone May 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request External API Things we do not control but we depend on question Further information is requested UI/UX The thing people do when in front of a screen Webform Elements Things with input to fill and interact with while ingesting metadata
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant