https://github.com/mipmip/eokit
EOKit is an Exact Online client library for iOS and OSX
https://github.com/mipmip/eokit
eolibs exact-online ios macos objective-c
Last synced: about 1 year ago
JSON representation
EOKit is an Exact Online client library for iOS and OSX
- Host: GitHub
- URL: https://github.com/mipmip/eokit
- Owner: mipmip
- License: mit
- Created: 2015-12-23T11:20:26.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-11-29T08:30:29.000Z (over 3 years ago)
- Last Synced: 2025-04-01T04:32:43.649Z (about 1 year ago)
- Topics: eolibs, exact-online, ios, macos, objective-c
- Language: Objective-C
- Homepage:
- Size: 252 KB
- Stars: 4
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# EOKit
[](https://travis-ci.org/Pim Snel/EOKit)
[](http://cocoapods.org/pods/EOKit)
[](http://cocoapods.org/pods/EOKit)
[](http://cocoapods.org/pods/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.
# About Exact Online
[Exact Online](http://www.exactonline.com/) 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](http://www.exactonline.com/), [API Documentation](https://developers.exactonline.com/).
# Features
- Authorization & Token refreshing
- REST API access
- iOS and Mac OS X support
- Cocoapod specfile
## Installation
EOKit is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:
```ruby
# No podspec is published right now, so use the git url as pod source
pod 'EOKit', :git => 'https://github.com/Lingewoud/EOKit.git'
```
# Sample Applications
Please check the sample applications for real life usage.
- [EOKit iOS Sample App](https://github.com/mipmip/EOKit-iOS-Sample-App)
- [EOKit OSX Sample App](https://github.com/mipmip/EOKit-OSX-Sample-App)
# Sample
Authorization
```objc
[[EOAPIProvider providerWithClientId:clientId secret:secret] authorizeWithCallbackURL:callbackURL completion:^(NSError *error) {
if (!error) {
// ...
} else {
// handle error
NSLog(@"error == %@", error);
}
}];
```
Request an API
```objc
[[EOAPIProvider anyProvider] restGetAPI:@"current/Me" completion:^(NSArray *results, NSError *error) {
if (!error) {
[self requestAccounts];
} else {
[self handleError:error];
}
}];
```
# Notes
## OData
Use `odataParams` parameter in methods, see sample for more details. We don't see any reason for real OData implementation now, `NSDictionary` is enough.
## Division
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).
## Paging
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:
``` objc
- (NSOperation *)restGetAPI:(NSString *)apiName division:(NSString *)division odataParams:(NSDictionary *)odataParams grabAllItems:(BOOL)grabAllItems completion:(EOAPICompletion)completion;
```
## License
EOKit is available under the MIT license. See the LICENSE file for more info.
Development sponsored by [Lingewoud BV](http://lingewoud.com)