Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Link to DPLA objects on DPLA instead of at provider #157

Merged
merged 1 commit into from

2 participants

@anarchivist

Hi, I work for DPLA, and we'd prefer to direct traffic from Serendipomatic directly to the DPLA portal, as you've done with Europeana and Trove. Thanks, and let me know if you have any questions.

@mialondon mialondon merged commit 3aa5841 into chnm:master

1 check failed

Details default The Travis CI build could not complete due to an error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 2 deletions.
  1. +5 −2 smartstash/core/api.py
View
7 smartstash/core/api.py
@@ -54,6 +54,9 @@ def find_items(keywords):
if not doc.get('object', None):
continue
+ # url on DPLA site
+ item_url = '%sitem/%s' % (url, doc.get('id'))
+
i = DisplayItem(
title=src_res.get('title', None),
format=src_res.get('type', None),
@@ -65,8 +68,8 @@ def find_items(keywords):
# according to dpla docs, should be url preview for item
# docs reference a field for object mimetype, not seeing in results
- # url on provider's website with context
- url=doc.get('isShownAt', None)
+ # url on DPLA site
+ url=item_url
)
if 'date' in src_res:
i.date = src_res['date'].get('displayDate', None)
Something went wrong with that request. Please try again.