|
15 | 15 | use Piwik\Piwik; |
16 | 16 |
|
17 | 17 | /** |
18 | | - * Bandwidth API lets you request bandwidth metrics for page views and downloads. |
| 18 | + * Exposes reporting API endpoints for aggregated bandwidth metrics. |
19 | 19 | * |
20 | 20 | * @method static \Piwik\Plugins\Bandwidth\API getInstance() |
21 | 21 | */ |
22 | 22 | class API extends \Piwik\Plugin\API |
23 | 23 | { |
24 | 24 | /** |
25 | | - * Returns bandwidth metrics for the requested site, period, and segment. |
| 25 | + * Returns aggregated bandwidth metrics for the requested site selection and archive period. |
| 26 | + * Includes overall, pageview, and download totals, optionally limited to specific metric columns. |
26 | 27 | * |
27 | 28 | * @param int|string|int[] $idSite Website ID(s) to query. |
28 | 29 | * - Single site ID (e.g. 1) |
29 | 30 | * - Multiple site IDs (e.g. [1, 4, 5]) |
30 | 31 | * - Comma-separated list ("1,4,5") or "all" |
31 | | - * @param string $period The period to process, processes data for the period containing the specified date. |
32 | | - * Allowed values: "day", "week", "month", "year", "range". |
| 32 | + * @param 'day'|'week'|'month'|'year'|'range' $period The period to process, processes data for the period |
| 33 | + * containing the specified date. |
33 | 34 | * @param string $date The date or date range to process. |
34 | 35 | * 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear), |
35 | 36 | * or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX). |
36 | | - * @param string|false $segment (Optional) Custom segment to filter the report. |
37 | | - * Example: "referrerName==twitter.com" |
38 | | - * Supports AND (;) and OR (,) operators. |
39 | | - * [See documentation:](https://developer.matomo.org/api-reference/reporting-api-segmentation) |
40 | | - * @param string|array|false $columns Optional metric columns to return. Accepts a comma-separated list, |
41 | | - * an array of metric names, or false to return all available metrics. |
42 | | - * @return DataTable|DataTable\Map Bandwidth metrics with integer values. |
| 37 | + * @param string|null|false $segment Custom segment to filter the report. |
| 38 | + * Example: "referrerName==example.com" |
| 39 | + * Supports AND (;) and OR (,) operators. |
| 40 | + * @param string|array|false $columns Metric columns to return. |
| 41 | + * Accepts a comma-separated list, an array of metric names, |
| 42 | + * or false to return all available bandwidth metrics. |
| 43 | + * @return DataTable|DataTable\Map A table containing the requested bandwidth metric totals as integers. |
43 | 44 | */ |
44 | 45 | public function get($idSite, $period, $date, $segment = false, $columns = false) |
45 | 46 | { |
|
0 commit comments