Class: GdsApi::Mapit
Defined Under Namespace
Classes: Location
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #area_for_code(code_type, code) ⇒ Object
- #areas_for_type(type) ⇒ Object
- #location_for_postcode(postcode) ⇒ Object
Methods inherited from Base
#client, #create_client, #get_list, #initialize, #url_for_slug
Constructor Details
This class inherits a constructor from GdsApi::Base
Instance Method Details
#area_for_code(code_type, code) ⇒ Object
14 15 16 |
# File 'lib/gds_api/mapit.rb', line 14 def area_for_code(code_type, code) get_json("#{base_url}/code/#{code_type}/#{code}.json") end |
#areas_for_type(type) ⇒ Object
10 11 12 |
# File 'lib/gds_api/mapit.rb', line 10 def areas_for_type(type) get_json("#{base_url}/areas/#{type}.json") end |