Skip to content
This repository has been archived by the owner on Apr 29, 2022. It is now read-only.

WIP: fix #143 #146

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

leonardosfl
Copy link
Contributor

This seems to fix the issue (we can add reviews and requests), but it doesn't show the PDF. Since I'm not familiar with this project, I don't know yet where the PDF should come from (should it be manually added or something?).

image

@jheretic
Copy link
Contributor

Hi @leonardosfl, this looks great! The PDF's URL is contained in the request to the preprint server, and then it is fetched from the preprint server and cached in order to work around cross-origin request issues. Is it possible that the changes made to the URL handling have interfered with the way that the PDF URL is generated? It's also of course possible that the PDF for this particular review is just not accessible for some other reason. Do other preprints' PDFs show up after this fix is applied? Let me know if you need help debugging!

@leonardosfl
Copy link
Contributor Author

leonardosfl commented Jul 21, 2020

The API request for this specific preprint doesn't have the encoding field as others do.

Do other preprints' PDFs show up after this fix is applied?

Yes, I've tested that, they seem to be working all right.

@leonardosfl
Copy link
Contributor Author

leonardosfl commented Jul 21, 2020

/api/resolve?identifier=10.21203%2Frs.3.rs-32796%2Fv1 only returns this:

{
  "@type": "ScholarlyPreprint",
  "doi": "10.21203/rs.3.rs-32796/v1",
  "name": "A novel peptide analogue of spike glycoprotein shows antiviral properties against SARS-CoV-2 ",
  "datePosted": "2020-05-31T00:00:00.000Z"
}

But this one /api/resolve?identifier=1909.13766, for example, returns this:

{
  "@type": "ScholarlyPreprint",
  "arXivId": "1909.13766",
  "name": "Multiscale Influenza Forecasting",
  "preprintServer": {
    "@type": "PreprintServer",
    "name": "arXiv"
  },
  "datePosted": "2019-09-30T00:00:00.000Z",
  "url": "https://arxiv.org/abs/1909.13766v1",
  "encoding": [
    {
      "@type": "MediaObject",
      "encodingFormat": "application/pdf",
      "contentUrl": "https://arxiv.org/pdf/1909.13766"
    }
  ]
}

@leonardosfl
Copy link
Contributor Author

Maybe PDFs from Research Square are not supported yet? #89 (comment)

@rudietuesdays
Copy link
Contributor

Thanks @leonardosfl ! Appreciate your check in response to @jheretic 's comment. Will follow up about Research Square once we know -- otherwise this looks great and we'll let you know if/when we're able to merge and close.

@murkatr murkatr added this to In progress in Wellcome Trust API Integrations Sep 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants