Package dev.patbeagan.protocolrss.core

Types

Link copied to clipboard
data class Category(var category: String, var domain: String? = null)

<category> is an optional sub-element of <item>.

Link copied to clipboard
data class Channel(    var title: String = DefaultString,     var link: URL = URL("https://example.com"),     var description: String = DefaultString,     var categories: List<Category>? = null,     var cloud: Cloud? = null,     var copyright: String? = null,     var docs: String? = null,     var generator: String? = null,     var image: Image? = null,     var items: List<Item>? = null,     var language: String? = null,     var lastBuildDate: String? = null,     var managingEditor: String? = null,     var pubDate: String? = null,     var rating: String? = null,     var skipDays: SkipDays? = null,     var skipHours: SkipHours? = null,     var textInput: TextInput? = null,     var ttl: Int? = null,     var webMaster: String? = null)
Link copied to clipboard
data class Cloud(    var domain: String,     var port: Int,     var path: String,     var registerProcedure: String,     var protocol: Cloud.Protocol)

<cloud> is an optional sub-element of <channel>.

Link copied to clipboard
data class Enclosure(    var url: URL,     var length: Long,     var type: String)

<enclosure> is an optional sub-element of <item>.

Link copied to clipboard
data class Guid(var guid: String = UUID.randomUUID().toString(), var isPermalink: Boolean? = null)

<guid> is an optional sub-element of <item>.

Link copied to clipboard
data class Image(    var link: String,     var title: String,     var url: String,     var description: String? = null,     var width: Int? = null,     var height: Int? = null)

<image> is an optional sub-element of <channel>, which contains three required and three optional sub-elements.

Link copied to clipboard
data class Item(    var title: String? = null,     var description: String? = null,     var author: String? = null,     var categories: List<Category>? = null,     var comments: String? = null,     var enclosure: Enclosure? = null,     var guid: Guid? = null,     var link: URL? = null,     var pubDate: String? = null,     var source: Source? = null)

A channel may contain any number of 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; see examples), 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.

Link copied to clipboard
data class Rss(var channel: Channel = Channel(), var version: String = "2.0.1")

https://www.rssboard.org/rss-specification

Link copied to clipboard
data class SkipDays(val day: List<Int>)

A hint for aggregators telling them which days they can skip. This element contains up to seven sub-elements whose value is Monday, Tuesday, Wednesday, Thursday, Friday, Saturday or Sunday. Aggregators may not read the channel during days listed in the element.

Link copied to clipboard
data class SkipHours(val hour: List<Int>)

A hint for aggregators telling them which hours they can skip. This element contains up to 24 sub-elements whose value is a number between 0 and 23, representing a time in GMT, when aggregators, if they support the feature, may not read the channel on hours listed in the element.

Link copied to clipboard
data class Source(var url: URL, var source: String)

<source> is an optional sub-element of <item>.

Link copied to clipboard
data class TextInput(    var description: String,     var link: String,     var name: String,     var title: String)

A channel may optionally contain a sub-element, which contains four required sub-elements.