Coder Social home page Coder Social logo

restkit-inextensions's Introduction

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)

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).

restkit-inextensions's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.