app.services.dashboard_service module

class app.services.dashboard_service.DashboardService(dashboard_repository, game_repository, task_repository, user_repository, logs_repository, user_points_repository, user_actions_repository)[source]

Bases: BaseService

Service class for API keys.

Parameters:
dashboard_repository

The repository instance.

Type:

DashboardRepository

__init__(dashboard_repository, game_repository, task_repository, user_repository, logs_repository, user_points_repository, user_actions_repository)[source]

Initializes the DashboardService with the provided repository.

Parameters:
Return type:

None

async get_dashboard_summary(start_date, end_date, group_by)[source]

Return the dashboard activity summary for a date range.

Parameters:
  • start_date – Inclusive lower bound of the reporting window.

  • end_date – Inclusive upper bound of the reporting window.

  • group_by – Bucketing granularity (e.g. "day"/"month").

Returns:

Any – Aggregated summary metrics produced by the repository.

Return type:

Any

async get_dashboard_summary_logs(start_date, end_date, group_by)[source]

Return the dashboard log-activity summary for a date range.

Parameters:
  • start_date – Inclusive lower bound of the reporting window.

  • end_date – Inclusive upper bound of the reporting window.

  • group_by – Bucketing granularity (e.g. "day"/"month").

Returns:

Any – Aggregated log metrics produced by the repository.

Return type:

Any