edtechhub / zotero-cli

Commandline interface for Zotero
https://github.com/edtechhub/zotero-cli/projects/1
13 stars 3 forks source link

collections #113

Closed bjohas closed 4 years ago

bjohas commented 4 years ago

collections --help gives:

zotero-cli --verbose --group-id 2317526 collections --help
usage: zotero-cli collections [-h] [--top] [--key KEY]

Retrieve a list of collections. (API: /collections or /collection/top)

Optional arguments:
  -h, --help  Show this help message and exit.
  --top       Show only collection at top level.
  --key KEY   Show all the child collections of the key.

I am expecting the call:

zotero-cli --verbose --group-id 2317526 collections --key 7D7LEFHR

to be the same as:

zotero-cli --group-id 2317526 get '/collections/7D7LEFHR/collections'

However, they aren't. The first only retrieves one item, the 2nd retrieves 18 items correctly.

The call

zotero-cli --verbose --group-id 2317526 collections --key 7D7LEFHR

confirms that there are 18 items.

Also, with --verbose, I get this:

$ zotero-cli --verbose --group-id 2317526 collections --key KP4RVA62 | grep name
GET https://api.zotero.org/groups/2317526/collections

The URI shown is not correct. However, it's also shown wrong here: COMMANDS.md, so that might explain it.

Another example is the collection KP4RVA62.

Could you investigate?