diff --git a/README.md b/README.md index 0531972..e0f06e5 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,10 @@ $settings['webform_strawberryfield.europeana_entity_apikey'] = 'thekey'; Save and clear caches. -In its current state the Europeana Entity API (Alpha 0.5) uses a static APIKEY (not the same as other APIs) and can be found at https://pro.europeana.eu/page/entity#suggest +In its current state the Europeana Entity API (Alpha 0.10.3) as of December 2021 uses a static APIKEY (not the same as other APIs) and can be requested at https://pro.europeana.eu/page/get-api -If using https://github.com/esmero/archipelago-deployment this is not needed and will be provided by the deployment. +If using https://github.com/esmero/archipelago-deployment this is not needed and a stub one be provided by the deployment. +Please read the Terms of Use: https://www.europeana.eu/en/rights/api-terms-of-use ## Help diff --git a/src/Controller/AuthAutocompleteController.php b/src/Controller/AuthAutocompleteController.php index d4c9011..6beeb69 100644 --- a/src/Controller/AuthAutocompleteController.php +++ b/src/Controller/AuthAutocompleteController.php @@ -682,6 +682,7 @@ protected function europeana($input, $vocab, string $apikey) { 'agent', 'concept', 'place', + 'timespan', ])) { // Drop before trying to hit non existing vocab $this->messenger()->addError( @@ -702,7 +703,7 @@ protected function europeana($input, $vocab, string $apikey) { $urlindex = "/suggest?text=" . $input . "&type=" . $vocab ."&wskey=". $apikey ; - $baseurl = 'https://www.europeana.eu/api/entities'; + $baseurl = 'https://api.europeana.eu/entity'; $remoteUrl = $baseurl . $urlindex; $options['headers'] = ['Accept' => 'application/ld+json']; $body = $this->getRemoteJsonData($remoteUrl, $options); @@ -720,8 +721,8 @@ protected function europeana($input, $vocab, string $apikey) { } ], "total": 10, - "type": "BasicContainer", - "contains": [ + "type": "ResultPage", + "items": [ { "type": "Agent" "id": "http://data.europeana.eu/agent/base/147466", @@ -735,7 +736,7 @@ protected function europeana($input, $vocab, string $apikey) { ] } */ - // @NOTE!: This is API V 0.5 Already ill documented and its changing. So review the API every 2-3 months + // @NOTE: This is Entities API is 0.10.3 (December 2021)and it might chang. So review the API every 6 months if (isset($jsondata['total']) && $jsondata['total'] >= 1 && isset($jsondata['items']) && is_array($jsondata['items'])) { foreach ($jsondata['items'] as $key => $result) { $desc = NULL;