Module: YellowApi::Client::FindBusiness

Included in:
YellowApi::Client
Defined in:
lib/yellow_api/client/find_business.rb

Instance Method Summary collapse

Instance Method Details

#find_business(what, where, options = {}) ⇒ Hash

Note:

Max 5000 results returned

Returns a listing of businesses matching specified criteria

Examples:

YellowApi.find_business("restaurant", "Toronto")
YellowApi.find_business("h%C3%B4tels", "cZ-73.61995,45.49981")

Parameters:

  • what (String)

    Keyword search term. Any text string. For example "restaurant". Non-ASCII characters should be escaped

  • where (String)

    The location to search. May be a location name or coordinate in format cZlongitude,latitude.

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

    A customizable set of options

Options Hash (options):

  • :pg (Integer)

    The requested page. Default 1. Max 50.

  • :lang (String)

    en - English (default), fr - French

  • :pgLen (Integer)

    Number of results per page. Default 40. Max 100.

  • :sflag (String)

    Search flags. bn - what is a business name, fto - results have photos, vdo - results have videos

Returns:

  • (Hash)

See Also:



24
25
26
27
28
29
# File 'lib/yellow_api/client/find_business.rb', line 24

def find_business(what, where, options={})
  options[:what] = what
  options[:where] = where
  
  get('/FindBusiness/', options)
end