View Source
Geocoder.Provider behaviour
(geocoder v2.0.1)
Specifies expected behaviour for a provider
@type option() ::
{:json_codec, atom()}
| {:http_client, atom()}
| {:http_client_opts, term()}
| {:key, binary()}
| {:data, term()}
@callback geocode(payload(), options()) :: {:ok, Geocoder.Coords.t()} | {:error, any()}
@callback geocode_list(payload(), options()) ::
{:ok, Geocoder.Coords.t()} | {:error, any()}
@callback reverse_geocode(payload(), options()) ::
{:ok, Geocoder.Coords.t()} | {:error, any()}
@callback reverse_geocode_list(payload(), options()) ::
{:ok, Geocoder.Coords.t()} | {:error, any()}