Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 3aa58413314446acd410aa8146e0bdc742215c12 2 parents 7d89323 + 2861baa
@mialondon mialondon authored
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)
Please sign in to comment.
Something went wrong with that request. Please try again.