Module: BroadbandMap::Client::Geography
- Included in:
- BroadbandMap::Client
- Defined in:
- lib/broadband_map/client/geography.rb
Instance Method Summary collapse
-
#geography_id(params = {}, options = {}) ⇒ Hash
Returns a geography of a specified geography type by the geography id.
-
#geography_type(params = {}, options = {}) ⇒ Hash
Returns all geographies of a specified geography type.
-
#geography_type_name(params = {}, options = {}) ⇒ Hash
Returns geographies by name of a specific geography type.
-
#geography_type_name_state(params = {}, options = {}) ⇒ Hash
Returns geographies by name of a specific geography type within a state.
-
#geography_type_state(params = {}, options = {}) ⇒ Hash
Returns all geographies of specific geography type within a state.
Instance Method Details
#geography_id(params = {}, options = {}) ⇒ Hash
Returns a geography of a specified geography type by the geography id.
13 14 15 16 |
# File 'lib/broadband_map/client/geography.rb', line 13 def geography_id(params={}, ={}) params = {:format => 'json'}.merge(params) get("geography/#{params[:geography_type]}/id/#{params[:geography_id]}?format=#{params[:format]}&callback=#{params[:callback]}") end |
#geography_type(params = {}, options = {}) ⇒ Hash
Returns all geographies of a specified geography type.
26 27 28 29 |
# File 'lib/broadband_map/client/geography.rb', line 26 def geography_type(params={}, ={}) params = {:format => 'json', :max_results => 100}.merge(params) get("geography/#{params[:geography_type]}?format=#{params[:format]}&maxresults=#{params[:max_results]}&all=#{params[:all]}&callback=#{params[:callback]}") end |
#geography_type_name(params = {}, options = {}) ⇒ Hash
Returns geographies by name of a specific geography type.
39 40 41 42 |
# File 'lib/broadband_map/client/geography.rb', line 39 def geography_type_name(params={}, ={}) params = {:format => 'json', :max_results => 100}.merge(params) get("geography/#{params[:geography_type]}/name/#{params[:geography_name]}?format=#{params[:format]}&maxresults=#{params[:max_results]}&all=#{params[:all]}&callback=#{params[:callback]}") end |
#geography_type_name_state(params = {}, options = {}) ⇒ Hash
Returns geographies by name of a specific geography type within a state.
65 66 67 68 |
# File 'lib/broadband_map/client/geography.rb', line 65 def geography_type_name_state(params={}, ={}) params = {:format => 'json', :max_results => 100}.merge(params) get("geography/state/#{params[:state_fips]}/#{params[:geography_type]}/name/#{params[:geography_name]}?format=#{params[:format]}&maxresults=#{params[:max_results]}&all=#{params[:all]}&callback=#{params[:callback]}") end |
#geography_type_state(params = {}, options = {}) ⇒ Hash
Returns all geographies of specific geography type within a state.
52 53 54 55 |
# File 'lib/broadband_map/client/geography.rb', line 52 def geography_type_state(params={}, ={}) params = {:format => 'json', :max_results => 100}.merge(params) get("geography/state/#{params[:state_fips]}/#{params[:geography_type]}?format=#{params[:format]}&maxresults=#{params[:max_results]}&all=#{params[:all]}&callback=#{params[:callback]}") end |