Finds the pdf_url during Result construction and stores it as Result.pdf_url.
Deprecates the get_pdf_url accessor.
It's unfortunate that we're duplicating data on the Result object again, but it makes sense to move towards a more structured version of links (e.g. indexing links in a dict by their content type) rather than keeping a list.
I'm also pretty confident that PDF URL access constitutes the vast majority of Result.links usage, since the Result.entry_id is a fine URL for the article metadata. Exposing pdf_url is better than having users modify entry_ids into homegrown PDF URLs.
[x] Add a unit test.
Breaking changes
List any changes that break the API usage supported on master.
~None: get_pdf_url remains implemented.~
Removes get_pdf_url.
Note: it may make sense to remove get_pdf_url whenever https://github.com/lukasschwab/arxiv.py/pull/58 introduces its breaking change. The risk here is that users don't have time to react to the deprecation.
Description
Result.pdf_url
.get_pdf_url
accessor.It's unfortunate that we're duplicating data on the Result object again, but it makes sense to move towards a more structured version of links (e.g. indexing links in a dict by their content type) rather than keeping a list.
I'm also pretty confident that PDF URL access constitutes the vast majority of
Result.links
usage, since theResult.entry_id
is a fine URL for the article metadata. Exposingpdf_url
is better than having users modifyentry_id
s into homegrown PDF URLs.Breaking changes
~None:
get_pdf_url
remains implemented.~Removes
get_pdf_url
.Note: it may make sense to remove
get_pdf_url
whenever https://github.com/lukasschwab/arxiv.py/pull/58 introduces its breaking change. The risk here is that users don't have time to react to the deprecation.Relevant issues
https://github.com/EPS-Libraries-Berkeley/volt/issues/161: this came up as a pain point while migrating their example.
Checklist
make lint
.make test
.make docs
.README.md
example usage has been updated.