API should not prettify labels when requesting period=week with many periods #7480
Labels
c: Platform
For Matomo platform changes that aren't impacting any of our APIs but improve the core itself.
c: Usability
For issues that let users achieve a defined goal more effectively or efficiently.
Help wanted
Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.
Major
Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Task
Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone
Example URL: http://demo.piwik.org/index.php?module=API&method=Resolution.getResolution&idSite=7&period=week&date=last10&format=JSON
This does the following:
instead it should do for example
For Month we already return "2014-06" but maybe it makes sense to return "2014-06-01,2014-06-30". Not sure! Similar for year etc.
While the prettified label is kinda nice when exporting data, it is not nice to use in third apps such as Piwik Mobile etc since for example the label changes when requesting with a different language see
language=nl
http://demo.piwik.org/index.php?module=API&method=Resolution.getResolution&idSite=7&period=week&date=last10&format=JSON&language=nlWhich returns
Van 2015-01-12 tot 2015-01-18
as a label. Meaning one can never really access the requested period directly etc. since it depends on the language. If we change the language key it would even break the API. This means any translator can break the API etc.Moving to Piwik 3.0 as it is a breaking change.
In case someone is wondering I think the logic for this is here: https://github.com/piwik/piwik/blob/2.12.0-b8/core/Archive/DataTableFactory.php#L385
The text was updated successfully, but these errors were encountered: