zotero web API demo

list-editing
Fabien Benetou 1 month ago
parent c279afaa22
commit cf71940aa1
  1. 13
      index.html

@ -31,6 +31,8 @@
<!-- still experimenting, see webdav.html --> <!-- still experimenting, see webdav.html -->
<script src='dependencies/webdav.js'></script> <script src='dependencies/webdav.js'></script>
<script src='jxr.js?123456'></script> <script src='jxr.js?123456'></script>
<script src="https://unpkg.com/zotero-api-client"></script>
<!-- replacing with local copies as CDNs are like unpkg tend to be slow <!-- replacing with local copies as CDNs are like unpkg tend to be slow
<script type="module" src="https://unpkg.com/immers-client/dist/destination.bundle.js"></script> <script type="module" src="https://unpkg.com/immers-client/dist/destination.bundle.js"></script>
<script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script> <script src="https://aframe.io/releases/1.3.0/aframe.min.js"></script>
@ -54,6 +56,17 @@
<body> <body>
<script> <script>
const zoteroReadOnlyKey = 'E3mBRqn1Z0ngndUerrTFnzUA'
// my user, i.e utopiah, for demo purposes only
const zoteroUsedID = 13985178
// from https://www.zotero.org/settings/keys
const { default: api } = ZoteroApiClient;
const myapi = api(zoteroReadOnlyKey).library('user', zoteroUsedID)
//itemsResponse = await myapi.items().get();
//collectionsResponse = await myapi.collections().get();
function loadFile(element){ function loadFile(element){
const file = element.files[0] const file = element.files[0]
const reader = new FileReader(); const reader = new FileReader();

Loading…
Cancel
Save