xstyled / knp-piwik-client
Simple client for Piwik (web analytics) API.
dev-master
2016-03-03 10:37 UTC
Requires
- php: >=5.3.0
- kriswallsmith/buzz: ~0.13
- symfony/framework-bundle: 2.*
This package is auto-updated.
Last update: 2025-02-12 02:53:31 UTC
README
PHP 5.3 client for Piwik web analytics.
Usage
-
Through HTTP connection:
<?php $connection = new Knp\PiwikClient\Connection\HttpConnection('http://demo.piwik.org'); $client = new Knp\PiwikClient\Client($connection, 'YOUR_API_TOKEN'); $array = $client->call('API.getReportMetadata', array('idSites' => array(23, 55)));
-
Through local (PHP) connection:
<?php require_once PIWIK_INCLUDE_PATH . "/index.php"; require_once PIWIK_INCLUDE_PATH . "/core/API/Request.php"; Piwik_FrontController::getInstance()->init(); $connection = new Knp\PiwikClient\Connection\PiwikConnection(); $client = new Knp\PiwikClient\Client($connection, 'YOUR_API_TOKEN'); $array = $client->call('API.getReportMetadata', array('idSites' => array(23, 55)));
Methods
To see all available methods & their parameters, visit Piwik API Reference.
Copyright
PiwikClient Copyright (c) 2011 KnpLabs http://www.knplabs.com. See LICENSE for details.