Latest | 0.0.2 |
---|---|
Homepage | https://github.com/pj4533/AFCensusAPIClient |
License | MIT |
Platforms | ios 5.0, requires ARC |
Dependencies | AFFCCAPIClient |
Authors |
An AFHTTPClient subclass for the Census API.
Instructions
Install
Available on CocoaPods, simply add to your Podfile:
pod 'AFCensusAPIClient'
then do a ‘pod install’
Code
Go to the above link to get your census API key.
AFCensusAPIClient* censusClient = [[AFCensusAPIClient alloc] initWithAPIKey:@"YOUR CENSUS KEY HERE"];
[censusClient getMetric:kCensusMetric_OwnerOccupiedHousing
withLat:@"42.343653"
withLng:@"-71.097701"
success:^(AFHTTPRequestOperation *operation, id responseObject) {
NSLog(@"Lower Value Owner Occupied Housing: %@", responseObject[kCensusMetric_LowerValueForOwnerOccupiedHousing]);
NSLog(@"Median Value Owner Occupied Housing: %@", responseObject[kCensusMetric_MedianValueForOwnerOccupiedHousing]);
NSLog(@"Upper Value Owner Occupied Housing: %@", responseObject[kCensusMetric_UpperValueForOwnerOccupiedHousing]);
} failure:nil];
Supported Metrics
Supported metrics using constants is limited right now, but you can always update this repo, or pass in the codes directly. As built-in constants:
- kCensusMetric_LowerValueForOwnerOccupiedHousing
- kCensusMetric_MedianValueForOwnerOccupiedHousing
- kCensusMetric_UpperValueForOwnerOccupiedHousing
- kCensusMetric_MedianHouseholdIncome
Contact
PJ Gray
License
AFCensusAPIClient is available under the MIT license. See the LICENSE file for more info.
Latest podspec
{ "name": "AFCensusAPIClient", "version": "0.0.2", "summary": "AFHTTPClient subclass for the Census API.", "homepage": "https://github.com/pj4533/AFCensusAPIClient", "license": { "type": "MIT", "file": "LICENSE" }, "authors": { "PJ Gray": "[email protected]" }, "source": { "git": "https://github.com/pj4533/AFCensusAPIClient.git", "tag": "0.0.2" }, "platforms": { "ios": "5.0" }, "source_files": "AFCensusAPIClient", "requires_arc": true, "dependencies": { "AFFCCAPIClient": [ "> 0.0.1" ] } }
Sat, 27 Feb 2016 14:17:03 +0000