API OBIS not working: Could not resolve host: api.iobis.org
salvafern opened this issue · comments
Hi @pieterprovoost,
Just ran one of the examples of the documentation and this doesn't work
library(mregions)
mr_obis_eez_id("bulgarian exclusive economic zone")
#> Error in curl::curl_fetch_memory(url, handle = handle): Could not resolve host: api.iobis.org
Created on 2022-03-03 by the reprex package (v2.0.0)
I tested both on windows and ubuntu, using the latest version of curl. Can you confirm if this is a problem of the OBIS API?
Thanks!
The base URL for the OBIS API is https://api.obis.org/ (not iobis). But I recommend removing OBIS functionality from mregions, if necessary I'll provide a replacement in the robis package.
Ok thanks, we will be working in an update of the package in the following months. We can deprecate this function and maybe move it to robis.
Hi again @pieterprovoost
Im trying to add a quick fix for this issue. I can see the requests are going towards https://api.obis.org/eez But doesn't seem to exists.
Is there any equivalent service in the OBIS API? Otherwise I suggest we shut down this function already.
Thanks!
You could use https://api.obis.org/area instead, but again, I recommend removing this from the package. This is totally unrelated to Marine Regions.
I have fixed the issue, but I noticed that https://api.obis.org/area does not include the EEZs, thus the function does not make much sense now. I have removed mr_obis_eez_id
from mregions.
The function has not been working for a while and we haven't received any feedback, so I assume it was not being used. If anyone experience a problem, feel free to reopen this issue.
Thanks for the help @pieterprovoost !