Skip to content

Commit 29b1792

Browse files
authored
Consistent API docs, #PG-5079 (#76)
* docs: updated API documentation to be more consistent * Updated changelog
1 parent df16d7e commit 29b1792

3 files changed

Lines changed: 14 additions & 13 deletions

File tree

API.php

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
use Piwik\Plugin;
1616

1717
/**
18-
* The Provider API lets you access reports for your visitors Internet Providers.
18+
* Exposes reporting endpoints for visitor internet provider and ISP data.
1919
*
20-
* The main report groups visits by resolved ISP hostname and provider label.
20+
* Reports group visits by resolved provider hostname and display label.
2121
*
2222
* @method static \Piwik\Plugins\Provider\API getInstance()
2323
*/
@@ -30,17 +30,15 @@ class API extends \Piwik\Plugin\API
3030
* - Single site ID (e.g. 1)
3131
* - Multiple site IDs (e.g. [1, 4, 5])
3232
* - Comma-separated list ("1,4,5") or "all"
33-
* @param string $period The period to process, processes data for the period containing the specified date.
34-
* Allowed values: "day", "week", "month", "year", "range".
35-
* @param string|\Piwik\Date $date The date or date range to process.
36-
* 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear),
37-
* or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).
38-
* @param string|false $segment (Optional) Custom segment to filter the report.
39-
* Example: "referrerName==twitter.com"
40-
* Supports AND (;) and OR (,) operators.
41-
* [See documentation](https://developer.matomo.org/api-reference/reporting-api-segmentation)
33+
* @param 'day'|'week'|'month'|'year'|'range' $period The period to process, processes data for the period
34+
* containing the specified date.
35+
* @param string $date The date or date range to process.
36+
* 'YYYY-MM-DD', magic keywords (today, yesterday, lastWeek, lastMonth, lastYear),
37+
* or date range (ie, 'YYYY-MM-DD,YYYY-MM-DD', lastX, previousX).
38+
* @param string|null|false $segment Custom segment to filter the report.
39+
* Example: "referrerName==example.com"
40+
* Supports AND (;) and OR (,) operators.
4241
* @return \Piwik\DataTable|\Piwik\DataTable\Map Provider metrics by internet provider label.
43-
* @throws \Exception If the current user does not have view access to the requested site(s).
4442
*/
4543
public function getProvider($idSite, $period, $date, $segment = false)
4644
{

CHANGELOG.md

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

3+
### 5.0.5
4+
* 27/04/2026 Updated API documentation
5+
36
### 5.0.5
47
* 02/03/2026 Updated API documentation
58

plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Provider",
3-
"version": "5.0.5",
3+
"version": "5.0.6",
44
"description": "Reports the Internet Service Provider of the visitors.",
55
"theme": false,
66
"keywords": ["provider", "internet", "service", "report"],

0 commit comments

Comments
 (0)