Module: BroadbandMap::Client::SpeedTest
- Included in:
- BroadbandMap::Client
- Defined in:
- lib/broadband_map/client/speed_test.rb
Instance Method Summary collapse
-
#speed_test_geo_type_id(params = {}, options = {}) ⇒ Hash
Returns the speed test results for a particular geography type (e.g., state, congressional district) and geography ID.
-
#speed_test_geo_type_name(params = {}, options = {}) ⇒ Hash
Returns the speed test results for a particular geography type (e.g., state, congressional district) and geography name (e.g., Virginia).
-
#speed_test_nation(params = {}, options = {}) ⇒ Hash
Returns all the speed test results for the entire United States.
-
#speed_test_quartile(params = {}, options = {}) ⇒ Hash
Returns the minimum and maximum quartile speeds by geography type within the nation.
Instance Method Details
#speed_test_geo_type_id(params = {}, options = {}) ⇒ Hash
Returns the speed test results for a particular geography type (e.g., state, congressional district) and geography ID.
13 14 15 16 17 18 19 |
# File 'lib/broadband_map/client/speed_test.rb', line 13 def speed_test_geo_type_id(params={}, ={}) params = {:format => 'json'}.merge(params) ids = "" params[:geography_ids].each {|x| ids += x +","} ids.chop! get("speedtest/#{params[:geography_type]}/ids/#{ids}?format=#{params[:format]}&speedtesttype=#{params[:speed_test_type]}&callback=#{params[:callback]}") end |
#speed_test_geo_type_name(params = {}, options = {}) ⇒ Hash
Returns the speed test results for a particular geography type (e.g., state, congressional district) and geography name (e.g., Virginia).
29 30 31 32 33 34 35 |
# File 'lib/broadband_map/client/speed_test.rb', line 29 def speed_test_geo_type_name(params={}, ={}) params = {:format => 'json'}.merge(params) names = "" params[:geography_names].each {|x| names += x +","} names.chop! get("speedtest/#{params[:geography_type]}/names/#{names}?format=#{params[:format]}&speedtesttype=#{params[:speed_test_type]}&callback=#{params[:callback]}") end |
#speed_test_nation(params = {}, options = {}) ⇒ Hash
Returns all the speed test results for the entire United States.
58 59 60 61 |
# File 'lib/broadband_map/client/speed_test.rb', line 58 def speed_test_nation(params={}, ={}) params = {:format => 'json'}.merge(params) get("speedtest/nation?format=#{params[:format]}&speedtesttype=#{params[:speed_test_type]}&callback=#{params[:callback]}") end |
#speed_test_quartile(params = {}, options = {}) ⇒ Hash
Returns the minimum and maximum quartile speeds by geography type within the nation.
45 46 47 48 |
# File 'lib/broadband_map/client/speed_test.rb', line 45 def speed_test_quartile(params={}, ={}) params = {:format => 'json'}.merge(params) get("speedtest/#{params[:geography_type]}/quartile?format=#{params[:format]}&speedtesttype=#{params[:speed_test_type]}&callback=#{params[:callback]}") end |