Packages

Star feeds is a gleam package for json feed generator

Current section

Files

Jump to
starfeeds src starfeeds@feed.erl
Raw

src/starfeeds@feed.erl

-module(starfeeds@feed).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-define(FILEPATH, "src/starfeeds/feed.gleam").
-export([feed/1, add_item/2, add_category/2, add_contributor/2, add_extension/2, link/0, extension/0, enclosure/0, author/0]).
-file("src/starfeeds/feed.gleam", 5).
-spec feed(starfeeds@types:feed_options()) -> starfeeds@types:feed().
feed(Options) ->
{feed,
Options,
gleam@list:new(),
gleam@list:new(),
gleam@list:new(),
gleam@list:new()}.
-file("src/starfeeds/feed.gleam", 15).
-spec add_item(starfeeds@types:feed(), starfeeds@types:item()) -> list(starfeeds@types:item()).
add_item(Feed, Item) ->
_pipe = erlang:element(3, Feed),
lists:append(_pipe, [Item]).
-file("src/starfeeds/feed.gleam", 20).
-spec add_category(starfeeds@types:feed(), binary()) -> list(binary()).
add_category(Feed, Category) ->
_pipe = erlang:element(4, Feed),
lists:append(_pipe, [Category]).
-file("src/starfeeds/feed.gleam", 25).
-spec add_contributor(starfeeds@types:feed(), starfeeds@types:author()) -> list(starfeeds@types:author()).
add_contributor(Feed, Contributor) ->
_pipe = erlang:element(5, Feed),
lists:append(_pipe, [Contributor]).
-file("src/starfeeds/feed.gleam", 30).
-spec add_extension(starfeeds@types:feed(), starfeeds@types:extension()) -> list(starfeeds@types:extension()).
add_extension(Feed, Extenstion) ->
_pipe = erlang:element(6, Feed),
lists:append(_pipe, [Extenstion]).
-file("src/starfeeds/feed.gleam", 35).
-spec link() -> starfeeds@types:link().
link() ->
{link, <<""/utf8>>, <<""/utf8>>, <<""/utf8>>, <<""/utf8>>}.
-file("src/starfeeds/feed.gleam", 39).
-spec extension() -> starfeeds@types:extension().
extension() ->
{extension, <<""/utf8>>, {photos, []}}.
-file("src/starfeeds/feed.gleam", 43).
-spec enclosure() -> starfeeds@types:enclosure().
enclosure() ->
{enclosure, <<""/utf8>>, none, none, none, none}.
-file("src/starfeeds/feed.gleam", 53).
-spec author() -> starfeeds@types:author().
author() ->
{author, none, none, none, none}.