feed_parser/lib/feed.ex

16 lines
449 B
Elixir

defmodule FeedParser.Feed do
@moduledoc """
A feed. Contains some information about the site it originates from and a list of items it contains.
"""
defstruct [:site_url, :title, :image_url, :last_updated, :items]
@type t() :: %__MODULE__{
site_url: String.t(),
title: String.t(),
last_updated: DateTime.t() | nil,
image_url: String.t() | nil,
items: [FeedParser.Item.t()]
}
end