libZoteroJS
libZoteroJS copied to clipboard
Example usage
Hi! Any chance you could post some info on how this could be used? A simple example would help me quite a lot. Thanks!
Here's a super simple example:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>title</title>
<script src="/libzotero.js"></script>
</head>
<body>
<script>
var userId = 123456789; //your user id
Zotero.config.apiKey = '<PUT YOUR API KEY HERE>'; // you can create one here: https://www.zotero.org/settings/keys
Zotero.config.useConfigKey = true;
Zotero.init();
lib = new Zotero.Library('user', userId, null, Zotero.config.apiKey);
lib.loadItems().then(function() {
console.info(lib.items.objectArray);
}).catch(function(err) {
console.warn(err);
});
</script>
</body>
</html>
Thanks!
Hi, Thank's for that Actually it only gather what seems to be the 25 last entries I added to my library. why not all of them and how to do so ? I actually face the same issue when using the api directly Thank's