View Source Plausible.Imported (Plausible v0.0.1)

Context for managing site statistics imports.

Currently following importers are implemented:

For more information on implementing importers, see Plausible.Imported.Importer.

Summary

Functions

Link to this function

check_dates(site, start_date, end_date)

View Source
@spec check_dates(Plausible.Site.t(), Date.t() | nil, Date.t() | nil) ::
  {:ok, Date.t(), Date.t()} | {:error, :no_data | :no_time_window}
Link to this function

delete_imports_for_site(site)

View Source
@spec delete_imports_for_site(Plausible.Site.t()) :: :ok
Link to this function

get_import(site, import_id)

View Source
Link to this function

get_imports_date_range(site)

View Source
@spec get_imports_date_range(Plausible.Site.t()) :: %{
  start_date: Date.t() | nil,
  end_date: Date.t() | nil
}
Link to this function

list_all_imports(site, status \\ nil)

View Source
@spec list_all_imports(Plausible.Site.t(), atom()) :: [
  Plausible.Imported.SiteImport.t()
]
Link to this function

list_complete_import_ids(site)

View Source
@spec list_complete_import_ids(Plausible.Site.t()) :: [non_neg_integer()]

See Plausible.Imported.Importer.listen/0.

@spec load_import_data(Plausible.Site.t()) :: Plausible.Site.t()
@spec max_complete_imports() :: non_neg_integer()
Link to this function

other_imports_in_progress?(site_import)

View Source
@spec other_imports_in_progress?(Plausible.Imported.SiteImport.t()) :: boolean()
@spec schemas() :: [module()]
@spec tables() :: [String.t()]