You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
analytics/lib/plausible_web/plugins/api.ex

17 lines
345 B
Elixir

defmodule PlausibleWeb.Plugins.API do
@moduledoc """
Plausible Plugins API
"""
@doc """
Returns the API base URI, so that complete URLs can
be generated from forwared Router helpers.
"""
@spec base_uri() :: URI.t()
def base_uri() do
PlausibleWeb.Endpoint.url()
|> Path.join("/api/plugins")
|> URI.new!()
end
end