From 8240a2c73b3a13a42bae802c9ffc14fb34dca8c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Avil=C3=A9s?= Date: Wed, 15 Oct 2014 14:33:57 +0200 Subject: [PATCH] Always pass query_params in call methods --- piwik/indico_piwik/queries/metrics.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/piwik/indico_piwik/queries/metrics.py b/piwik/indico_piwik/queries/metrics.py index fc589e3..86f291d 100644 --- a/piwik/indico_piwik/queries/metrics.py +++ b/piwik/indico_piwik/queries/metrics.py @@ -66,9 +66,9 @@ class PiwikQueryReportEventMetricDownloads(PiwikQueryReportEventMetricBase): class PiwikQueryReportEventMetricReferrers(PiwikQueryReportEventMetricBase): - def call(self): + def call(self, **query_params): return super(PiwikQueryReportEventMetricReferrers, self).call(method='Referrers.getReferrerType', - period='range') + period='range', **query_params) def get_result(self): """Perform the call and return a list of referrers""" @@ -91,8 +91,8 @@ class PiwikQueryReportEventMetricVisits(PiwikQueryReportEventMetricVisitsBase): class PiwikQueryReportEventMetricVisitDuration(PiwikQueryReportEventMetricBase): - def call(self): - return super(PiwikQueryReportEventMetricVisitDuration, self).call(method='VisitsSummary.get') + def call(self, **query_params): + return super(PiwikQueryReportEventMetricVisitDuration, self).call(method='VisitsSummary.get', **query_params) def get_result(self): """Perform the call and return a string with the time in hh:mm:ss""" @@ -112,8 +112,9 @@ class PiwikQueryReportEventMetricVisitDuration(PiwikQueryReportEventMetricBase): class PiwikQueryReportEventMetricPeakDateAndVisitors(PiwikQueryReportEventMetricBase): - def call(self): - return super(PiwikQueryReportEventMetricPeakDateAndVisitors, self).call(method='VisitsSummary.getVisits') + def call(self, **query_params): + return super(PiwikQueryReportEventMetricPeakDateAndVisitors, self).call(method='VisitsSummary.getVisits', + **query_params) def get_result(self): """Perform the call and return the peak date and how many users"""