Latest2.1.0
Homepagehttps://github.com/laptobbe/Realm-Rest
LicenseMIT
Platformsios 7.0, requires ARC
DependenciesRealm, Realm+JSON, NSString-UrlEncode, NSURL+QueryDictionary, KTBTaskQueue, AFNetworking, Functional.m
Authors

Build Status
Version
License
Platform

A first version of an extension to Realm.io for working with JSON based Rest API’s

Installation

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

pod "Realm-Rest"

Basic Usage

[realm setBaseUrl:@"http://api.example.com" queuePersistance:RestRequestQueuePeristanceDatabase];

@interface User : RLMObject
@property NSString* username;
@property NSString* name;
@end

[User restInDefaultRealmWithRequestType:RestRequestTypePost
    parameters:@{
        RestRequestParameterStyleJSON : @{
            ”username”:”foo”,
            ”password”:”bar”
        }}
    headers:nil
    userInfo:@{@"action":@"login"}
    success:^(id primaryKey) {
        User *user = [User objectForPrimaryKey:primaryKey];
        //Use object
    }
    failure:^(NSError *error, NSDictionary *userInfo) {
        //Handle error
    }
];

Usage Details

Se the Wiki for more details on how to use Realm-Rest

Author

Tobias Sundstrand, [email protected]

License

Realm-Rest is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "Realm-Rest",
    "version": "2.1.0",
    "summary": "An extension to Realm.io for working with JSON based Rest API's",
    "homepage": "https://github.com/laptobbe/Realm-Rest",
    "license": "MIT",
    "authors": {
        "Tobias Sundstrand": "[email protected]"
    },
    "source": {
        "git": "https://github.com/laptobbe/Realm-Rest.git",
        "tag": "2.1.0"
    },
    "social_media_url": "https://twitter.com/laptobbe",
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes",
    "dependencies": {
        "Realm": [
            "~> 0.90.5"
        ],
        "Realm+JSON": [
            "~> 0.2.5"
        ],
        "NSString-UrlEncode": [
            "~> 2.0.0"
        ],
        "NSURL+QueryDictionary": [
            "~> 1.0.3"
        ],
        "KTBTaskQueue": [
            "~> 1.0.1"
        ],
        "AFNetworking": [
            "~> 2.5.0"
        ],
        "Functional.m": [
            "~> 1.0.0"
        ]
    }
}

Pin It on Pinterest

Share This