averbis / averbis-python-api

Conveniently access the REST API of Averbis products using Python
Apache License 2.0
12 stars 4 forks source link

import_document vs import_documents #28

Closed reckart closed 3 years ago

reckart commented 3 years ago

Describe the issue There seems to be an inconsistency between the Project.import_documents() and the Client.import_project() that it calls. The first suggests that multiple documents are imported while the second implies only a single document is imported.

For an Project.import_documents() (plural), I would expect that a list of files can be provided to the call, but it only accepts a single IO.

Also: I think it would be good if the methods supported Union[IO,Path].

Please complete the following information:

reckart commented 3 years ago

It is possible to import multiple documents using SolrXML. If this is done, then the result of the call is a list of document/name mappings. As part of https://github.com/averbis/averbis-python-api/pull/32 ,the API is changed to return a list always (even if a simple text is imported) and the method has been consistently named to import_documents