Created
October 27, 2012 18:29
-
-
Save birarda/3965598 to your computer and use it in GitHub Desktop.
CPapi example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+ (void)getNearestVenuesWithCheckinsToCoordinate:(CLLocationCoordinate2D)coordinate | |
mapQueue:(NSOperationQueue *)mapQueue | |
completion:(void (^)(NSDictionary *, NSError *))completion | |
{ | |
// parameters for API call | |
// you could also send checked_in_since (timestamp) and limit (integer) to this call | |
// those default to 1 week ago and 25 | |
NSMutableDictionary *params = [NSMutableDictionary dictionary]; | |
[params setValue:[NSString stringWithFormat:@"%f", coordinate.latitude] forKey:@"lat"]; | |
[params setValue:[NSString stringWithFormat:@"%f", coordinate.longitude] forKey:@"lng"]; | |
[self makeHTTPRequestWithAction:@"getNearestVenuesAndUsersWithCheckinsDuringInterval" withParameters:params queue:mapQueue timeout:9 completion:completion]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment