# RSSArticle Class Reference

`#import <RSSArticle.h>`

List of all members.

## Public Member Functions

(id) | - init
(id) | - initWithHeadline:url:description:date:
(id) | - initWithHeadline:url:description:time:
(id) | - initWithCoder:
| Deserializes a RSSArticle object from a NSCoder.
(void) | - encodeWithCoder:
| Serializes a RSSArticle object to a NSCoder.
(NSString *) | - headline
(NSString *) | - url
(NSString *) | - description
(void) | - addLink:
(void) | - setLinks:
(NSArray *) | - links
(NSDate *) | - date
(RSSFeed *) | - feed
(BOOL) | - isEqual:

## Detailed Description

An object of this class represents an article in an RSS Feed.

## Member Function Documentation

- (void) addLink: |  | (NSURL *) | anURL |  |

| Adds a new link to this article. This is a NSURL object, which usually has the "type" property set to an NSString which represents the resource's MIME type. You may also specify the "rel" property, which should be one of "enclosure", "related", "alternate", "via".

- (NSDate*) date |  |  |  |

Returns the date of the publication of the article. If the source feed of this article didn't contain information about this date, the fetching date is usually returned.

Returns:
  The date of the publication of the article

- (NSString*) description |  |  |  |

Returns:
  The full text, an excerpt or a summary from the article

- (RSSFeed*) feed |  |  |  |

Returns the source feed of this article.

Warning:
  It's not guaranteed that this object actually exists. Be aware of segmentation faults!

If you want to make sure the object exists, you have to follow these rules:

- Don't retain any article!
- Don't call the (undocumented) `feed:` (Colon!) method.

Returns:
  The source feed of this article

- (NSString*) headline |  |  |  |

Returns:
  The headline of the article

- (id) init |  |  |  |

Standard initializer. You shouldn't use this. Better use initWithHeadline:url:description:date:

See also:
  - initWithHeadline:url:description:date:

- (id) initWithHeadline: |  | (NSString *) | myHeadline
url: |  | (NSString *) | myUrl
description: |  | (NSString *) | myDescription
date: |  | (NSDate *) | myDate

Designated initializer for the RSSArticle class.

Don't create RSSArticle objects yourself. Create a RSSFeed object and let it fetch the articles for you!

Parameters:

  | myHeadline | A NSString containing the headline of the article.
  | myUrl | A NSString containing the URL of the full version of the article.
  | myDescription | An excerpt of the article text or the full text.
  | myDate | The date as NSDate object on which this article was posted.

See also:
  RSSFeed

- (id) initWithHeadline: |  | (NSString *) | myHeadline
url: |  | (NSString *) | myUrl
description: |  | (NSString *) | myDescription
time: |  | (unsigned int) | myTime

Old designated initializer for the RSSArticle class. Only here for compatibility reasons. This method is likely to be dropped in future versions.

Deprecated:

Parameters:

  | myHeadline | A NSString containing the headline of the article.
  | myUrl | A NSString containing the URL of the full version of the article.
  | myDescription | An excerpt of the article text or the full text.
  | myTime | The date (in seconds since 1970) on which this article was posted.

- (BOOL) isEqual: |  | (id) | anObject |  |

| RSS Articles are equal if both the article headlines and the article URLs are equal. If they are equal is tested by calling the isEqual: method on those.

- (NSArray*) links |  |  |  |

Returns an NSArray containing NSURL objects or nil, if there are none. The contained NSURL objects often have the "type" and "rel" properties set. See the documentation for addLink: for details.

Returns:
  The links of the article.

- (void) setLinks: |  | (NSMutableArray *) | someLinks |  |

| Replaces the list of links with a new one. See the documentation for addLink: for details. Hint: The parameter may also be nil.

- (NSString*) url |  |  |  |

Returns:
  Te URL of the full version of the article (as NSString*)

The documentation for this class was generated from the following files:

- RSSArticle.h
- RSSArticle.m