Module: Lieu::Client::QueryAutocomplete

Included in:
Lieu::Client
Defined in:
lib/lieu/client/query_autocomplete.rb

Overview

Methods for the Query Autocomplete API

Instance Method Summary collapse

Instance Method Details

#query_autocomplete(input, options = {}) ⇒ Array<Hashie::Mash>

Perform a categorical search.

Examples:

Lieu.query_autocomplete('Pizza Paris')

Parameters:

  • input (String)

    the search term

  • options (Hash) (defaults to: {})

    optional parameters

Returns:

  • (Array<Hashie::Mash>)

    a list of predicted places

See Also:



14
15
16
17
18
# File 'lib/lieu/client/query_autocomplete.rb', line 14

def query_autocomplete(input, options={})
  options.merge!(input: input)

  get('queryautocomplete', options).predictions
end