zotero API client for nodejs?

56 views
Skip to first unread message

panyasan

unread,
Nov 10, 2011, 9:24:04 AM11/10/11
to zotero-dev
Hi,

have been searching the Web and this list but didn't find anything.
There are API clients for PHP and Python [1] but no javascript client
yet, it seems. Or did I miss something? I would like to use it in a
nodejs app to transfer reference data from my local database to
Zotero.

Thanks.

[1] http://www.zotero.org/support/dev/server_api

panyasan

unread,
Nov 13, 2011, 7:31:36 AM11/13/11
to zotero-dev
Hello again,

since nobody answered I assume that there is no javascript-based
client yet - which might have something to do with the lack of a
decent way to process xml with javascript. I intend to create a
javascript zotero client (but don't know if I'll have the time and
ability to write one). I'd rather build on existing code, if there is
some. Please, if you know of any effort, let me know, so that I don't
reinvent the wheel.

Thanks.

Simon

unread,
Nov 13, 2011, 9:28:49 AM11/13/11
to zotero-dev
On Nov 13, 7:31 am, panyasan <cmboulan...@googlemail.com> wrote:
> Hello again,
>
> since nobody answered I assume that there is no javascript-based
> client yet - which might have something to do with the lack of a
> decent way to process xml with javascript. I intend to create a
> javascript zotero client (but don't know if I'll have the time and
> ability to write one). I'd rather build on existing code, if there is
> some. Please, if you know of any effort, let me know, so that I don't
> reinvent the wheel.

There are OAuth functions in the connectors that may be of some use
(although they assume XMLHttpRequest, which node.js doesn't have by
default but is available in an NPM package):

https://github.com/zotero/zotero-connectors/blob/master/common/zotero/oauth.js
https://github.com/zotero/zotero-connectors/blob/master/common/zotero/oauthsimple.js

Since the connectors are write-only, they just serialize objects to
JSON and submit them, so there's nothing beyond that.

There are XML libraries for node.js, but they all suck in different
ways (either they are JS-based and slow, or they are native and
crashy, or they have non-standard APIs). It's still probably better to
use one of these solutions than to roll your own.

Simon

Bruce D'Arcus

unread,
Nov 13, 2011, 3:18:09 PM11/13/11
to zoter...@googlegroups.com
On Sun, Nov 13, 2011 at 9:28 AM, Simon <si...@simonster.com> wrote:

...

> There are XML libraries for node.js, but they all suck in different
> ways (either they are JS-based and slow, or they are native and
> crashy, or they have non-standard APIs). It's still probably better to
> use one of these solutions than to roll your own.

It's probably worth noting that the node.js world is rapidly evolving.
Here's one place that itemizes the current status of XML support:

https://github.com/joyent/node/wiki/modules#wiki-parsers-xml

Bruce

Reply all
Reply to author
Forward
0 new messages