Skip to content

Instantly share code, notes, and snippets.

@tingletech
Created August 29, 2010 23:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tingletech/556793 to your computer and use it in GitHub Desktop.
Save tingletech/556793 to your computer and use it in GitHub Desktop.
<!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