Latest 0.0.6
Homepage https://github.com/icapps/ios-air-rivet
License MIT
Platforms ios 8.0, requires ARC
Authors

For quick start follow the instructions below. For more in dept info on why and how we build this AirRivet stuff you are more then welcome on the wiki

Usage

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

  1. Create a Model object that complies to protocol BaseModel
  2. Create a class that complies to ServiceParameters
  3. Do a request like:

Swift

import UIKit
import AirRivet

class ViewController: UIViewController {
    let requestController = RequestController<GameScore>(serviceParameters: ParseExampleService <GameScore>())

    override func viewDidLoad() {
        super.viewDidLoad()

        do {
            try requestController.retrieve({ (response) in
                print(response)
            })
        }catch {
            print("-------Error with request------")
        }

    }
}

Objective-C

#import "ICAOBJCViewController.h"
/**
 In build settings look at the Module Identifier. This is the one you should use to import swift files from the same target.
 */
#import "AirRivet_Example-Swift.h"

@implementation ICAOBJCViewController

- (void)viewDidLoad {
    [ super viewDidLoad];
    GameScoreController * controller = [[GameScoreController alloc] init];

    [controller retrieve:^(NSArray<GameScore *> * _Nonnull response) {
        NSLog(@"%@", response);
    } failure:^(NSError * _Nonnull error) {
        NSLog(@"%@", error);
    }];
}
@end

See "(project root)/Example"

Documentation

Requirements

iOS 8 or higher
Because we use generics you can only use this pod in Swift only files. You can mix and Match with Objective-C but not with generic classes. Types More info

Installation

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

pod "AirRivet"

Contribution

Don’t think to hard, try hard!

More info on 3 step contribution guidelines

License

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

Latest podspec

{
    "name": "AirRivet",
    "version": "0.0.6",
    "summary": "AirRivet is a web service stack to genericly convert JSON from a webservice to model objects.",
    "description": "When you have a webservice to talk to parsing the data returned and handeling the errors can be a hassle. This is pod will help you build it more generic.nWe use a single principle to build the the Architecture of this service. Your projects model object are of a certain Type. This Type can conform to `BaseModel` protocol so it can be saved or retreived by a `RequestController`.nnThe goal is to create a service layer for iCapps that is independent of any underlying frameworks or models you use (like pod `Argo` or `ObjectMapper`).",
    "license": "MIT",
    "homepage": "https://github.com/icapps/ios-air-rivet",
    "authors": {
        "Leroy": "[email protected]"
    },
    "source": {
        "git": "https://github.com/icapps/ios-air-rivet.git",
        "tag": "0.0.6"
    },
    "social_media_url": "https://twitter.com/icapps",
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resource_bundles": {
        "AirRivet": [
            "Pod/Assets/*.png"
        ]
    }
}

Pin It on Pinterest

Share This