Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 28 lines (18 sloc) 0.792 kB
45fde5e @johnfn Code much nicer\! No more format_url functions :D
johnfn authored
1 from generic_api import *
2
3 # Simple Python wrapper around the License View API provided by the FCC.
4
5 # The main License View API class. Exposes several API calls as
6 # functions.
7
8 class LicenseViewAPI:
9 def __init__(self):
97ab35c @johnfn Error checking is a little more robust
johnfn authored
10 self.get_license_api = BaseAPIRequest("http://data.fcc.gov/api/license-view/basicSearch/getLicenses")
11 self.get_license_api = BaseAPIRequest("http://data.fcc.gov/api/license-view/basicSearch/getLicenses")
12
13
14
45fde5e @johnfn Code much nicer\! No more format_url functions :D
johnfn authored
15
16 # Example usage:
17 #
18 # get_licenses(search_value = "Verizon Wireless")
19
20 def get_licenses(self, **kwargs):
21 self.get_license_api.format_url(**kwargs)
22 return self.get_license_api.request(**kwargs)
23
24
25 # Sample use of BlockConversionAPI
26 if __name__ == "__main__":
27 bc = LicenseViewAPI()
97ab35c @johnfn Error checking is a little more robust
johnfn authored
28 print bc.get_licenses(searchValue = "Verizon Wireless")
Something went wrong with that request. Please try again.