Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 93 lines (70 sloc) 4.62 kb
ab8806e @adamkaplan Added README
adamkaplan authored
1 Gilt API SDK for iOS
2 ====================
3
4 This SDK provides wraps the Gilt Groupe public developer API. Our goal is to abstract the low level API details and nuances so that you can concentrate on creating awesome apps with our data!
5
6 The API Token
7 -------------
8 ### Obtaining An Token ###
9 A free API token is required to use the API. Register for one at (https://dev.gilt.com/user/register)
10
11 Installation
12 ------------
13 ### Prerequisites ###
29378de @adamkaplan Readme fixes
adamkaplan authored
14 - [Xcode 4](http://developer.apple.com/devcenter/ios/index.action)
15 - [Git](http://git-scm.com/)
16 - Mac OSX Snow Leopard or newer
ab8806e @adamkaplan Added README
adamkaplan authored
17 - The SDK
18 - Grab the source with `git clone git@github.com:gilt/gilt-ios-sdk.git`
19 - Just the static library [here](https://github.com/gilt/gilt-ios-sdk/downloads)
20
21 ### Setting Up Your Project
22 Open Xcode and create a new project using one of the iOS application project templates.
23
24 In other to use the SDK, you will need to add it to your project. This can be easily accomplished in a few different ways:
25 - Drag the `gilt-ios-sdk/ApiLib/ApiLib` folder into your project (this will compile the entire library)
26 - Create a new workspace. Add your project and the XCode project under gilt-ios-sdk/ApiLib
27 - Drag the two precompiled static libraries into the `frameworks` folder of your project and add them to the `Linked Libraries` setting of your build target
28
29 ### Storing Your Token ###
30 Integrating an API token can be done in three ways:
31
32 - Info.plist - Add the token as a `string` value with the key name `GiltApiKey` to your project's `Info.plist` file.
33 - GiltApi.plist - Add the token to a new property list file named `GiltApi.plist` in your project's main bundle.
34 - Programatically - Set the API token at runtime like this `[GiltApi sharedInstance].apiKey = @"YOUR KEY";` before using the GiltApi methods.
35
36 ### Modifying The Application Delegate ###
37 1. Import the SDK classes<br/>
38 Add the following line to the top of your application delegate source file (MyAppDelegate.m)
39
a6fa9d9 @adamkaplan Finally got smart and installed redcarpet to test the README markup. 4 s...
adamkaplan authored
40 #import "GiltApi.h"
ab8806e @adamkaplan Added README
adamkaplan authored
41
42 2. Retrieve a list of sales<br/>
43
a6fa9d9 @adamkaplan Finally got smart and installed redcarpet to test the README markup. 4 s...
adamkaplan authored
44 NSError *error = nil;
45 NSArray *sales = [GiltSalesClient fetchSynchronousForStore:GiltEveryStore upcomingSales:YES timeout:30.0 error:&error];
46 if (!error) {
47 for (GiltSale *sale in sales) {
48 NSLog("Got sale [%@] with %d products.", sale.name, [sale.products count]);
49 }
50 }
51 else {
52 NSLog("An error has occurred %@", error);
53 }
ab8806e @adamkaplan Added README
adamkaplan authored
54
55 3. Check out the demo app for comprehensive examples!
56
57 4. Create something really cool
58
59 5. Tell us about your project
60
61 Demo App
62 --------
63 The SDK source includes a comprehensive iOS demo application that emulates a complete shopping experience. This app is demonstrates how to obtain and display a display a list of sales grouped by store, display products in a specific sale, and display product details including "view on Gilt" referral links. Copying from this project is encouraged in the hope that it may take some tedious work off your plate.
64
65 ### Running The Demo ###
66 - Add your API token to `~/gilt-ios-sdk/KitchenSink/KitchenSink/GiltApi.plist`.
67 - Open the project `open ~/gilt-ios-sdk/KitchenSink/KitchenSink.xcodeproj`.
68 - Choose "Kitchen Sink \[Debug\] iPhone Simator" from the build scheme list.
69 - Press Command+R to build & run the project.
70
71 Gilt API Details & Developer Program
72 ------------------------------------
73 Additional details about the Gilt API, Developer Program and other SDKs can be found at the [Gilt Groupe Developer Center](https://dev.gilt.com/).
74
75 Be sure to check out Gilt Groupe's [other great public projects](https://github.com/gilt/) on GitHub.
76
77 Contributing
78 ------------
79 See a bug? Think you can do this better than us? Show us! Your contributions and feed back are always welcome.
29378de @adamkaplan Readme fixes
adamkaplan authored
80
ab8806e @adamkaplan Added README
adamkaplan authored
81 1. [Fork this repository](http://help.github.com/fork-a-repo/)
82 2. Make changes to your repository. Be sure to add/edit the tests if you change the ApiLib.
83 3. [Send us a pull request](http://help.github.com/send-pull-requests/) when you're satisfied with your changes
29378de @adamkaplan Readme fixes
adamkaplan authored
84 4. Follow [Adam Kaplan](https://github.com/users/follow?target=adamkaplan) and [Louis Vera](https://github.com/users/follow?target=louoso)
ab8806e @adamkaplan Added README
adamkaplan authored
85
86 Feedback
87 --------
88 There are several ways to get in touch with us. If you've found a bug, please [open an issue](https://github.com/gilt/gilt-ios-sdk/issues). It'd also be nice if you fixed the issue too, if you can. Alternatively, you can contact [@GiltTech on Twitter](http://www.twitter.com/gilttech).
89
90 License
91 --------
c3a9868 @adamkaplan Removed duplicate h-rules from README.md sections
adamkaplan authored
92 Except as otherwise noted, the Gilt iOS SDK is licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html)
Something went wrong with that request. Please try again.