class RSS::Item
- RSS::Item
- RSS::Element
- Reference
- Object
Overview
A channel may contain any number of Item
s. An item may represent a "story" -- much like a
story in a newspaper or magazine; if so its description is a synopsis of the story, and the link
points to the full story. An item may also be complete in itself, if so, the description
contains the text (entity-encoded HTML is allowed), and the link and title may be omitted. All
elements of an item are optional, however at least one of title or description must be present.
Defined in:
cryss/item.crConstructors
Instance Method Summary
-
#author : String | Nil
Email address of the author of the item.
- #author=(author : Nil | String)
-
#category : Category | Nil
Includes the item in one or more categories.
- #category=(category : Nil | RSS::Category)
-
#comments : URI | Nil
Optional URL of the comments page for the item.
- #comments=(comments : Nil | URI)
-
#description : String | Nil
The item synopsis.
- #description=(description : Nil | String)
-
#enclosure : Enclosure | Nil
Describes a media object that is attached to the item.
- #enclosure=(enclosure : Nil | RSS::Enclosure)
-
#guid : URI | Nil
Optional globally unique identifier.
- #guid=(guid : Nil | URI)
-
#guid_is_perma_link : Bool
See
#guid
. - #guid_is_perma_link=(guid_is_perma_link : Bool)
-
#link : URI | Nil
The URL of the item.
- #link=(link : Nil | URI)
-
#pub_date : Time | Nil
is an optional sub-element of - .
- #pub_date=(pub_date : Time | Nil)
-
#source : String | Nil
The RSS channel that the item came from.
- #source=(source : Nil | String)
-
#source_url : URI | Nil
Required if source is non-nil.
- #source_url=(source_url : Nil | URI)
-
#title : String | Nil
The title of the item.
- #title=(title : Nil | String)
-
#to_xml(xml : XML::Builder)
Serialises the item to the XML builder.
Instance methods inherited from class RSS::Element
ns(name : String, &)
ns,
to_s(io : IO)
to_s,
to_xml(io : IO)to_xml(xml : XML::Builder) to_xml
Constructor Detail
Instance Method Detail
Includes the item in one or more categories.
The value of the element is a forward-slash-separated string that identifies a hierarchic location in the indicated taxonomy. Processors may establish conventions for the interpretation of categories. Two examples are provided below: getter category : String?
Optional URL of the comments page for the item.
<comments>http://rateyourmusic.com/yaccs/commentsn/blogId=705245&itemId=271</comments>
Describes a media object that is attached to the item.
Optional globally unique identifier.
It's a string that uniquely identifies the item. When present, an aggregator may choose to use this string to determine if an item is new.
<guid>http://some.server.com/weblogItem3207<guid>
There are no rules for the syntax of a guid. Aggregators must view them as a string. It's up to the source of the feed to establish the uniqueness of the string.
If the guid element has an attribute named "isPermaLink" with a value of true, the reader may
assume that it is a permalink to the item, that is, a url that can be opened in a Web browser,
that points to the full item described by the
<guid isPermaLink="true">http://inessential.com/2002/09/01.php#a2</guid>
is_perma_link is optional and defaults to true. If its value is false, the guid may not be assumed to be a url, or a url to anything in particular.
Its value is a date, indicating when the item was published. If it's a date in the future, aggregators may choose to not display the item until that date.