-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zotero.addto_collection(collection, item) #71
Comments
We would like to be able to add a set of items to a specific collection, e.g. zotero-cli addtocollection --collection ABC item1 [item2 [item3 ...]] which would add items1 (2, 3, ...) to collection ABC. |
with items being? Individual JSON documents such as fetched with Would this create the items, or merely assign existing items to existing collections? How should nested collections be specified (keeping in mind that Zotero allows same-name collections on the same level)? |
The Zotero collection should be describe as the ID of the collection (e.g. fetched with the additions you did for Zutilo). Items should be specified as item IDs, i.e. libraryID:ittemID. See also #90 |
The API doesn't know about itemIDs, it only knows itemKeys, and you don't need to specify a libraryID because items can only be added to collections that are part of the same library. Specifying via key means I must download the item and patch it, so there's a round-trip involved, and it can fail if someone has changed the item between the fetch and the patch. |
Is there a collection and items I can test with safely? |
You can try 1.0.2 |
Thank you! All working. I made a small tweak (as well as some redundant changes that I then undid). Many thanks! |
Add the specified item(s) to the specified collection
The text was updated successfully, but these errors were encountered: