Class: GeoNamesAPI::PostalCode
Constant Summary
collapse
- METHOD =
"postalCodeLookupJSON"
- FIND_PARAMS =
%w(postalcode country)
Instance Attribute Summary
Attributes inherited from Entity
#request_params
Instance Method Summary
collapse
endpoint_returns_list?, #next_page, #to_page
Methods inherited from Base
all, find, where
Methods inherited from Entity
#create_attribute, #initialize, #marshal_dump, #marshal_load, #parse_attr, #parse_response, #set_default_type
Instance Method Details
#city ⇒ Object
7
8
9
|
# File 'lib/geonames_api/postal_code.rb', line 7
def city
place_name
end
|
#nearby_codes(radius = 10, maxRows = 5) ⇒ Object
19
20
21
|
# File 'lib/geonames_api/postal_code.rb', line 19
def nearby_codes(radius=10, maxRows=5)
NearbyPostalCode.all(postalcode, country_code, radius, maxRows)
end
|
#state ⇒ Object
11
12
13
|
# File 'lib/geonames_api/postal_code.rb', line 11
def state
admin_name1
end
|
#state_short ⇒ Object
15
16
17
|
# File 'lib/geonames_api/postal_code.rb', line 15
def state_short
admin_code1
end
|