Latest0.1.3
Homepagehttps://github.com/hernangonzalez/RestKit-InExtensions
LicenseMIT
Platformsios 6.0, requires ARC
DependenciesRestKit
Authors

RestKit Extensions Build Status

These categories are a set of extensions designed to help you get your networking code a bit more OOP.

Hope it helps ;)

Sample Plist

Screenshot

Sample Usage

Create your description file

Please look at the sample file.

Load the info

    // Load our mapping info.
    NSString* plistPath = [[NSBundle mainBundle] pathForResource:@"modelMapping" ofType:@"plist"];
    NSDictionary* dict  = [NSDictionary dictionaryWithContentsOfFile:plistPath];
    [objectManager loadMappingsFromDictionary:dict];

Get our objects

    // GET Objects
    RKTUserStatus* userStatus = [[RKTUserStatus alloc] init];
    [userStatus setUsername:@"RestKit"];
    [objectManager getObject:userStatus
                        path:nil
                  parameters:nil
                     success:successBlock
                     failure:errorBlock];

Post example

    // POST a tweet
    RKTweet* tweet = [_tweets lastObject];
    RKObjectManager *objectManager = [RKObjectManager sharedManager];
    [objectManager postObject:tweet
                         path:nil
                   parameters:nil
                      success:^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult) {
                      } failure:^(RKObjectRequestOperation *operation, NSError *error) {
                          // This will fail, it is only here
                          // to demonstrate that we can easily post an object
                          // and the reverse mapping is resolved by the extension.
                      }];

TODO

  • Add granularity to property mappings. (i.e. allow a param to be used inboud, and ignored on outbound)
  • Add routes option to escape arguments.
  • Support named routes.

License

This project is licensed under the terms of the MIT License. Please see the LICENSE file for full details.

Credits

RestKit-InExtensions is brought to you by the [Indeba Team] (http://www.indeba.com).

Latest podspec

{
    "name": "RestKit-InExtensions",
    "version": "0.1.3",
    "license": "MIT",
    "summary": "Helpers to use RestKit with less code.",
    "homepage": "https://github.com/hernangonzalez/RestKit-InExtensions",
    "authors": {
        "Hernan Gonzalez": "[email protected]"
    },
    "source": {
        "git": "https://github.com/hernangonzalez/RestKit-InExtensions.git",
        "tag": "v0.1.3"
    },
    "source_files": "RestkitExtensions/InExtensions/*",
    "requires_arc": true,
    "platforms": {
        "ios": "6.0"
    },
    "dependencies": {
        "RestKit": [
            "~> 0.22.0"
        ]
    },
    "ios": {
        "frameworks": [
            "MobileCoreServices",
            "SystemConfiguration"
        ]
    },
    "prefix_header_contents": [
        "#import ",
        "#import ",
        "#import "
    ]
}

Pin It on Pinterest

Share This