Aubergine 0.0.5

Aubergine 0.0.5

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Apr 2015

Maintained by Tom Jowett.



 
Depends on:
AFNetworking~> 2.4
Mantle~> 1.5.4
 

Aubergine 0.0.5

  • By
  • Tom Jowett

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.

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.