The PHP connector for the Evalanche Reporting API simplifies the implementation of the API interface and offers a standardized set of methods.
Installation
The current version of the PHP connector can be downloaded from the official GitHub repository. Make sure that you install the connector as described in the README.
Application
First establish a connection with the available access data.
$connection = \Scn\EvalancheReportingApiConnector\EvalancheConnection::create(
'given host',
'given username',
'given password'
);
The class EvalancheConnection provides a method for each table. The method getPools() for example queries the table 'pools'.
These methods each return a specific client class, e.g. PoolsClient, to specify further options and to receive the data in different formats.
A minimal working example could be:
$Connection->getPools()->asXml();
The available methods follow the "Fluent Interface" pattern, i.e. they allow the concatenation of methods.
Calling a format method like asXml() or asCsv() is always the last call in the chain, because it returns the data.
The following methods are available:
- getCheckpoints(int $customerId = zero)
- getCustomers()
- getForms()
- getLeadpages(int $customerId = zero)
- getMailings()
- getPools()
- getProfileChangelogs(int $pool_id)
- getProfiles(int $pool_id)
- getProfileScores()
- getResourceTypes()
- getScoringGroups()
- getScoringHistory()
- getTrackingHistory()
- getTrackingTypes()
- getNewsletterSendlogs(int $customer_id)
- getMilestoneProfiles(int $customer_id)
See the GitHub repository of the PHP connector for more information