Class: FccApi::CensusBlock
- Inherits:
-
Object
- Object
- FccApi::CensusBlock
- Defined in:
- lib/fcc_api.rb
Instance Method Summary collapse
- #get(lat, lon) ⇒ Object
- #get_all(lat, lon) ⇒ Object
-
#initialize ⇒ CensusBlock
constructor
A new instance of CensusBlock.
Constructor Details
#initialize ⇒ CensusBlock
Returns a new instance of CensusBlock.
10 11 12 |
# File 'lib/fcc_api.rb', line 10 def initialize @base_uri = "https://geo.fcc.gov/api/census/" end |
Instance Method Details
#get(lat, lon) ⇒ Object
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/fcc_api.rb', line 25 def get(lat, lon) request ={ "format" => "json", "latitude" => lat, "longitude" => lon, "showall" => "false" } make_http_call(request, "block/find") end |
#get_all(lat, lon) ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/fcc_api.rb', line 14 def get_all(lat, lon) request ={ "format" => "json", "latitude" => lat, "longitude" => lon, "showall" => "true" } make_http_call(request, "block/find") end |