TestsTested | ✓ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Mar 2016 |
SPMSupports SPM | ✗ |
Maintained by Creatubbles, JakubJankowski, Michal Miedlarz.
Depends on: | |
p2.OAuth2 | ~> 2.2 |
Alamofire | ~> 3.0 |
ObjectMapper | ~> 1.1 |
XCGLogger | ~> 3.2 |
RealmSwift | = 0.98.3 |
CreatubblesAPIClient is a simple library built to help you communicate with the latest Creatubbles API. It works with both Swift and Objective-C.
Please note, that library is still under heavy development, and interface may be slightly changed.
CreatubblesAPIClient is available through CocoaPods. To install it, simply add the following line to your Podfile:
use_frameworks!
pod 'CreatubblesAPIClient'
import CreatubblesAPIClient
let settings = CreatubblesAPIClientSettings(appId: "YOUR_APP_ID", appSecret: "YOUR_APP_SECRET")
let client = CreatubblesAPIClient(settings: settings)
client.login("username", password: "password")
{
(error) -> (Void) in
if error != nil
{
print("Wohoo! We're authorized!")
}
}
Use methods with _ prefix to communicate using Objective-C
import CreatubblesAPIClient;
CreatubblesAPIClientSettings *settings = [[CreatubblesAPIClientSettings alloc] initWithAppId:@"YOUR_APP_ID" appSecret:@"YOUR_APP_SECRET"];
CreatubblesAPIClient *client = [[CreatubblesAPIClient alloc] initWithSettings:settings];
[client _login:@"username" password:@"password" completion:
^(NSError* error)
{
if(!error)
{
NSLog(@"Wohoo! We're authorized from Objective-C code!");
}
}];
Feel free to use our own CTAPIClient wrapper for your Objective-C projects. You can check it out here
In order to receive your AppId and AppSecret please contact us at [email protected].
CreatubblesAPIClient is available under the MIT license.