starfeeds

Types

pub type Cloud {
  Cloud(
    domain: String,
    port: Int,
    path: String,
    register_procedure: String,
    protocol: String,
  )
}

Constructors

  • Cloud(
      domain: String,
      port: Int,
      path: String,
      register_procedure: String,
      protocol: String,
    )
pub type Enclosure {
  Enclosure(url: String, length: Int, enclosure_type: String)
}

Constructors

  • Enclosure(url: String, length: Int, enclosure_type: String)
pub type Image {
  Image(
    url: String,
    title: String,
    link: String,
    description: Option(String),
    width: Option(Int),
    height: Option(Int),
  )
}

Constructors

  • Image(
      url: String,
      title: String,
      link: String,
      description: Option(String),
      width: Option(Int),
      height: Option(Int),
    )
pub type JsonAttachment {
  JsonAttachment(
    url: String,
    mime_type: String,
    title: String,
    size_in_bytes: Option(Int),
    duration_in_seconds: Option(Int),
  )
}

Constructors

  • JsonAttachment(
      url: String,
      mime_type: String,
      title: String,
      size_in_bytes: Option(Int),
      duration_in_seconds: Option(Int),
    )
pub type JsonAuthor {
  JsonAuthor(name: String, url: String, avatar: Option(String))
}

Constructors

  • JsonAuthor(name: String, url: String, avatar: Option(String))
pub type JsonFeed {
  JsonFeed(
    version: String,
    title: String,
    home_page_url: Option(String),
    feed_url: Option(String),
    description: Option(String),
    user_comment: Option(String),
    next_url: Option(String),
    icon: Option(String),
    favicon: Option(String),
    authors: List(JsonAuthor),
    language: Option(String),
    expired: Option(Bool),
    items: List(JsonItem),
  )
}

Constructors

  • JsonFeed(
      version: String,
      title: String,
      home_page_url: Option(String),
      feed_url: Option(String),
      description: Option(String),
      user_comment: Option(String),
      next_url: Option(String),
      icon: Option(String),
      favicon: Option(String),
      authors: List(JsonAuthor),
      language: Option(String),
      expired: Option(Bool),
      items: List(JsonItem),
    )
pub type JsonItem {
  JsonItem(
    id: String,
    url: String,
    external_url: Option(String),
    title: String,
    content_html: Option(String),
    content_text: Option(String),
    summary: Option(String),
    image: Option(String),
    banner_image: Option(String),
    date_published: Option(Time),
    date_modified: Option(Time),
    authors: List(JsonAuthor),
    tags: List(String),
    language: Option(String),
    attachments: List(JsonAttachment),
  )
}

Constructors

  • JsonItem(
      id: String,
      url: String,
      external_url: Option(String),
      title: String,
      content_html: Option(String),
      content_text: Option(String),
      summary: Option(String),
      image: Option(String),
      banner_image: Option(String),
      date_published: Option(Time),
      date_modified: Option(Time),
      authors: List(JsonAuthor),
      tags: List(String),
      language: Option(String),
      attachments: List(JsonAttachment),
    )

Link of an Rss Channel

pub type Link {
  Link(
    href: String,
    rel: String,
    link_type: String,
    length: String,
  )
}

Constructors

  • Link(
      href: String,
      rel: String,
      link_type: String,
      length: String,
    )

RSS 2.0. Compliant Spec

pub type RssChannel {
  RssChannel(
    title: String,
    link: String,
    description: String,
    language: Option(String),
    copyright: Option(String),
    managing_editor: Option(String),
    web_master: Option(String),
    pub_date: Option(Time),
    last_build_date: Option(Time),
    categories: List(String),
    generator: Option(String),
    docs: Option(String),
    cloud: Option(Cloud),
    ttl: Option(Int),
    image: Option(Image),
    text_input: Option(TextInput),
    skip_hours: List(Int),
    skip_days: List(birl.Weekday),
    items: List(RssItem),
  )
}

Constructors

  • RssChannel(
      title: String,
      link: String,
      description: String,
      language: Option(String),
      copyright: Option(String),
      managing_editor: Option(String),
      web_master: Option(String),
      pub_date: Option(Time),
      last_build_date: Option(Time),
      categories: List(String),
      generator: Option(String),
      docs: Option(String),
      cloud: Option(Cloud),
      ttl: Option(Int),
      image: Option(Image),
      text_input: Option(TextInput),
      skip_hours: List(Int),
      skip_days: List(birl.Weekday),
      items: List(RssItem),
    )

    Arguments

    • pub_date

      Publication Date of the content in RFC 822 Date-time format

pub type RssItem {
  RssItem(
    title: String,
    description: String,
    link: Option(String),
    author: Option(String),
    source: Option(String),
    comments: Option(String),
    pub_date: Option(Time),
    categories: List(String),
    enclosure: Option(Enclosure),
    guid: Option(#(String, Option(Bool))),
  )
}

Constructors

  • RssItem(
      title: String,
      description: String,
      link: Option(String),
      author: Option(String),
      source: Option(String),
      comments: Option(String),
      pub_date: Option(Time),
      categories: List(String),
      enclosure: Option(Enclosure),
      guid: Option(#(String, Option(Bool))),
    )
pub type TextInput {
  TextInput(
    title: String,
    description: String,
    name: String,
    link: String,
  )
}

Constructors

  • TextInput(
      title: String,
      description: String,
      name: String,
      link: String,
    )

Functions

pub fn add_channel_categories(
  channel: RssChannel,
  categories: List(String),
) -> RssChannel
pub fn add_channel_category(
  channel: RssChannel,
  category: String,
) -> RssChannel
pub fn add_channel_cloud(
  channel: RssChannel,
  cloud: Cloud,
) -> RssChannel
pub fn add_channel_copyright(
  channel: RssChannel,
  copyright: String,
) -> RssChannel
pub fn add_channel_docs(channel: RssChannel) -> RssChannel
pub fn add_channel_generator(
  channel: RssChannel,
  generator: String,
) -> RssChannel
pub fn add_channel_image(
  channel: RssChannel,
  image: Image,
) -> RssChannel
pub fn add_channel_item(
  channel: RssChannel,
  item: RssItem,
) -> RssChannel
pub fn add_channel_items(
  channel: RssChannel,
  items: List(RssItem),
) -> RssChannel
pub fn add_channel_language(
  channel: RssChannel,
  language: String,
) -> RssChannel
pub fn add_channel_last_build_date(
  channel: RssChannel,
  last_build_date: Time,
) -> RssChannel
pub fn add_channel_managing_editor(
  channel: RssChannel,
  managing_editor: String,
) -> RssChannel
pub fn add_channel_pub_date(
  channel: RssChannel,
  pub_date: Time,
) -> RssChannel
pub fn add_channel_skip_days(
  channel: RssChannel,
  skip_days: List(Weekday),
) -> RssChannel
pub fn add_channel_skip_hours(
  channel: RssChannel,
  skip_hours: List(Int),
) -> RssChannel
pub fn add_channel_text_input(
  channel: RssChannel,
  text_input: TextInput,
) -> RssChannel
pub fn add_channel_ttl(
  channel: RssChannel,
  ttl: Int,
) -> RssChannel
pub fn add_channel_web_master(
  channel: RssChannel,
  web_master: String,
) -> RssChannel
pub fn add_item_author(item: RssItem, author: String) -> RssItem
pub fn add_item_categories(
  item: RssItem,
  categories: List(String),
) -> RssItem
pub fn add_item_comments(
  item: RssItem,
  comments: String,
) -> RssItem
pub fn add_item_enclosure(
  item: RssItem,
  enclosure: Enclosure,
) -> RssItem
pub fn add_item_guid(
  item: RssItem,
  guid: #(String, Option(Bool)),
) -> RssItem
pub fn add_item_link(item: RssItem, link: String) -> RssItem
pub fn add_item_pub_date(
  item: RssItem,
  pub_date: Time,
) -> RssItem
pub fn add_item_source(item: RssItem, source: String) -> RssItem
pub fn add_json_item_attachment(
  item: JsonItem,
  attachment: JsonAttachment,
) -> JsonItem
pub fn add_json_item_attachments(
  item: JsonItem,
  attachments: List(JsonAttachment),
) -> JsonItem
pub fn add_json_item_author(
  item: JsonItem,
  author: JsonAuthor,
) -> JsonItem
pub fn add_json_item_authors(
  item: JsonItem,
  authors: List(JsonAuthor),
) -> JsonItem
pub fn add_json_item_banner_image(
  item: JsonItem,
  banner_image: String,
) -> JsonItem
pub fn add_json_item_content_html(
  item: JsonItem,
  content_html: String,
) -> JsonItem
pub fn add_json_item_content_text(
  item: JsonItem,
  content_text: String,
) -> JsonItem
pub fn add_json_item_date_modified(
  item: JsonItem,
  date_modified: Time,
) -> JsonItem
pub fn add_json_item_date_published(
  item: JsonItem,
  date_published: Time,
) -> JsonItem
pub fn add_json_item_external_url(
  item: JsonItem,
  external_url: String,
) -> JsonItem
pub fn add_json_item_image(
  item: JsonItem,
  image: String,
) -> JsonItem
pub fn add_json_item_language(
  item: JsonItem,
  language: String,
) -> JsonItem
pub fn add_json_item_summary(
  item: JsonItem,
  summary: String,
) -> JsonItem
pub fn add_json_item_tags(
  item: JsonItem,
  tags: List(String),
) -> JsonItem
pub fn json_feed(version: String, title: String) -> JsonFeed
pub fn json_feed_to_string(feed: JsonFeed) -> String
pub fn json_item(
  id: String,
  url: String,
  title: String,
) -> JsonItem
pub fn rss_channel(
  title: String,
  description: String,
  link: String,
) -> RssChannel
pub fn rss_channel_to_xml_string(channel: RssChannel) -> String
pub fn rss_item(title: String, description: String) -> RssItem
pub fn rss_item_to_xml_string(item: RssItem) -> String
pub fn to_xml_string(channels: List(RssChannel)) -> String
Search Document