Module: NYCGeoClient::Client::Address

Included in:
NYCGeoClient::Client
Defined in:
lib/nyc_geo_client/client/address.rb

Overview

Defines methods related to branches

Instance Method Summary collapse

Instance Method Details

#address(house_number:, street:, borough: nil, zip: nil) ⇒ Hashie::Mash

Returns block and property level information about an address.

Results will include X/Y coordinates, political, city service and property information as well as normalized street names and codes.

Examples:

block and property level information about an address

NYCGeoClient.address('13', 'crosby', 'manhattan')

Parameters:

  • house_number (String)

    The house number portion of the address

  • street (String)

    The street portion of the address

  • borough (String) (defaults to: nil)

    The borough in which the address is located

Returns:

  • (Hashie::Mash)


18
19
20
21
22
23
24
25
26
# File 'lib/nyc_geo_client/client/address.rb', line 18

def address(house_number:, street:, borough: nil, zip: nil)
  options = {
    houseNumber: house_number,
    street: street,
    borough: borough,
    zip: zip
  }.reject { |k, v| v.nil? }
  get(address_path, options)
end