Giter Club home page Giter Club logo

aubergine's Introduction

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.

aubergine's People

Contributors

tomj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

gitter-badger

aubergine's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.