Piwik Mobile client could use the Metadata API to automatically provide all reports
|Reported by:||matt||Owned by:||tsteur|
|Priority:||major||Milestone:||Piwik Mobile Client|
In Piwik 0.8, a new powerful API was release: metadata API.
The Metadata API is documented in the (new) doc page at: http://dev.piwik.org/trac/wiki/API/Metadata
The Metadata API is used to
- get the list of all reports (category, names, API methods to call, column names, etc.) for all Piwik API reports.
- get a specific API report data set
The Piwik Mobile would therefore not have anything hard coded (list of reports, etc.) as it would simply call the Metadata API once, cache it for the given idSite/date/period.
Then when a specific report is clicked in the Mobile UI, the API.getProcessedReport would return all data ready to be displayed in the Mobile Client.
Let me know if this makes sense.
The big advantage is that, when in the future new reports are released in Piwik, the Mobile client will automatically display these reports (translated, etc.).
This should also simplify the code and make maintenance easier.
This Metadata API is currently used to build the PDF UIs and generate PDF reports. It will also be used for the Custom Alerts plugin.
Let me know if you have any question