public class PiwikTracker extends Object
PiwikRequests to a specified Piwik server.| Constructor and Description |
|---|
PiwikTracker(String hostUrl)
Creates a tracker that will send
PiwikRequests to the specified
Tracking HTTP API endpoint. |
PiwikTracker(String hostUrl,
String proxyHost,
int proxyPort)
Creates a tracker that will send
PiwikRequests to the specified
Tracking HTTP API endpoint via the provided proxy |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.http.client.HttpClient |
getHttpClient()
Get a HTTP client.
|
org.apache.http.HttpResponse |
sendBulkRequest(Iterable<PiwikRequest> requests)
Send multiple requests in a single HTTP call.
|
org.apache.http.HttpResponse |
sendBulkRequest(Iterable<PiwikRequest> requests,
String authToken)
Send multiple requests in a single HTTP call.
|
org.apache.http.HttpResponse |
sendRequest(PiwikRequest request)
Send a request.
|
public PiwikTracker(String hostUrl)
PiwikRequests to the specified
Tracking HTTP API endpoint.hostUrl - url endpoint to send requests to. Usually in the format
http://your-piwik-domain.tld/piwik.php.public PiwikTracker(String hostUrl, String proxyHost, int proxyPort)
PiwikRequests to the specified
Tracking HTTP API endpoint via the provided proxyhostUrl - url endpoint to send requests to. Usually in the format
http://your-piwik-domain.tld/piwik.php.proxyHost - url endpoint for the proxyproxyPort - proxy server port numberpublic org.apache.http.HttpResponse sendRequest(PiwikRequest request) throws IOException
request - request to sendIOException - thrown if there was a problem with this connectionpublic org.apache.http.HttpResponse sendBulkRequest(Iterable<PiwikRequest> requests) throws IOException
requests - the requests to sendIOException - thrown if there was a problem with this connectionpublic org.apache.http.HttpResponse sendBulkRequest(Iterable<PiwikRequest> requests, String authToken) throws IOException
requests - the requests to sendauthToken - specify if any of the parameters use require AuthTokenIOException - thrown if there was a problem with this connectionprotected org.apache.http.client.HttpClient getHttpClient()
Copyright © 2016. All rights reserved.