Created
August 29, 2010 23:05
-
-
Save tingletech/556793 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>CDL DSC API Demo</title> | |
<script> | |
var conf = { | |
url : 'http://dsc-api.cdlib.org/v0.01', // url to service | |
relation : 'http://bampfa.berkeley.edu/moac/' // default limits | |
key : 'API-KEY' | |
// search-fields: [ 'text' ] // default to XTF "keyword" | |
displayFields : [ "thumbnail", "title", "publisher", "date", "rights" ], // XTF fields | |
displayFacets : [ "date", "publisher" ] , | |
linkFields : { thumbnail: localPreview, // function to preview D.O. | |
title : "ARK", // title links to the ARK HTML view in XTF | |
publisher : "lookup", // lookup publisher URL in database (not in metadata) | |
rights : "internal" }, | |
pageSize : 25 | |
}; | |
</script> | |
</head> | |
<body> | |
<section> | |
<h1>CDL DSC API Demo</h1> | |
<form onSubmit="cdlDSC.doSearch('targetID', conf, this)"> | |
<input name="q"/> | |
<input type="submit" value="go"/> | |
</form><!-- add listner to existing form --> | |
<div id="targetID"> | |
search results will appear here | |
</div> | |
</section> | |
<script src="http://dsc-api.cdlib.org/js/api0.01.js"/> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment