hedwig_dad_joke v1.2.0 HedwigDadJoke.JokeSource behaviour View Source

The behaviour for all sources of dad jokes.

Link to this section Summary

Link to this section Types

Link to this type

api_response() View Source
api_response() :: {atom(), %{status: status(), url: url(), body: body()}}

Link to this type

body() View Source
body() :: %{id: String.t(), joke: String.t()}

Link to this type

message() View Source
message() :: {atom(), String.t()}

Link to this section Callbacks

Link to this callback

random(term) View Source
random(term()) :: {:error, any()} | {:ok, term()}