palaeoverse / rphylopic

Get Silhouettes of Organisms from PhyloPic
https://rphylopic.palaeoverse.org
GNU General Public License v3.0
91 stars 9 forks source link

Resolve taxonomic names from external APIs to PhyloPic #97

Closed willgearty closed 11 months ago

willgearty commented 11 months ago

This adds the resolve_phylopic() function, which allows users to supply a taxonomic name that they expect to be matched in an external API (EOL, GBIF, PBDB, WoRMs, and OTOL atm) and then use that API to resolve the taxonomic name to PhyloPic. The function can return images (uuids/urls) for just the specified name or for a part of the taxonomic hierarchy (as reported by the API, except for EOL which doesn't supply taxonomic information).

This basically accomplishes the asynchronous API searching that the PhyloPic website does, but with much lower overhead than calling all of those APIs within get_uuid (because it is user-driven).

Fixes #66.

willgearty commented 11 months ago

(rebasing because of the updated snapshots on main)