urschrei / pyzotero

Pyzotero: a Python client for the Zotero API
https://pyzotero.readthedocs.org
Other
908 stars 99 forks source link

Error in docs of create_collections(): parentCollection instead of parent #113

Closed fabbra closed 4 years ago

fabbra commented 4 years ago

Creating a subcollection as described in the docs fails with the following error message:

'code': 400, 'message': "'parent' property is now 'parentCollection'"

In the dict passed as the first input parameter to create_collections() one must use the key parentCollection and not parent.

I guess the docs should be updated accordingly.

Code example that fails:

zot = zotero.Zotero(library_id, library_type, api_key)
result = zot.create_collections([{'parent': parent_id, 'name': 'test'}])

Code example that runs successfully:

zot = zotero.Zotero(library_id, library_type, api_key)
result = zot.create_collections([{'parentCollection': parent_id, 'name': 'test'}])
urschrei commented 4 years ago

Thanks!