Skip to content

Commit d09c09b

Browse files
Consistent API docs, #PG-5079 (#109)
* docs: updated API documentation to be more consistent * Updated changelog * Update CHANGELOG.md Co-authored-by: Altamash Shaikh <altamash@innocraft.com> --------- Co-authored-by: Altamash Shaikh <altamash@innocraft.com>
1 parent c51b9c2 commit d09c09b

3 files changed

Lines changed: 14 additions & 12 deletions

File tree

API.php

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,31 +15,32 @@
1515
use Piwik\Piwik;
1616

1717
/**
18-
* Bandwidth API lets you request bandwidth metrics for page views and downloads.
18+
* Exposes reporting API endpoints for aggregated bandwidth metrics.
1919
*
2020
* @method static \Piwik\Plugins\Bandwidth\API getInstance()
2121
*/
2222
class API extends \Piwik\Plugin\API
2323
{
2424
/**
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.
2627
*
2728
* @param int|string|int[] $idSite Website ID(s) to query.
2829
* - Single site ID (e.g. 1)
2930
* - Multiple site IDs (e.g. [1, 4, 5])
3031
* - 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.
3334
* @param string $date The date or date range to process.
3435
* 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear),
3536
* 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.
4344
*/
4445
public function get($idSite, $period, $date, $segment = false, $columns = false)
4546
{

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## Changelog
22

3+
- 5.0.6 - 2026-04-27 - Updated API documentation
34
- 5.0.5 - 2026-03-02 - Updated API documentation
45
- 5.0.4 - 2025-10-27 - Updated screenshot for Marketplace
56
- 5.0.3 - 2025-07-07 - Textual change

plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Bandwidth",
3-
"version": "5.0.5",
3+
"version": "5.0.6",
44
"description": "Monitor Bandwidth for each page, download, and measure overall traffic in bytes. For requirements check out the description.",
55
"theme": false,
66
"keywords": ["bandwidth", "filesize", "size", "download"],

0 commit comments

Comments
 (0)