Duffel.Places (Duffel v0.1.0)

Copy Markdown View Source

Autocomplete airports and cities by name or location.

See the Duffel documentation.

Summary

Functions

Suggests places matching a search string or location. Not paginated.

Functions

suggestions(client, params)

@spec suggestions(Duffel.Client.t(), keyword() | map()) ::
  {:ok, [map()]} | {:error, Duffel.Error.t()}

Suggests places matching a search string or location. Not paginated.

Parameters

  • :query - search string, e.g. a partial city or airport name
  • :lat / :lng / :rad - latitude, longitude and radius in metres to search around

Examples

Duffel.Places.suggestions(client, query: "lond")