An iOS SDK for the Uber API
Objective-C Ruby
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Aubergine
Example
.gitignore
.travis.yml
Aubergine.podspec
Gemfile
Gemfile.lock
LICENSE
README.md

README.md

Aubergine

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.

Build Status Version License Platform

Installation

Aubergine is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "Aubergine"

Usage

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);
}];

Requirements

iOS 6+

Author

Tom Jowett, @tjrebase

License

Aubergine is available under the MIT license. See the LICENSE file for more info.