Call Javascript API to list items in a collection

Reading the Javascript API docs here ...
https://www.zotero.org/support/dev/client_coding/javascript_api
there is reference to Plain Old Webserver.

But on trying to install POW I see that POW is incompatible with Firefox 40. What should I use instead of POW to get collectionID?

From the docs ..

Get the items for a particular collection

var Zotero = Components.classes["@zotero.org/Zotero;1"] .getService(Components.interfaces.nsISupports).wrappedJSObject;
var collectionid = pow_server.GET.id; // or some other way of finding the collectionID here
var collection = z.Collections.get(collectionid);
var items = collection.getChildItems();
// or you can obtain an array of itemIDs instead:
var itemids = collection.getChildItems(true);
  • What collection are you trying to retrieve the ID for? What criteria is this based on? In general, you should post coding questions on zotero-dev@googlegroups.com
  • The only point I was making is that Javascript API docs refers to "POW" but that option (5 years old) can't now be installed on latest Firefox 40.

    I'll now move future dev questions to zotero-dev@googlegroups.com

    Thanks.

This is an old discussion that has not been active in a long time. Before commenting here, you should strongly consider starting a new discussion instead. If you think the content of this discussion is still relevant, you can link to it from your new discussion.

Sign In or Register to comment.