lukasschwab / arxiv.py

Python wrapper for the arXiv API
MIT License
1.11k stars 123 forks source link

Store `Result.pdf_url` member variable #59

Closed lukasschwab closed 3 years ago

lukasschwab commented 3 years ago

Description

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.

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.

Relevant issues

List GitHub issues relevant to this change.

https://github.com/EPS-Libraries-Berkeley/volt/issues/161: this came up as a pain point while migrating their example.

Checklist