Quantcast
Channel: Piwik Forums - Support & Bugs
Viewing all articles
Browse latest Browse all 4243

[Plugin] Calling the API with parameters (no replies)

$
0
0
Hi,

After looking carefullly at the source code I think I understand how to create DataTables for plugins using specific views like this :

$view = Piwik_ViewDataTable::factory();
$view->init( $this->pluginName,  __FUNCTION__, "CustomVariables.getCustomVariables", "getCustomVariablesValuesFromNameId" );

So, if I understand well, it's in the init method that we call the right API, which is CustomVariables.getCustomVariables.

But the thing is, with the rest API we can specify lot of parameters, like segment (http://piwik.org/docs/analytics-api/reference/#toc-module-customvariables) and other parameters with other methods.

In PHP, with this init method, how am I supposed passing this segment parameter, or more generaly, with any method how am I supposed passing them parameters?

I've checked the Piwik_ViewDataTable::setCustomParameter() but it doesn't seem to work or to do what I think it's doing.

Viewing all articles
Browse latest Browse all 4243

Trending Articles