Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Piwik Mobile client could use the Metadata API to automatically provide all reports #1606

Closed
mattab opened this issue Aug 16, 2010 · 14 comments
Assignees

Comments

@mattab
Copy link
Member

mattab commented Aug 16, 2010

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

@tsteur
Copy link
Member

tsteur commented Dec 4, 2010

Hey matt,

do you have an idea why http://demo.piwik.org/?idSite=1&date=2010-12-3&apiModule=Actions&apiAction=getOutlinks&period=week&module=API&token_auth=anonymous&format=xml&language=de&method=API.getProcessedReport isn't returning any reportData?

It works if I replace the period by day: period=day

Also date=last10 isn't working. Is this as expected?

Greetz Thomas

@sgiehl
Copy link
Member

sgiehl commented Dec 4, 2010

@tsteur
Copy link
Member

tsteur commented Dec 4, 2010

Hm... it works in version Piwik 1.0 even for the current week...

@tsteur
Copy link
Member

tsteur commented Dec 5, 2010

(In [3405]) refs #1606 use metadata api, changed statstics ui a bit, removed now deprecated files, fixed bug tableview is not clickable after changing website

@tsteur
Copy link
Member

tsteur commented Dec 5, 2010

(In [3406]) refs #1606 removed now deprecated translation keys

@tsteur
Copy link
Member

tsteur commented Dec 5, 2010

(In [3413]) refs #1606 include language in cache key

@tsteur
Copy link
Member

tsteur commented Dec 5, 2010

(In [3415]) refs #1606 do not crash if internet connection is not available

@robocoder
Copy link

Thomas's request in comment:1 works now on the demo server. I wonder if this is the same as wheelerb's post:

I am having the same problem but it seems to come and go. Weekly totals seem to display only after the week has completed but I would like to see weekly and monthly totals part way through the time period. I am using a new install of Piwik 1.0.

@mattab
Copy link
Member Author

mattab commented Dec 6, 2010

The issue might be that on the last day of the week, there is a bug that causes the week not to be processed for this week. I would think this is a regression since I didn't see this on the demo before, but I'm not 100% sure.

@mattab
Copy link
Member Author

mattab commented Dec 6, 2010

For the 'report not processed' bug, I created a new ticket: #1876

Regarding using the metadata in the Piwik Mobile client, is there any issue or is it going OK?

@tsteur
Copy link
Member

tsteur commented Dec 9, 2010

Hi matt,

metadata in the Piwik Mobile client seems to work now. Even statistics from current week are now displayed.

@tsteur
Copy link
Member

tsteur commented Dec 12, 2010

(In [3429]) refs #1606 use session instead of cache

@tsteur
Copy link
Member

tsteur commented Dec 12, 2010

(In [3431]) refs #1606 added missing docblocks

@tsteur
Copy link
Member

tsteur commented Dec 12, 2010

Metadata works. I plan to add further features. For example let the user choose between different available metrics (visits, nb_visits, ...) which is currently not available. I'll create separate tickets for those features.

@mattab mattab added this to the Piwik Mobile Client milestone Jul 8, 2014
@tsteur tsteur added this to the Piwik Mobile 1 milestone Jul 25, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants