Latest1.3
Homepagehttps://github.com/bigfish24/RealmNYTStories
LicenseMIT
Platformsios 7.0, requires ARC
DependenciesRealm
Authors

Ready-to-go JSON parsing of New York Times Top Stories API into Realm models

Included are pre-built model files: NYTStory and NYTStoryImage that represent the associated data for each story returned from the Top Stories API.

DO THIS FIRST: Register For NYT Top Stories API Key

Go to Times Developer Network and register, then enable the key for the Top Stores API.

Installation

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

Objective-C

pod 'RealmNYTStories'

Swift

pod 'RealmSwiftNYTStories'

How To Use

Objective-C

// Call somewhere in your code
// Performs async request, parses JSON, and adds objects to given Realm
[NYTStory loadLatestStoriesIntoRealm:[RLMRealm defaultRealm]
                          withAPIKey:@"INSERT_YOUR_API_KEY_HERE"];

Swift

// Call somewhere in your code
// Performs async request, parses JSON, and adds objects to given Realm
NYTStory.loadLatestStories(intoRealm: try! Realm(), withAPIKey: "INSERT_YOUR_API_KEY_HERE")

Latest podspec

{
    "name": "RealmNYTStories",
    "version": "1.3",
    "summary": "Ready-to-go JSON parsing of New York Times Top Stories API into Realm models",
    "description": "Loads data from New York Times Top Stories API and parses the JSON into provided Realm models.",
    "homepage": "https://github.com/bigfish24/RealmNYTStories",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Adam Fish": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/bigfish24/RealmNYTStories.git",
        "tag": "v1.3"
    },
    "source_files": "objective-c/*.{h,m}",
    "requires_arc": true,
    "dependencies": {
        "Realm": [
            ">= 0.100.0"
        ]
    }
}

Pin It on Pinterest

Share This