View Source Glific.Stats (Glific v5.1.6)
The stats manager and API to interface with the stat sub-system
Link to this section Summary
Functions
Return the count of stats, using the same filter as list_stats
Create a Stat
Top level function to generate stats for all active organizations by default. Can control behavior by setting function parameters
Returns the list of stats. Since this is very basic and only listing functionality we added the status filter like this. In future we will put the status as virtual filed in the stats itself.
Update a Stat
Get the details of the usage for this organization, from start_date to end_date both inclusive
Link to this section Functions
Return the count of stats, using the same filter as list_stats
@spec create_stat(map()) :: {:ok, Glific.Stats.Stat.t()} | {:error, Ecto.Changeset.t()}
Create a Stat
Top level function to generate stats for all active organizations by default. Can control behavior by setting function parameters
Returns the list of stats. Since this is very basic and only listing functionality we added the status filter like this. In future we will put the status as virtual filed in the stats itself.
@spec update_stat(Glific.Stats.Stat.t(), map()) :: {:ok, Glific.Stats.Stat.t()} | {:error, Ecto.Changeset.t()}
Update a Stat
@spec usage(non_neg_integer(), Date.t(), Date.t()) :: %{required(atom()) => pos_integer()} | nil
Get the details of the usage for this organization, from start_date to end_date both inclusive