Module: FccReboot::Client::Api

Included in:
FccReboot::Client
Defined in:
lib/fcc_reboot/client/api.rb

Instance Method Summary collapse

Instance Method Details

#broadband_test(options = {}) ⇒ Array

speed test statistics for a US County given the passed Latitude and Longitude

Examples:

Provide speed test statistics for a US County given the passed Latitude and Longitude

FccReboot.broadband_test(:latitude => '38.0', :longitude => '-77.5')

Parameters:

  • options (Hash) (defaults to: {})

    A customizable set of options.

Returns:

  • (Array)

See Also:



16
17
18
19
20
# File 'lib/fcc_reboot/client/api.rb', line 16

def broadband_test(options={})
  options.merge!({:format => "json"})                
  response = get('speedtest/find', options)
  JSON.parse(response)["SpeedTestCounty"]
end

#find_census_block(options = {}) ⇒ Hash

This API returns the US Census Bureau Census Block number (aka the 15 character FIPS Code) given a passed Latitude and Longitude. The API also returns the US State and County name associated with the Block.

Examples:

Provide census block info for the given latitude and longitude

FccReboot.find_census_block({:latitude => '38.0', :longitude => '-77.5'})

Parameters:

  • options (Hash) (defaults to: {})

    A customizable set of options.

Returns:

  • (Hash)

See Also:



33
34
35
36
37
# File 'lib/fcc_reboot/client/api.rb', line 33

def find_census_block(options={})
  options.merge!({:format => "json"})
  response = get('block/find', options)
  JSON.parse(response)
end

#frn_getinfo(options = {}) ⇒ Hash

This API returns information about a provider by FRN number.

Examples:

Provide FRN info for Cygnus Telecommunications Corporation (FRN number 0017855545)

FccReboot.frn_getinfo(:frn => '0017855545')

Parameters:

  • options (Hash) (defaults to: {})

    A customizable set of options.

Returns:

  • (Hash)

See Also:



65
66
67
68
69
# File 'lib/fcc_reboot/client/api.rb', line 65

def frn_getinfo(options={})
  options.merge!({:format => "json"})
  response = get('frn/getInfo', options)
  JSON.parse(response)
end

#frn_getlist(options = {}) ⇒ Hash

This API returns returns all the broadband providers in a given state, where those operators or do not operate in multiple states.

Examples:

Provide FRN list for the state of Illinois

FccReboot.frn_getlist({:stateCode => 'IL', :multi => 'No'})

Parameters:

  • options (Hash) (defaults to: {})

    A customizable set of options.

Returns:

  • (Hash)

See Also:



49
50
51
52
53
54
# File 'lib/fcc_reboot/client/api.rb', line 49

def frn_getlist(options={})
  options[:multi] = options[:multi] ? "Yes" : "No"
  options.merge!({:format => "json"})
  response = get('frn/getList', options)
  JSON.parse(response)
end

#get_categories(options = {}) ⇒ Array

Examples:

Returns the counts and percent distribution of active licenses by category

FccReboot.get_categories()

Parameters:

  • options (Hash) (defaults to: {})

    A customizable set of options:

Returns:

  • (Array)

See Also:



226
227
228
229
230
# File 'lib/fcc_reboot/client/api.rb', line 226

def get_categories(options={})
  options.merge!({:format => "json"})
  response = get('license-view/licenses/getCategories', options)
  JSON.parse(response)["Stats"]["Stat"]
end

#get_common_names(options = {}) ⇒ Array

This API returns a list of currently known licensee names associated with a common name. commonName (Optional) limit (Optional) – Number of request rows

Examples:

Returns a list of currently known licensee names associated with a common name.

FccReboot.get_common_names(:commonName => 'Sprint Nextel')

Parameters:

  • options (Hash) (defaults to: {})

    A customizable set of options:

Returns:

  • (Array)

See Also:



149
150
151
152
153
# File 'lib/fcc_reboot/client/api.rb', line 149

def get_common_names(options={})
  options.merge!({:format => "json"})        
  response = get('license-view/licenses/getCommonNames', options)
  JSON.parse(response)['Stats']['Stat']
end

#get_entities(options = {}) ⇒ Array

Examples:

Returns the counts and percent distribution of active licenses by entity type

FccReboot.get_renewals()

Parameters:

  • options (Hash) (defaults to: {})

    A customizable set of options:

Returns:

  • (Array)

See Also:



211
212
213
214
215
# File 'lib/fcc_reboot/client/api.rb', line 211

def get_entities(options={})
  options.merge!({:format => "json"})
  response = get('license-view/licenses/getEntities', options)
  JSON.parse(response)["Stats"]["Stat"]
end

#get_issued(options = {}) ⇒ Array

This API returns the number of licenses that were issued by the Commission on a yearly basis. The data returned includes the year and the total number of licenses issued. commonName - Name of the coporation

Examples:

Provide number of licenses that were issued by the Commission on a yearly basis

FccReboot.get_issued(:commonName=> 'Sprint Nextel')

Parameters:

  • options (Hash) (defaults to: {})

    A customizable set of options:

Returns:

  • (Array)

See Also:



181
182
183
184
185
# File 'lib/fcc_reboot/client/api.rb', line 181

def get_issued(options={})
  options.merge!({:format => "json"})
  response = get('license-view/licenses/getIssued', options)
  JSON.parse(response)["Stats"]["Stat"]
end

#get_licenses(options = {}) ⇒ Array

his API returns high level license information including name, FRN, call sign, category, service, status, expiration date and license id, based on the search criteria passed. searchValue (Required) pageNum (Optional) – Default is 1. sortColumn (Optional) – Default is licName. Valid values are: licName, frn, callsign, service, status, expdate sortOrder (Optional) – Default is asc. Valid values are: asc, desc pageSize (Optional) – Default is 100.

Examples:

Provide number of licenses that were issued by the Commission on a yearly basis

FccReboot.get_licenses(:searchValue => 'Verizon Wireless')

Parameters:

  • options (Hash) (defaults to: {})

    A customizable set of options:

Returns:

  • (Array)

See Also:



133
134
135
136
137
# File 'lib/fcc_reboot/client/api.rb', line 133

def get_licenses(options={})
  options.merge!({:format => "json"})        
  response = get('license-view/basicSearch/getLicenses', options)
  JSON.parse(response)["Licenses"]["License"]
end

#get_renewals(options = {}) ⇒ Array

commonName - Name of the coporation

Examples:

Returns the number of licenses up for renewal in a given month. The API returns 12 months worth of data for Sprint Nextel.

FccReboot.get_renewals(:commonName=> 'Sprint Nextel')

Parameters:

  • options (Hash) (defaults to: {})

    A customizable set of options:

Returns:

  • (Array)

See Also:



196
197
198
199
200
# File 'lib/fcc_reboot/client/api.rb', line 196

def get_renewals(options={})
  options.merge!({:format => "json"})
  response = get('license-view/licenses/getRenewals', options)
  JSON.parse(response)["Stats"]["Stat"]
end

#get_spectrum_bands(options = {}) ⇒ Array

This API accepts a frequency range and returns a list of the frequency bands along with a high level description of how the band is allocated and for what uses within the 225 MHz and 3700 MHz frequency range. frequencyFrom (Optional) – If a frequency range is not provided then the API will return all spectrum bands falling within the 225 to 3700 MHz range. Both a lower and upper frequency value must be provided when entering search criteria. frequencyTo (Optional) – If a frequency range is not provided then the API will return all spectrum bands falling within the 225 to 3700 MHz range. Both a lower and upper frequency value must be provided when entering search criteria. pageNum (Optional) – Default is 1. sortColumn (Optional) – Default is lowerBand. Valid values are: lowerBand, upperBand, or desc. sortOrder (Optional) – Default is asc. Valid values are: asc, desc. pageSize (Optional) – Default value is 1000. limit (Optional) – Default value is 100. format (Optional) – Default value is xml. Valid values are: xml, json, jsonp jsonCallback (Optional) – Default value is callback.

Examples:

Returns a list of the frequency bands

FccReboot.get_spectrum_bands(:frequencyFrom=>'226', :frequencyTo => '900')

Parameters:

  • options (Hash) (defaults to: {})

    A customizable set of options:

Returns:

  • (Array)

See Also:



89
90
91
92
93
# File 'lib/fcc_reboot/client/api.rb', line 89

def get_spectrum_bands(options={})
  options.merge!({:format => "json"})          
  response = get('spectrum-view/services/advancedSearch/getSpectrumBands', options)      
  JSON.parse(response)["SpectrumBands"]["SpectrumBand"]        
end

#get_spectrum_licenses(options = {}) ⇒ Array

This API returns a high level overview of who owns spectrum across the country within the 225 MHz to 3700 MHz frequency range in radio services deemed appropriate for mobile broadband use. frequencyFrom (Optional) – If a frequency range is not provided then the API will return all spectrum bands falling within the 225 to 3700 MHz range. Both a lower and upper frequency value must be provided when entering search criteria. frequencyTo (Optional) – If a frequency range is not provided then the API will return all spectrum bands falling within the 225 to 3700 MHz range. Both a lower and upper frequency value must be provided when entering search criteria. pageNum (Optional) – Default is 1. sortColumn (Optional) – Default is lowerBand. Valid values are: lowerBand, upperBand, or desc. sortOrder (Optional) – Default is asc. Valid values are: asc, desc. pageSize (Optional) – Default value is 1000. limit (Optional) – Default value is 100. format (Optional) – Default value is xml. Valid values are: xml, json, jsonp

Examples:

Provide high level overview of who owns spectrum across the country within the 225 MHz to 3700 MHz frequency

FccReboot.get_license(:name=> 'AT', :radioservice=>'Cellular')

Parameters:

  • options (Hash) (defaults to: {})

    A customizable set of options:

Returns:

  • (Array)

See Also:



113
114
115
116
117
# File 'lib/fcc_reboot/client/api.rb', line 113

def get_spectrum_licenses(options={})
  options.merge!({:format => "json"})
  response = get('spectrum-view/services/advancedSearch/getLicenses', options)
  JSON.parse(response)["Licenses"]["License"]        
end

#get_statuses(options = {}) ⇒ Array

This API returns the license counts and percent distribution by status. commonName (Optional) limit (Optional) – Number of request rows

Examples:

Returns the license counts and percent distribution by status.

FccReboot.get_statuses(:commonName => 'Sprint Nextel')

Parameters:

  • options (Hash) (defaults to: {})

    A customizable set of options:

Returns:

  • (Array)

See Also:



165
166
167
168
169
# File 'lib/fcc_reboot/client/api.rb', line 165

def get_statuses(options={})
  options.merge!({:format => "json"})        
  response = get('license-view/licenses/getStatuses', options)
  JSON.parse(response)['Stats']['Stat']
end