View Source ExNominatim.Client (ExNominatim v1.1.1)

Functions for preparing an HTTP request, including validating the base URL of the target Nominatim API server setting the User-Agent header automatically, selecting all the non-nil request parameters, creating a validated request, and dispatching it to the requested endpoint.

The opts keyword list of the endpoint request functions can optionally include the following:

  • :base_url with a string value setting the base URL of the target Nominatim API server (it defaults to the public server).
  • :force with a boolean value, where true means that validation errors will be ignored and the HTTP GET request to the API will run regardless.

Summary

Functions

Use the /details API endpoint. Delegated to from ExNominatim.details/1, which is documented.

Use the /lookup API endpoint. Delegated to from ExNominatim.lookup/1, which is documented.

Create a new request params struct from the provided keyword list opts, taking into account any required fields listed as atoms in the required list. Delegated to from the new/1 function of the modules of SearchParams, ReverseParams, etc. (the module).

Prepares an HTTP request to the endpoint at base_url with the params map containing request parameters.

Use the /reverse API endpoint. Delegated to from ExNominatim.reverse/1, which is documented.

Use the /search API endpoint. Delegated to from ExNominatim.search/1, which is documented.

Use the /status API endpoint without setting any request parameters. Delegated to from ExNominatim.status/0, which is documented.

Use the /status API endpoint. Delegated to from ExNominatim.status/1, which is documented.

Functions

Link to this function

details(opts)

View Source (since 1.0.0)

Use the /details API endpoint. Delegated to from ExNominatim.details/1, which is documented.

Link to this function

lookup(opts)

View Source (since 1.0.0)

Use the /lookup API endpoint. Delegated to from ExNominatim.lookup/1, which is documented.

Link to this function

new(opts, required, module)

View Source (since 1.0.0)

Create a new request params struct from the provided keyword list opts, taking into account any required fields listed as atoms in the required list. Delegated to from the new/1 function of the modules of SearchParams, ReverseParams, etc. (the module).

Link to this function

prepare(endpoint, params, base_url)

View Source (since 1.0.0)

Prepares an HTTP request to the endpoint at base_url with the params map containing request parameters.

  • endpoint is one of :search, :reverse, :lookup, :status, :details.
  • params is a map (not a keyword list!) with the request parameters.
  • base_url is the the base URL of the target Nominatim API server.

You can use this function directly if you want to bypass the more user-friendly delegate functions in the main ExNominatim module and define the params map directly. This function does not perform any validation of the validity of the keys in params for the selected endpoint, or of their respective values vs. the API endpoint's specification.

Link to this function

reverse(opts)

View Source (since 1.0.0)

Use the /reverse API endpoint. Delegated to from ExNominatim.reverse/1, which is documented.

Link to this function

search(opts)

View Source (since 1.0.0)

Use the /search API endpoint. Delegated to from ExNominatim.search/1, which is documented.

Use the /status API endpoint without setting any request parameters. Delegated to from ExNominatim.status/0, which is documented.

Link to this function

status(opts)

View Source (since 1.0.0)

Use the /status API endpoint. Delegated to from ExNominatim.status/1, which is documented.