Skip to content

Commit

Permalink
Display thumbnails via thumbnail api #5053
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-a-dunlap committed Oct 9, 2018
1 parent 5bf34ec commit db87186
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion doc/harvard_custom_homepage.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@
<script>
var firstSearch = "http://localhost:8080/api/search?q=*:*&type=dataverse&per_page=1000"; //&fq=dvCategory:(Journal%20OR%20Laboratory)
var secondSearch = "http://localhost:8080/api/search?q=*&type=dataset&per_page=6";
var thumbBaseURL = "http://localhost:8080/api/datasets/:persistentId/thumbnail" + "?persistentId=";
$.get(firstSearch, function(jData) {
jData.data.items.forEach(function(item){
secondSearch += "&subtree=" + item.identifier;
});
$.get(secondSearch, function(jData2) {
jData2.data.items.forEach(function(item){
document.write("<img src=\""+thumbBaseURL + item.global_id+"\" >");
document.write(item.name +"<br>");
});
document.write(JSON.stringify(jData2));


//document.write(JSON.stringify(jData2)+"<br>");
});
});

Expand Down

0 comments on commit db87186

Please sign in to comment.