Permalink
Browse files

Merge pull request #157 from anarchivist/use-dpla-url

Link to DPLA objects on DPLA instead of at provider - seems reasonable!
  • Loading branch information...
2 parents 7d89323 + 2861baa commit 3aa58413314446acd410aa8146e0bdc742215c12 @mialondon mialondon committed Feb 28, 2014
Showing with 5 additions and 2 deletions.
  1. +5 −2 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)

0 comments on commit 3aa5841

Please sign in to comment.