Aubergine is an iOS SDK for the Uber API.
Aubergine uses the Mantle framework for JSON serialization in conjunction with AFNetworking. Feel free to submit PR's and we'd love to hear if you're using it in your own project.
Aubergine is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "Aubergine"
To run the example project, clone the repo, and run pod install
from the Example directory first.
To run Aubergine in your own app, in your app's info.plist file add a row with "AUBRequestManagerServerTokenKey" and the value of your Uber API server token and then get started making Uber requests.
#import <Aubergine/Aubergine.h>
AUBRequestManager *manager = [AUBRequestManager sharedInstance];
CLLocationCoordinate2D location = CLLocationCoordinate2DMake(40.7356, -73.9906);
[manager getProductsForLocation:location success:^(NSArray *result) {
NSLog(@"%@", result);
} failure:^(NSError *error) {
NSLog(@"%@", error);
}];
Alternatively you can create your own instances of AUBRequestManager
and set the server token directly for each manager
AUBRequestManager *manager = [[AUBRequestManager alloc] initWithServerToken:@"YOUR_SERVER_TOKEN"];
CLLocationCoordinate2D location = CLLocationCoordinate2DMake(40.7356, -73.9906);
[manager getProductsForLocation:location success:^(NSArray *result) {
NSLog(@"%@", result);
} failure:^(NSError *error) {
NSLog(@"%@", error);
}];
iOS 6+
Tom Jowett, @tjrebase
Aubergine is available under the MIT license. See the LICENSE file for more info.