[![CI Status](http://img.shields.io/travis/Pim Snel/EOKit.svg?style=flat)](https://travis-ci.org/Pim Snel/EOKit)
EOKit is an Exact Online client library for iOS and OSX. All Apple Platfoms will be supported in the future.
EOKit is a fork of https://github.com/moqod/Exact-Online-iOS-SDK. We started this rewrite to support OSX and IOS and to make this project more usable by adding a pod file.
Exact Online is the business software that automates your manufacturing, logistics and CRM in the cloud.
This Objective-C SDK provides easy access to Exact Online API for iOS apps. More information about Exact Online, API Documentation.
- Authorization & Token refreshing
- REST API access
- iOS and Mac OS X support
- Cocoapod specfile
EOKit is available through CocoaPods. To install it, simply add the following line to your Podfile:
# No podspec is published right now, so use the git url as pod source
pod 'EOKit', :git => 'https://github.com/Lingewoud/EOKit.git'
Please check the sample applications for real life usage.
Authorization
[[EOAPIProvider providerWithClientId:clientId secret:secret] authorizeWithCallbackURL:callbackURL completion:^(NSError *error) {
if (!error) {
// ...
} else {
// handle error
NSLog(@"error == %@", error);
}
}];
Request an API
[[EOAPIProvider anyProvider] restGetAPI:@"current/Me" completion:^(NSArray *results, NSError *error) {
if (!error) {
[self requestAccounts];
} else {
[self handleError:error];
}
}];
Use odataParams
parameter in methods, see sample for more details. We don't see any reason for real OData implementation now, NSDictionary
is enough.
Almost all API methods require division
parameter. EOAPIProvider
has property currentDivision
, this property is setup automatically after requesting current/Me
API method, also it is possible to setup any value you want (if you need to support multiple accounts).
Exact Online API Documentaion: All CRUD services have a limition of maximum 60 records within one API request. The READ services will soon have a similar limitation.
If you need all items with one line of code then you could use grabAllItems
parameter in method:
- (NSOperation *)restGetAPI:(NSString *)apiName division:(NSString *)division odataParams:(NSDictionary *)odataParams grabAllItems:(BOOL)grabAllItems completion:(EOAPICompletion)completion;
EOKit is available under the MIT license. See the LICENSE file for more info.
Development sponsored by Lingewoud BV