Skip to content

tnajdek/zotero-api-client

Repository files navigation

Build Status Coverage Status npm version

Zotero API client

A lightweight, minimalistic Zotero API client developed in JavaScript with the following goals:

  • Small, single-purpose module: focuses solely on interacting with the API
  • Compatible with both Node and browser environments
  • No abstraction over Zotero data: what you see is what you get
  • Clean API
  • Small bundle footprint
  • Minimal request validation
  • Predictable and consistent responses
  • Full test coverage

The client does not provide the following:

  • Version management: version headers need to be provided explicitly
  • Caching: each call to get(), post(), etc., actually calls the API
  • Abstraction: there are no Item or Collection objects. API response is returned with a minimal layer to automate common tasks and offers unrestricted access to the response raw JSON data.

Getting The Library

The NPM package includes the source of the library, which can be used as part of your build process (e.g., with Browserify, Rollup, Webpack, etc.) or directly in Node:

npm install zotero-api-client

The package also includes a UMD bundle, which can be loaded with common module loaders or included directly in a <script> tag. In the latter case, the library will be available as a global object ZoteroApiClient. One way to use the UMD bundle on your page is to include it from the unpkg project CDN:

<script src="https://unpkg.com/zotero-api-client"></script>

Example

A simple example of reading items from the public/test user library:

  1. Import the library based on your environment:

    // ES module, commonly used with a bundler:
    import api from 'zotero-api-client';
    // CommonJS, for Node.js and some bundling cases:
    const { default: api } = require('zotero-api-client');
    // UMD bundle creates `ZoteroApiClient` global object
    const { default: api } = ZoteroApiClient;
  2. Use the API to make the request (using async functions):

    const response = await api().library('user', 475425).collections('9KH9TNSJ').items().get();
  3. Extract items from the response:

    const items = response.getData();
  4. Print the titles of all items in the library to the console:

    console.log(items.map(i => i.title));

Overview

The library is composed of three layers:

  • api function: This is the only interface exported for use.
  • Request engine: This component does the heavy lifting and should not be used directly.
  • ApiResponse class: Thin wrapper around the response. Multiple specialised variants exist for handling different response types.

API interface

The API interface is a function that returns a set of functions bound to previously configured options, allowing it to be chained and stored in a partially configured state. A common scenario is to store authentication and library details, which can be done as follows:

import api from 'zotero-api-client';
const myapi = api('AUTH_KEY').library('user', 0);

This produces an API client already configured with your credentials and user library ID. You can now use myapi to obtain the list of collections in that library:

const collectionsResponse = await myapi.collections().get();

Items in that library:

const itemsResponse = await myapi.items().get();

Or items in a specific collection:

const collectionItemsResponse = await myapi.collections('EXAMPLE1').items().get();

There are two types of API functions:

  • Configuration functions (e.g., items()) that can be further chained.
  • Execution functions (e.g., get()) that trigger the request.

For a complete reference, see the documentation for api().

Response

The response is an instance of a specialised response class object returned by one of the execution functions of the api. Each response includes a specialised getData() method, which returns the entities that were requested or modified, depending on the request configuration.

For a complete reference, see the documentation for SingleReadResponse, MultiReadResponse, SingleWriteResponse, MultiWriteResponse, DeleteResponse, FileUploadResponse, FileDownloadResponse, FileUrlResponse.

Request

The request function takes a configuration object generated by the API interface, communicates with the API, and returns one of the response objects (see above). Some rarely used properties cannot be configured through API configuration functions and must be specified as optional properties when calling api() or one of the API's execution functions.

For a complete list of all properties request() accepts, please refer to the documentation for request().

API Reference

zotero-api-client~ApiResponse

Represents a generic Zotero API response. Usually a specialised variant inheriting from this class is returned when doing an API request

Kind: inner class of zotero-api-client

apiResponse.getResponseType() ⇒ string

Name of the class, useful to determine instance of which specialised class has been returned

Kind: instance method of ApiResponse
Returns: string - name of the class

apiResponse.getData() ⇒ object

Content of the response. Specialised classes provide extracted data depending on context.

Kind: instance method of ApiResponse

apiResponse.getLinks() ⇒ object

Links available in the response. Specialised classes provide extracted links depending on context.

Kind: instance method of ApiResponse

apiResponse.getMeta() ⇒ object

Meta data available in the response. Specialised classes provide extracted meta data depending on context.

Kind: instance method of ApiResponse

apiResponse.getVersion() ⇒ number

Value of the "Last-Modified-Version" header in response if present. Specialised classes provide version depending on context

Kind: instance method of ApiResponse
Returns: number - Version of the content in response

zotero-api-client~SingleReadResponse ⇐ ApiResponse

Represents a response to a GET request containing a single entity

Kind: inner class of zotero-api-client
Extends: ApiResponse

singleReadResponse.getResponseType()

Kind: instance method of SingleReadResponse
See: getResponseType

singleReadResponse.getData() ⇒ Object

Kind: instance method of SingleReadResponse
Returns: Object - entity returned in this response

zotero-api-client~MultiReadResponse ⇐ ApiResponse

represents a response to a GET request containing multiple entities

Kind: inner class of zotero-api-client
Extends: ApiResponse

multiReadResponse.getResponseType()

Kind: instance method of MultiReadResponse
See: getResponseType

multiReadResponse.getData() ⇒ Array

Kind: instance method of MultiReadResponse
Returns: Array - a list of entities returned in this response

multiReadResponse.getLinks() ⇒ Array

Kind: instance method of MultiReadResponse
Returns: Array - a list of links, indexes of the array match indexes of entities in getData

multiReadResponse.getMeta() ⇒ Array

Kind: instance method of MultiReadResponse
Returns: Array - a list of meta-data, indexes of the array match indexes of entities in getData

multiReadResponse.getTotalResults() ⇒ number

Kind: instance method of MultiReadResponse
Returns: number - Total number of results

multiReadResponse.getRelLinks() ⇒ object

Kind: instance method of MultiReadResponse
Returns: object - Parsed content of "Link" header as an object where value of "rel" is a key and the URL is the value. For paginated responses contain URLs for "first", "next", "prev" and "last".

zotero-api-client~SingleWriteResponse ⇐ ApiResponse

Represents a response to a PUT or PATCH request

Kind: inner class of zotero-api-client
Extends: ApiResponse

singleWriteResponse.getResponseType()

Kind: instance method of SingleWriteResponse
See: getResponseType

singleWriteResponse.getData() ⇒ Object

Kind: instance method of SingleWriteResponse
Returns: Object - For put requests, this represents a complete, updated object. For patch requests, this represents only updated fields of the updated object.

zotero-api-client~MultiWriteResponse ⇐ ApiResponse

Represents a response to a POST request

Kind: inner class of zotero-api-client
Extends: ApiResponse

multiWriteResponse.getResponseType()

Kind: instance method of MultiWriteResponse
See: getResponseType

multiWriteResponse.isSuccess() ⇒ Boolean

Kind: instance method of MultiWriteResponse
Returns: Boolean - Indicates whether all write operations were successful

multiWriteResponse.getData() ⇒ Array

Returns all entities POSTed in an array. Entities that have been written successfully are returned updated, other entities are returned unchanged. It is advised to verify if the request was entirely successful (see isSuccess and getError) before using this method.

Kind: instance method of MultiWriteResponse
Returns: Array - A modified list of all entities posted.

multiWriteResponse.getLinks()

Kind: instance method of MultiWriteResponse
See: getLinks

multiWriteResponse.getMeta()

Kind: instance method of MultiWriteResponse
See: getMeta

multiWriteResponse.getErrors() ⇒ Object

Returns all errors that have occurred.

Kind: instance method of MultiWriteResponse
Returns: Object - Errors object where keys are indexes of the array of the original request and values are the errors occurred.

multiWriteResponse.getEntityByKey(key)

Allows getting an updated entity based on its key, otherwise identical to getEntityByIndex

Kind: instance method of MultiWriteResponse
Throws:

  • Error If key is not present in the request

See: module:zotero-api-client.getEntityByIndex

Param Type
key String

multiWriteResponse.getEntityByIndex(index) ⇒ Object

Allows getting an updated entity based on its index in the original request

Kind: instance method of MultiWriteResponse
Throws:

  • Error If index is not present in the original request
  • Error If error occurred in the POST for selected entity. Error message will contain the reason for failure.
Param Type
index Number | String

zotero-api-client~DeleteResponse ⇐ ApiResponse

Represents a response to a DELETE request

Kind: inner class of zotero-api-client
Extends: ApiResponse

deleteResponse.getResponseType()

Kind: instance method of DeleteResponse
See: getResponseType

zotero-api-client~FileUploadResponse ⇐ ApiResponse

Represents a response to a file upload request

Kind: inner class of zotero-api-client
Extends: ApiResponse
Properties

Name Type Description
authResponse Object Response object for stage 1 (upload authorisation) request
response Object alias for "authResponse"
uploadResponse Object Response object for stage 2 (file upload) request
registerResponse Object Response object for stage 3 (upload registration) request

fileUploadResponse.getResponseType()

Kind: instance method of FileUploadResponse
See: getResponseType

fileUploadResponse.getVersion()

Kind: instance method of FileUploadResponse
See: getVersion

zotero-api-client~FileDownloadResponse ⇐ ApiResponse

Represents a response to a file download request

Kind: inner class of zotero-api-client
Extends: ApiResponse

fileDownloadResponse.getResponseType()

Kind: instance method of FileDownloadResponse
See: getResponseType

zotero-api-client~FileUrlResponse ⇐ ApiResponse

Represents a response containing temporary url for file download

Kind: inner class of zotero-api-client
Extends: ApiResponse

fileUrlResponse.getResponseType()

Kind: instance method of FileUrlResponse
See: getResponseType

zotero-api-client~RawApiResponse ⇐ ApiResponse

Represents a raw response, e.g. to data requests with format other than JSON

Kind: inner class of zotero-api-client
Extends: ApiResponse

rawApiResponse.getResponseType()

Kind: instance method of RawApiResponse
See: getResponseType

zotero-api-client~PretendResponse ⇐ ApiResponse

Represents a response for pretended request, mostly for debug purposes. See module:zotero-api-client.api~pretend

Kind: inner class of zotero-api-client
Extends: ApiResponse

pretendResponse.getResponseType()

Kind: instance method of PretendResponse
See: getResponseType

pretendResponse.getVersion() ⇒ Object

Kind: instance method of PretendResponse
Returns: Object - For pretended request version will always be null.

zotero-api-client~ErrorResponse ⇐ Error

Represents an error response from the api

Kind: inner class of zotero-api-client
Extends: Error
Properties

Name Type Description
response Object Response object for the request, with untouched body
message String What error occurred, usually contains response code and status
reason String More detailed reason for the failure, if provided by the API
options String Configuration object used for this request

errorResponse.getVersion() ⇒ number

Value of the "Last-Modified-Version" header in response if present. This is generally only available if the server responded with 412 due to a version mismatch.

Kind: instance method of ErrorResponse
Returns: number - Version of the content in response

errorResponse.getResponseType()

Kind: instance method of ErrorResponse
See: getResponseType

zotero-api-client~api() ⇒ Object

Wrapper function creates closure scope and calls api()

Kind: inner method of zotero-api-client
Returns: Object - Partially configured api functions

api~api(key, opts) ⇒ Object

Entry point of the interface. Configures authentication. Can be used to configure any other properties of the api Returns a set of functions that are bound to that configuration and can be called to specify further api configuration.

Kind: inner method of api
Chainable
Returns: Object - Partially configured api functions

Param Type Description
key String Authentication key
opts Object Optional api configuration. For a list of all possible properties, see documentation for request() function

api~library([typeOrKey], [id]) ⇒ Object

Configures which library api requests should use.

Kind: inner method of api
Chainable
Returns: Object - Partially configured api functions

Param Type Default Description
[typeOrKey] * Library key, e.g. g1234. Alternatively, if second parameter is present, library type i.e. either 'group' or 'user'
[id] Number Only when first argument is a type, library id

api~items(items) ⇒ Object

Configures api to use items or a specific item Can be used in conjunction with library(), collections(), top(), trash(), children(), tags() and any execution function (e.g. get(), post())

Kind: inner method of api
Chainable
Returns: Object - Partially configured api functions

Param Type Default Description
items String Item key, if present, configure api to point at this specific item

api~itemTypes() ⇒ Object

Configure api to request all item types Can only be used in conjunction with get()

Kind: inner method of api
Chainable
Returns: Object - Partially configured api functions

api~itemFields() ⇒ Object

Configure api to request all item fields Can only be used in conjunction with get()

Kind: inner method of api
Chainable
Returns: Object - Partially configured api functions

api~creatorFields() ⇒ Object

Configure api to request localized creator fields Can only be used in conjunction with get()

Kind: inner method of api
Chainable
Returns: Object - Partially configured api functions

api~schema() ⇒ Object

Configure api to request schema Can only be used in conjunction with get()

Kind: inner method of api
Chainable
Returns: Object - Partially configured api functions

api~itemTypeFields(itemType) ⇒ Object

Configure api to request all valid fields for an item type Can only be used in conjunction with get()

Kind: inner method of api
Chainable
Returns: Object - Partially configured api functions

Param Type Description
itemType String item type for which valid fields will be requested, e.g. 'book' or 'journalType'

api~itemTypeCreatorTypes(itemType) ⇒ Object

Configure api to request valid creator types for an item type Can only be used in conjunction with get()

Kind: inner method of api
Chainable
Returns: Object - Partially configured api functions

Param Type Description
itemType String item type for which valid creator types will be requested, e.g. 'book' or 'journalType'

api~template(itemType, subType) ⇒ Object

Configure api to request template for a new item Can only be used in conjunction with get()

Kind: inner method of api
Chainable
Returns: Object - Partially configured api functions

Param Type Description
itemType String item type for which template will be requested, e.g. 'book' or 'journalType'
subType String annotationType if itemType is 'annotation' or linkMode if itemType is 'attachment'

api~collections(collections) ⇒ Object

Configure api to use collections or a specific collection Can be used in conjunction with library(), items(), top(), tags() and any of the execution function (e.g. get(), post())

Kind: inner method of api
Chainable
Returns: Object - Partially configured api functions

Param Type Description
collections String Collection key, if present, configure api to point to this specific collection

api~subcollections() ⇒ Object

Configure api to use subcollections that reside underneath the specified collection. Should only be used in conjunction with both library() and collection() and any of the execution function (e.g. get(), post())

Kind: inner method of api
Chainable
Returns: Object - Partially configured api functions

api~publications() ⇒ Object

Configure api to narrow the request to only consider items filled under "My Publications" Should only be used in conjunction with both library() and items() and any of the execution function (e.g. get(), post())

Kind: inner method of api
Chainable
Returns: Object - Partially configured api functions

api~tags(tags) ⇒ Object

Configure api to request or delete tags or request a specific tag Can be used in conjunction with library(), items(), collections() and any of the following execution functions: get(), delete() but only if the first argument is not present. Otherwise, can only be used in conjunction with get()

Kind: inner method of api
Chainable
Returns: Object - Partially configured api functions

Param Type Default Description
tags String name of a tag to request. If present, configure api to request a specific tag.

api~searches(searches) ⇒ Object

Configure api to use saved searches or a specific saved search Can be used in conjunction with library() and any of the execution functions

Kind: inner method of api
Chainable
Returns: Object - Partially configured api functions

Param Type Default Description
searches String Search key, if present, configure api to point at this specific saved search

api~top() ⇒ Object

Configure api to narrow the request only to the top level items Can be used in conjunction with items() and collections() and only with conjunction with a get() execution function

Kind: inner method of api
Chainable
Returns: Object - Partially configured api functions

api~trash() ⇒ Object

Configure api to narrow the request only to the items in the trash Can be only used in conjunction with items() and get() execution function

Kind: inner method of api
Chainable
Returns: Object - Partially configured api functions

api~children() ⇒ Object

Configure api to narrow the request only to the children of given item Can be only used in conjunction with items() and get() execution function

Kind: inner method of api
Chainable
Returns: Object - Partially configured api functions

api~settings(settings) ⇒ Object

Configure api to request settings Can only be used in conjunction with get(), put(), post() and delete() For usage with put() and delete() a settings key must be provided For usage with post() a settings key must not be included

Kind: inner method of api
Chainable
Returns: Object - Partially configured api functions

Param Type Default Description
settings String Settings "key", if present, configures api to point at this specific key within settings, e.g. tagColors.

api~deleted() ⇒ Object

Configure api to request deleted content Can only be used in conjunction with get()

Kind: inner method of api
Chainable
Returns: Object - Partially configured api functions

api~groups() ⇒ Object

Configure api to request user-accessible groups (i.e. The set of groups the current API key has access to, including public groups the key owner belongs to even if the key doesn't have explicit permissions for them.) Can only be used in conjunction with get()

Kind: inner method of api
Chainable
Returns: Object - Partially configured api functions

api~version(version) ⇒ Object

Configure api to specify a local version of a given entity. When used in conjunction with the get() exec function, it will populate the If-Modified-Since-Version header. When used in conjunction with post(), put(), patch() or delete(), it will populate the If-Unmodified-Since-Version header.

Kind: inner method of api
Chainable
Returns: Object - Partially configured api functions

Param Type Description
version Number local version of the entity

api~attachment([fileName], [file], [mtime], [md5sum], patch, [algorithm]) ⇒ Object

Configure api to upload or download an attachment file. Can be only used in conjunction with items() and post()/get()/patch(). Method patch() can only be used to upload a binary patch, in this case the last two arguments must be provided. Method post() is used for full uploads. If md5sum is provided, it will update an existing file, otherwise it uploads a new file. The last two arguments are not used in this scenario. Method get() is used for downloads, in this case skip all arguments. Use items() to select the attachment item for which the file is uploaded/downloaded. Will populate format on download as well as Content-Type, If*Match headers in case of upload.

Kind: inner method of api
Chainable
Returns: Object - Partially configured api functions

Param Type Description
[fileName] String For upload: name of the file, should match values in attachment item entry
[file] ArrayBuffer New file to be uploaded
[mtime] Number New file's mtime, leave empty to assume current date/time
[md5sum] String MD5 hash of an existing file, required for uploads that update existing file
patch ArrayBuffer Binary patch, to be applied to the old file, to produce a new file
[algorithm] String Algorithm used to compute a diff: xdelta, vcdiff or bsdiff

api~registerAttachment(fileName, fileSize, mtime, md5sum) ⇒ Object

Advanced function that will attempt to register an existing file with a given attachment item based on known file metadata. Can also be used to rename an existing file. Can be only used in conjunction with items() and post(). Use items() to select the attachment item for which a file is registered. Will populate Content-Type, If-Match headers. Will fail with a ErrorResponse if API does not return "exists".

Kind: inner method of api
Chainable
Returns: Object - Partially configured api functions

Param Type Description
fileName String name of the file, should match value in the item, unless renaming
fileSize Number size of the existing file
mtime Number mtime of the existing file
md5sum String md5sum of the existing file

api~attachmentUrl() ⇒ Object

Configure api to request a temporary attachment file url Can be only used in conjunction with items() and get() Use items() to select attachment item for which file is url is requested Will populate format, redirect

Kind: inner method of api
Chainable
Returns: Object - Partially configured api functions

api~verifyKeyAccess() ⇒ Object

Configure api to request information on the API key. Can only be used in conjunction with get()

Kind: inner method of api
Chainable
Returns: Object - Partially configured api functions

api~get(opts) ⇒ Promise

Execution function. Specifies that the request should use a GET method.

Kind: inner method of api
Returns: Promise - A promise that will eventually return either an ApiResponse, SingleReadResponse or MultiReadResponse. Might throw Error or ErrorResponse.

Param Type Description
opts Object Optional api configuration. If duplicate, overrides properties already present. For a list of all possible properties, see documentation for request() function

api~post(data, opts) ⇒ Promise

Execution function. Specifies that the request should use a POST method.

Kind: inner method of api
Returns: Promise - A promise that will eventually return MultiWriteResponse. Might throw Error or ErrorResponse

Param Type Description
data Array An array of entities to post
opts Object Optional api configuration. If duplicate, overrides properties already present. For a list of all possible properties, see documentation for request() function

api~put(data, opts) ⇒ Promise

Execution function. Specifies that the request should use a PUT method.

Kind: inner method of api
Returns: Promise - A promise that will eventually return SingleWriteResponse. Might throw Error or ErrorResponse

Param Type Description
data Object An entity to put
opts Object Optional api configuration. If duplicate, overrides properties already present. For a list of all possible properties, see documentation for request() function

api~patch(data, opts) ⇒ Promise

Execution function. Specifies that the request should use a PATCH method.

Kind: inner method of api
Returns: Promise - A promise that will eventually return SingleWriteResponse. Might throw Error or ErrorResponse

Param Type Description
data Object Partial entity data to patch
opts Object Optional api configuration. If duplicate, overrides properties already present. For a list of all possible properties, see documentation for request() function

api~del(keysToDelete, opts) ⇒ Promise

Execution function. Specifies that the request should use a DELETE method.

Kind: inner method of api
Returns: Promise - A promise that will eventually return DeleteResponse. Might throw Error or ErrorResponse

Param Type Description
keysToDelete Array An array of keys to delete. Depending on how api has been configured, these will be item keys, collection keys, search keys or tag names. If not present, api should be configured to use specific item, collection, saved search or settings key, in which case, that entity will be deleted
opts Object Optional api configuration. If duplicate, overrides properties already present. For a list of all possible properties, see documentation for request() function

api~getConfig() ⇒ Object

Execution function. Returns current config without doing any requests. Usually used in advanced scenarios where config needs to be tweaked manually before submitted to the request method or as a debugging tool.

Kind: inner method of api
Returns: Object - current config

api~pretend(verb, data, opts) ⇒ Promise

Execution function. Prepares the request but does not execute fetch(), instead returning a "pretended" response where details for the actual fetch that would have been used are included. Usually used in advanced scenarios where config needs to be tweaked manually before it is submitted to the request method or as a debugging tool.

Kind: inner method of api
Returns: Promise - A promise that will eventually return PretendResponse. Might throw Error or ErrorResponse

Param Type Default Description
verb String get Defines which execution function is used to prepare the request. Should be one of 'get', 'post', 'patch' 'put', 'delete'. Defaults to 'get'.
data Object This argument is passed over to the actual execution function. For 'get' it is ignored, for 'post', 'patch' and 'put' see 'data' of that execution function, for 'delete' see 'keysToDelete'
opts Object Optional api configuration. If duplicate, overrides properties already present. For a list of all possible properties, see documentation for request() function

api~use(extend) ⇒ Object

Used for extending capabilities of the library by installing plugins. In most cases plugins inject additional executors or bind api to an alternative/extended set of functions

Kind: inner method of api
Returns: Object - Extended/partially configured api functions

Param Type Description
extend function function that installs alternative or additional functionality of the api. It should return bound api functions, usually by calling arguments[0].ef()

zotero-api-client~request(config) ⇒ Object

Executes request and returns a response. Not meant to be called directly, instead use api.

Kind: inner method of zotero-api-client
Returns: Object - Returns a Promise that will eventually return a response object
Throws:

  • Error If options specify impossible configuration
  • ErrorResponse If API responds with a non-ok response
Param Type Description
config Object Configuration object
config.apiScheme String Scheme part of the API URL
config.apiAuthorityPart String Authority part of the API URL
config.apiPath String Path part of the API URL
config.authorization String 'Authorization' header
config.zoteroWriteToken String 'Zotero-Write-Token' header
config.ifModifiedSinceVersion String 'If-Modified-Since-Version' header
config.ifUnmodifiedSinceVersion String 'If-Unmodified-Since-Version' header
config.contentType String 'Content-Type' header
config.collectionKey String 'collectionKey' query argument
config.content String 'content' query argument
config.direction String 'direction' query argument
config.format String 'format' query argument
config.include String 'include' query argument
config.includeTrashed String 'includeTrashed' query argument
config.itemKey String 'itemKey' query argument
config.itemQ String 'itemQ' query argument
config.itemQMode String 'itemQMode' query argument
config.itemTag String | Array.<String> 'itemTag' query argument
config.itemType String 'itemType' query argument
config.limit Number 'limit' query argument
config.linkMode String 'linkMode' query argument
config.linkwrap String 'linkwrap' query argument
config.locale String 'locale' query argument
config.q String 'q' query argument
config.qmode String 'qmode' query argument
config.searchKey String 'searchKey' query argument
config.since Number 'since' query argument
config.sort String 'sort' query argument
config.start Number 'start' query argument
config.style String 'style' query argument
config.tag String | Array.<String> 'tag' query argument
config.pretend Boolean triggers pretend mode where fetch request is prepared and returned without execution
config.resource.top String use 'top' resource
config.resource.trash String use 'trash' resource
config.resource.children String use 'children' resource
config.resource.groups String use 'groups' resource
config.resource.itemTypes String use 'itemTypes' resource
config.resource.itemFields String use 'itemFields' resource
config.resource.creatorFields String use 'creatorFields' resource
config.resource.itemTypeFields String use 'itemTypeFields' resource
config.resource.itemTypeCreatorTypes String use 'itemTypeCreatorTypes' resource
config.resource.library String use 'library' resource
config.resource.collections String use 'collections' resource
config.resource.items String use 'items' resource
config.resource.searches String use 'searches' resource
config.resource.tags String use 'tags' resource
config.resource.template String use 'template' resource
config.method String forwarded to fetch()
config.body String forwarded to fetch()
config.mode String forwarded to fetch()
config.cache String forwarded to fetch()
config.credentials String forwarded to fetch()
config.uploadRegisterOnly Boolean this file upload should only perform stage 1
config.retry Number retry this many times after transient error
config.retryDelay Number wait this many seconds before retry. If not set an exponential backoff algorithm will be used

About

Lightweight, minimalistic Zotero API client written in JavaScript.

Resources

License

Stars

Watchers

Forks

Packages

No packages published