2019-08-31 23:02:41 +00:00
|
|
|
defmodule FeedParser.Item do
|
2019-09-01 03:25:10 +00:00
|
|
|
@moduledoc """
|
|
|
|
A item in a feed. Has metadata and content from the item.
|
|
|
|
"""
|
|
|
|
|
2021-09-03 21:06:08 +00:00
|
|
|
defstruct [:guid, :url, :links, :title, :content, :date, :creator]
|
2019-08-31 23:02:41 +00:00
|
|
|
|
|
|
|
@type t() :: %__MODULE__{
|
|
|
|
guid: String.t(),
|
|
|
|
url: String.t() | nil,
|
2019-09-01 20:35:32 +00:00
|
|
|
links: [{href :: String.t(), rel :: String.t() | nil}],
|
2019-08-31 23:02:41 +00:00
|
|
|
title: String.t() | nil,
|
|
|
|
content: String.t(),
|
2021-09-03 21:06:08 +00:00
|
|
|
date: DateTime.t(),
|
|
|
|
creator: String.t() | nil
|
2019-08-31 23:02:41 +00:00
|
|
|
}
|
|
|
|
end
|