feed_parser/lib/feed.ex

16 lines
449 B
Elixir
Raw Normal View History

2019-08-31 23:02:41 +00:00
defmodule FeedParser.Feed do
2019-09-01 03:25:10 +00:00
@moduledoc """
A feed. Contains some information about the site it originates from and a list of items it contains.
"""
2019-09-01 20:11:13 +00:00
defstruct [:site_url, :title, :image_url, :last_updated, :items]
2019-08-31 23:02:41 +00:00
@type t() :: %__MODULE__{
site_url: String.t(),
title: String.t(),
2019-09-01 20:11:13 +00:00
last_updated: DateTime.t() | nil,
2019-08-31 23:02:41 +00:00
image_url: String.t() | nil,
items: [FeedParser.Item.t()]
}
end