RSSKit
0.6.1
|
#import <RSSFeed.h>
Inherits <RSSMutableFeed>.
Public Member Functions | |
(id) | - initWithURL: |
(NSString *) | - description |
(enum RSSFeedStatus) | - status |
(BOOL) | - isFetching |
(NSEnumerator *) | - articleEnumerator |
(void) | - removeArticle: |
(void) | - setFeedName: |
(NSString *) | - feedName |
(NSURL *) | - feedURL |
(void) | - setAutoClear: |
(BOOL) | - autoClear |
(void) | - clearArticles |
(void) | - setArticleClass: |
(Class) | - articleClass |
(NSDate *) | - lastRetrieval |
(void) | - newArticleFound: |
(enum RSSFeedError) | - fetch |
(void) | - fetchInBackground |
(NSMutableDictionary *) | - plistDictionary |
![]() | |
(void) | - removeArticle: |
(void) | - setFeedName: |
![]() | |
(NSSet *) | - articleSet |
(int) | - articleCount |
(enum RSSFeedError) | - fetch |
(void) | - fetchInBackground |
(enum RSSFeedError) | - lastError |
(NSMutableDictionary *) | - plistDictionary |
Static Public Member Functions | |
(id) | + feedFromPlistDictionary: |
Protected Attributes | |
Class | articleClass |
Objects of this class represent a RSS/ATOM feed, which is basically just a source for new articles. When creating a RSSFeed object, you'll just have to provide it with the URL, where the feed can be downloaded from.
This is the generic way to read feeds:
NSURL* url = [NSURL URLWithString:"http://www.example.com/feed.xml"];
RSSFeed* feed = [RSSFeed initWithURL: url];
[feed fetch]; // alternatively [feed fetchInBackground];
[feed setAutoClear: NO];
NSSet* articles = [feed articleSet];
- (Class) articleClass |
Returns the class of the article objects. This will be a subtype of RSSArticle.
Referenced by initWithURL:, and setArticleClass:.
- (NSEnumerator *) articleEnumerator |
Reimplemented from <RSSFeed>.
- (BOOL) autoClear |
Referenced by setAutoClear:.
- (void) clearArticles |
- (NSString *) description |
+ (id) feedFromPlistDictionary: | (NSDictionary*) | plistDictionary |
Creates a feed from a suitable Plist-able dictionary representation.
- (NSString*) feedName |
Reimplemented from <RSSFeed>.
Referenced by initWithURL:, plistDictionary, and setFeedName:.
- (NSURL*) feedURL |
Reimplemented from <RSSFeed>.
Referenced by fetchInBackground, and initWithURL:.
- (enum RSSFeedError) fetch |
Fetches the feed from the web.
Fetches the feed from its feed URL, parses it and adds the found articles to the list of articles contained in this feed (if they are new).
References status.
- (void) fetchInBackground |
- (id) initWithURL: | (NSURL*) | aURL |
Designated initializer.
aURL | The URL where the feed can be downloaded from. |
Designated initializer
References articleClass, feedName, feedURL, <RSSFeed>::lastError, lastRetrieval, and status.
- (BOOL) isFetching |
- (NSDate*) lastRetrieval |
Returns the date of last retrieval of this feed. If the feed hasn't been retrieved yet, this method returns nil.
Referenced by clearArticles, and initWithURL:.
- (void) newArticleFound: | (id) | anArticle |
RSSFeed also implements the NewRSSArticleListener informal protocol.
Implementation of the NewRSSArticleListener protocol.
- (NSMutableDictionary *) plistDictionary |
Returns a Plist-able dictionary representation of this feed.
References articleClass, and feedName.
- (void) removeArticle: | (RSSArticle*) | article |
Deletes an article from the feed.
article | The index of the article to delete. |
- (void) setArticleClass: | (Class) | aClass |
Sets the class of the article objects. This needs to be a subtype of RSSArticle.
aClass | The class newly created article objects should have. |
References articleClass.
- (void) setAutoClear: | (BOOL) | autoClear |
Lets you decide if the feed should be cleared before new articles are downloaded.
autoClear | YES, if the feed should clear its article list before fetching new articles. NO otherwise |
References autoClear.
- (void) setFeedName: | (NSString*) | aFeedName |
Sets the feed name
References feedName.
- (enum RSSFeedStatus) status |
Accessor for the status of the feed. This can be used by a multithreaded GUI to indicate if a feed is currently fetching...
Referenced by fetch, fetchInBackground, initWithURL:, and isFetching.
|
protected |
Returns the class of the article objects. This needs to be a subclass of RSSArticle. (Also needed to implement the NewRSSArticleListener class)
Referenced by plistDictionary.