TIBHannover / BacDiveR

Inofficial R client for the DSMZ's Bacterial Diversity Metadatabase (former contact: @katrinleinweber). https://api.bacdive.dsmz.de/client_examples seems to be the official alternatives.
https://TIBHannover.GitHub.io/BacDiveR/
MIT License
10 stars 12 forks source link

Validate retrieve_search_results() input #78

Open katrinleinweber opened 6 years ago

katrinleinweber commented 6 years ago

Right below https://github.com/TIBHannover/BacDiveR/blob/master/R/retrieve_search_results.R#L14, the queryURL should be validated ("defensive programming") somehow. Maybe using stringi::stri_startswith("https://bacdive.dsmz.de/advsearch?site=advsearch") and/or stringi::stri_endswith("&advsearch=search")?

In either case, a test should be added whether an error is triggered by using a non-advsearch URL.

katrinleinweber commented 5 years ago

Related to #71.