RSSAtomKit 0.1.1

RSSAtomKit 0.1.1

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Jul 2015

Maintained by Chris Ballinger, Chris Ballinger.



 
Depends on:
Mantle~> 2.0
Ono~> 1.2
 

Customizable Obj-C RSS/Atom feed fetcher and parser.

Installation

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

pod 'RSSAtomKit', :git => 'https://github.com/chrisballinger/RSSAtomKit.git'

Usage

You can pass in a custom NSURLSessionConfiguration to the built-in fetcher.

RSSAtomKit *atomKit = [[RSSAtomKit alloc] initWithSessionConfiguration:[NSURLSessionConfiguration ephemeralSessionConfiguration]];
NSURL *nytimesURL = [NSURL URLWithString:@"http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml"];
[self.atomKit parseFeedFromURL:nytimesURL completionBlock:^(RSSFeed *feed, NSArray *items, NSError *error) {
   if (error) {
       NSLog(@"Error for %@: %@", nytimesURL, error);
       return;
   }
   NSLog(@"feed: %@ items: %@", feed, items);
} completionQueue:nil];

If you prefer, you can also fetch on your own and parse raw NSData separately using RSSParser's feedFromXMLData:completionBlock:completionQueue: method. Additionally, you can provide application-specific subclasses of RSSItem and RSSFeed via the registerItemClass: and registerFeedClass: methods.

Authors

License

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