View Source ExNominatim.Client (ExNominatim v2.0.0)
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_urlwith a string value setting the base URL of the target Nominatim API server (it defaults to the public server).:forcewith a boolean value, wheretruemeans 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
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.
endpointis one of:search,:reverse,:lookup,:status,:details.paramsis a map (not a keyword list!) with the request parameters.base_urlis 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.
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.