class RSS::Channel
- RSS::Channel
- RSS::Element
- Reference
- Object
Overview
Contains information about an RSS channel (metadata) and its contents.
For precise documentation, see https://validator.w3.org/feed/docs/rss2.html
Defined in:
cryss/channel.crConstructors
Instance Method Summary
- #<<(item : Item)
- #add_ns(name : String | Symbol, url : URI | String)
- #add_ns(**ns)
-
#category : Array(Category)
Specify one or more categories that the channel belongs to.
- #category=(category : Array(RSS::Category))
-
#cloud : Cloud | Nil
Allows processes to register with a
Cloud
to be notified of updates to the channel, implementing a lightweight publish-subscribe protocol for RSS feeds. - #cloud=(cloud : Nil | RSS::Cloud)
-
#copyright : String | Nil
Copyright notice for content in the channel.
- #copyright=(copyright : Nil | String)
-
#description : String
Phrase or sentence describing the channel.
- #description=(description : String)
-
#docs : URI
A URL that points to the documentation for the format used in the RSS file.
- #docs=(docs : URI)
-
#generator : String
A string indicating the program used to generate the channel.
- #generator=(generator : String)
-
#image : Image | Nil
Specifies a GIF, JPEG or PNG image that can be displayed with the channel.
- #image=(image : Nil | RSS::Image)
-
#items : Array(Item)
Contained elements of the channel.
-
#language : String | Nil
The language the channel is written in.
- #language=(language : Nil | String)
-
#last_build_date : Time | Nil
The last time the content of the channel changed.
- #last_build_date=(last_build_date : Time | Nil)
-
#link : URI
The URL to the HTML website corresponding to the channel.
- #link=(link : URI)
-
#managing_editor : String | Nil
Email address for person responsible for editorial content.
- #managing_editor=(managing_editor : Nil | String)
-
#pub_date : Time | Nil
The publication date for the content in the channel.
- #pub_date=(pub_date : Time | Nil)
- #push(item : Item)
-
#skip_days : Array(Day)
A hint for aggregators telling them which hours they can skip.
- #skip_days=(skip_days : Array(RSS::Day))
-
#skip_hours : Array(Int32)
A hint for aggregators telling them which days they can skip.
- #skip_hours=(skip_hours : Array(Int32))
-
#text_input : TextInput | Nil
Specifies a
TextInput
box that can be displayed with the channel. - #text_input=(text_input : Nil | RSS::TextInput)
-
#title : String
The name of the channel.
- #title=(title : String)
-
#to_xml(xml : XML::Builder)
Serialises the channel to the XML builder.
-
#ttl : Int32 | Nil
Time to live.
- #ttl=(ttl : Int32 | Nil)
-
#webmaster : String | Nil
Email address for person responsible for technical issues relating to channel.
- #webmaster=(webmaster : Nil | String)
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
Specify one or more categories that the channel belongs to. Follows the same rules as the
Item
-level category element. More info.
Allows processes to register with a Cloud
to be notified of updates to the channel,
implementing a lightweight publish-subscribe protocol for RSS feeds. More info here.
Copyright notice for content in the channel.
Example: Copyright 2002, Spartanburg Herald-Journal
A URL that points to the documentation for the format used in the RSS file.
Defaults to the W3 RSS 2.0 specification. It's for people who might stumble across an RSS file on a Web server 25 years from now and wonder what it is.
Specifies a GIF, JPEG or PNG image that can be displayed with the channel.
The language the channel is written in.
This allows aggregators to group all Italian language sites, for example, on a single page. A list of allowable values for this element, as provided by Netscape, is here. You may also use values defined by the W3C.
Example: en-us
The last time the content of the channel changed.
Example: Sat, 07 Sep 2002 9:42:31 GMT
Email address for person responsible for editorial content.
Example: [email protected] (George Matesky)
The publication date for the content in the channel.
For example, the New York Times publishes on a daily basis, the publication date flips once every 24 hours. That's when the pubDate of the channel changes. All date-times in RSS conform to the Date and Time Specification of RFC 822, with the exception that the year may be expressed with two characters or four characters (four preferred).
Example: Sat, 07 Sep 2002 0:00:01 GMT
A hint for aggregators telling them which hours they can skip.
Specifies a TextInput
box that can be displayed with the channel.
The name of the channel.
It's how people refer to your service. If you have an HTML website that contains the same information as your RSS file, the title of your channel should be the same as the title of your website.
Time to live.
It's a number of minutes that indicates how long a channel can be cached before refreshing from the source. More info here.
Email address for person responsible for technical issues relating to channel.
Example: [email protected] (Betty Guernsey)