Skip to content

Commit

Permalink
Added behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
kotva006 committed May 7, 2024
1 parent 5d51a66 commit eacd9bb
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lib/predictions/repo/behaviour.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
defmodule Predictions.Repo.Behaviour do
@moduledoc """
Behavior for an API client for fetching prediction data.
"""

alias RoutePatterns.RoutePattern
alias Routes.Route
alias Stops.Stop

@doc """
Return predictions for given params
"""
@callback all(Keyword.t()) :: [Predictions.Prediction.t()] | []

@doc """
Return predictions for give prarams ignoring the cache
"""
@callback all_no_cache(Keyword.t()) :: [Predictions.Prediction.t()] | []
end

0 comments on commit eacd9bb

Please sign in to comment.