Files
notifications-admin/app/notify_client/performance_dashboard_api_client.py

23 lines
582 B
Python
Raw Normal View History

from app.notify_client import NotifyAdminAPIClient, cache
2021-03-10 11:01:15 +00:00
class PerformanceDashboardAPIClient(NotifyAdminAPIClient):
@cache.set('performance-stats-{start_date}-to-{end_date}', ttl_in_seconds=3600)
def get_performance_dashboard_stats(
self,
*,
start_date,
end_date,
):
return self.get(
'/performance-dashboard',
params={
'start_date': str(start_date),
'end_date': str(end_date),
}
)
2021-03-10 11:01:15 +00:00
performance_dashboard_api_client = PerformanceDashboardAPIClient()