~ihabunek/triglav

23cf2d78a60159c2dc3b623d64f3b3f347975fae — Ivan Habunek 2 months ago 60b770d
Fix types
1 files changed, 4 insertions(+), 2 deletions(-)

M lib/triglav/zet/realtime.ex
M lib/triglav/zet/realtime.ex => lib/triglav/zet/realtime.ex +4 -2
@@ 11,14 11,16 @@ defmodule Triglav.Zet.Realtime do

  alias Gtfs.TransitRealtime.FeedMessage

  @spec fetch() :: {:ok, %FeedMessage{}} | {:error, term()}
  @type feed_message :: %FeedMessage{}

  @spec fetch() :: {:ok, feed_message()} | {:error, term()}
  def fetch() do
    with {:ok, binary} <- get() do
      decode(binary)
    end
  end

  @spec fetch!() :: %FeedMessage{}
  @spec fetch!() :: feed_message()
  def fetch!() do
    {:ok, data} = fetch()
    data