Latest 0.1.6
Homepage https://github.com/creatubbles/ctb-api-swift
License MIT
Platforms ios 8.0

CreatubblesAPIClient

Version
License
Platform

Creatubbles API Client

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.

Author

Creatubbles

Dependencies

Installation

CreatubblesAPIClient is available through CocoaPods. To install
it, simply add the following line to your Podfile:

use_frameworks!

pod 'CreatubblesAPIClient'

Usage (Swift)

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!")
  }
}

Usage (Objective-C)

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!");
  }
}];

Objective-C API Client

Feel free to use our own CTAPIClient wrapper for your Objective-C projects. You can check it out here

Contact

In order to receive your AppId and AppSecret please contact us at [email protected].

License

CreatubblesAPIClient is available under the MIT license.

Latest podspec

{
    "name": "CreatubblesAPIClient",
    "version": "0.1.6",
    "summary": "A Creatubbles api framework pod.",
    "description": "Api framework for Creatubbles app. Sets up a secure connection etc.",
    "homepage": "https://github.com/creatubbles/ctb-api-swift",
    "license": {
        "type": "MIT",
        "file": "LICENSE.md"
    },
    "authors": "Creatubbles",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/creatubbles/ctb-api-swift.git",
        "tag": "0.1.6"
    },
    "source_files": [
        "CreatubblesAPIClient/**/*.{swift}",
        "CreatubblesAPIClient/**/*.{h,m}"
    ],
    "exclude_files": "Classes/Exclude",
    "ios": {
        "dependencies": {
            "p2.OAuth2": [
                "~> 2.2"
            ],
            "Alamofire": [
                "~> 3.0"
            ],
            "ObjectMapper": [
                "~> 1.1"
            ],
            "XCGLogger": [
                "~> 3.2"
            ],
            "RealmSwift": [
                "0.98.3"
            ]
        }
    }
}

Pin It on Pinterest

Share This