pybliometrics-dev / pybliometrics

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

view parameter in PlumXMetrics() broken #275

Closed kmatsu1129 closed 1 year ago

kmatsu1129 commented 1 year ago

pybliometrics version: 3.4.0

Code to reproduce the bug:

from pybliometrics.scopus import PlumXMetrics
s = PlumXMetrics("2-s2.0-85013763791", id_type='elsevierId', refresh=True)

Expected behavior: Returns the following values: [Category(name='capture', total=xx), Category(name='citation', total=xx), Category(name='socialMedia', total=xx)]

Comment: I contacted Elsevier about this issue. As a result, I received the following response. (It seems that the API specification have changed)

============

Upon checking the requests from your API key, I've noticed that you are using the ENHANCED view on the PlumX API requests. I would like to share that the ENHANCED view is not available on the PlumX API documentation https://dev.elsevier.com/documentation/PlumXMetricsAPI.wadl . Can you please try submitting a request without the view=ENHANCED parameter and let me know if it will be successful?

Michael-E-Rose commented 1 year ago

Yes indeed, it seems that they completely abondonned the view parameter for this class. It's relatively easy to fix - it's just a question what to do with already cached files. Because the file path for downloaded results includes the view. I'll think about it

kmatsu1129 commented 1 year ago

Thank you for your quick comment. I hope this issue will be fix as soon as possible, because I am getting weekly data with this API-wrapper. After that, I have received the following email from Elsevier. If I receive any new communication, I will post it here.

I have also run some tests on our end using the PlumX API and it appears that we are also getting the same error. I have reached out to our Product Team to further investigate this issue and I will contact you once I have received new information.

kmatsu1129 commented 1 year ago

I received the following email from Elsevier:

I have received an update from the Product Team that the issue with the PlumX API is now resolved. Can you please test it on your end and let me know if it's already working?

And I am now testing the operation and it appears to be working fine with the code as it has been so far.

Michael-E-Rose commented 1 year ago

For me it works as well. Thanks for making them correct this real quick!