Latest 0.1.0
Homepage https://github.com/TTMarshelDaniel/TCKit
License MIT
Platforms ios 8.0
Authors

CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Usage

GET

NSURL *url = [NSURL URLWithString:@""];
//
TCRequest *request = [TCRequest requestWithURL:url];
request[@"key1"] = @"value1";
request[@"key2"] = @"value2"; 
//
[request GET:^(TCObject *Object, NSError *error) {
    //
    if (!error) {
        NSLog(@"Object : %@", Object);
        //
        NSArray *userList = Object[@"user_list"].array;
        TCObject *firstUser = Object[@"user_list"][0].object;
        NSString *firstUsersName = Object[@"user_list"][0][@"name"].string; 
    } else {
        NSLog(@"error = %@", error);
    }
}];

POST

NSURL *url = [NSURL URLWithString:@""];
//
TCRequest *request = [TCRequest requestWithURL:url];
request[@"key1"] = @"value1";
request[@"key2"] = @"value2"; 
//
[request POST:^(TCObject *Object, NSError *error) {
    //
    if (!error) {
        NSLog(@"Object : %@", Object);
        //
        NSArray *userList = Object[@"user_list"].array;
        TCObject *firstUser = Object[@"user_list"][0].object;
        NSString *firstUsersName = Object[@"user_list"][0][@"name"].string; 
    } else {
        NSLog(@"error = %@", error);
    }
}];

Requirements

Installation

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

pod "TCKit"

Author

T T Marshel Daniel, [email protected]

License

TCKit is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "TCKit",
    "version": "0.1.0",
    "summary": "simple JSON Request and JSON Response with TCKit.",
    "homepage": "https://github.com/TTMarshelDaniel/TCKit",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "T T Marshel Daniel": "[email protected]"
    },
    "source": {
        "git": "https://github.com/TTMarshelDaniel/TCKit.git",
        "tag": "0.1.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "TCKit/Classes/**/*"
}

Pin It on Pinterest

Share This