TradeTracker API client
A TradeTracker API client to communicate with the webservice and map results to real model objects., (*1)
, (*2)
Installation
You can install the package via composer:, (*3)
$ composer require hypeit/tradetracker-api-client
You must configure authentication in order to use the client., (*4)
$authentication = new Authentication(
12345, // The customer id
'passphrase', // The passphrase
true, // Whether to not allow changes (optional)
'en_GB', // The locale to be used for results. (optional)
false // Whether to receive demo results. (optional)
);
Then inject the wsdl and the authentication object into the client., (*5)
$client = new TradeTrackerClient('http://ws.tradetracker.com/soap/affiliate?wsdl', $authenticate);
Usage
Call a client method to initiate the api call:, (*6)
$affiliateSites = $client->getAffiliateSites();
Common methods are:
- getAffiliateSites
- getCampaigns
- getClickTransactions
- getConversionTransactions
- getTransactions
- getReportAffiliateSite
- getReportCampaign
- getFeeds
- getFeedProductCategories
- getFeedProducts, (*7)
Some method calls can have an optional filter:, (*8)
$filter = new AffiliateSiteFilter();
$filter->setLimit(5);
$affiliateSites = $client->getAffiliateSites($filter);
Testing
bash
$ composer test
, (*9)
License
The MIT License (MIT). Please see License File for more information., (*10)