api_call function

Helper function for centralize API queries

Helper function for centralize API queries

A wrapper of utils::download.file(). On warning on error it will retry the call. Requests are adjusted to the rate of 1 query per second.

See Nominatim Usage Policy.

api_call(url, destfile = tempfile(fileext = ".json"), quiet)

Arguments

  • url: a character string (or longer vector for the "libcurl" method) naming the URL of a resource to be downloaded.

  • destfile: a character string (or vector, see the url

    argument) with the file path where the downloaded file is to be saved. Tilde-expansion is performed.

  • quiet: If TRUE, suppress status messages (if any), and the progress bar.

Returns

A logical TRUE/FALSE.

See Also

API Management: nominatim_check_access()