pybliometrics-dev / pybliometrics

Python-based API-Wrapper to access Scopus
https://pybliometrics.readthedocs.io/en/stable/
Other
414 stars 129 forks source link

AbstractRetrieval API and the REF view #293

Closed egonzales2000 closed 10 months ago

egonzales2000 commented 1 year ago

pybliometrics version: 3.4

Affected classes:AbstractRetrieval API

Expected behavior: When using the AbstractRetrieval API and the REF view, it would be nice to be able to store the data when paginating over the results. So far only one slice of data is stored in the cache. Using refresh=True obviously solves the problem but it would be nice to use cached data.

A a nasty solution would be to change line 44 in the retrieval.py to:

stem = str(identifier.replace('/', '')) + "" + str(kwds['startref']).

Michael-E-Rose commented 1 year ago

This is actually a smart solution.

The alternative is to try to get all references and save them in the cached file.

Last year after a talk with the API team I was still hoping they would address this design choice of theirs. Alas, I don't think it will ever happen.

So let's implement this. But str(kwds['startref']) will not work if there are no kwds or if it is a different one. It's the right line though.

nils-herrmann commented 11 months ago

I implemented the query and download of all references. We might consider adding an issue to implement the parametrisation of the max amount of references to download. Since the total amount of references is usually not significantly large I would argue to leave it as it is.

Michael-E-Rose commented 10 months ago

Implemented thanks to fa24aeaf1e7ef621e4cbd58abb206301ebe5822f.

You have to refresh existing documents in order to see more than the first 40 references.