Some helper classes arround the Bing API to make life alittle easier.
The BingReportHelper cointains a number of methods that makes report retreival much easier.
This is just a simplifeid way of retreiveing a bing client
$bingReportHelper = new \BingWrapper\ReportHelper\ReportHelper();
// use
$client = $this->bingReportHelper->getReportingClient(
'bingUserName',
'bingPassword',
'bingApiKey'
);
$bingReportHelper = new \BingWrapper\ReportHelper\ReportHelper();
$bingAccountId = 123;
$startDate = carbon::now()->subDay();
$endDate = carbon::now();
return $this->bingReportHelper->downloadKeywordPerformanceReportCsv(
$client,
$startDate,
$endDate,
[$bingAccountId],
'/location/on/fileSytem/to/store/csv',
[] // arrray of colunm names to exclude.
);
$bingReportHelper = new \BingWrapper\ReportHelper\ReportHelper();
$bingAccountId = 123;
$startDate = carbon::now()->subDay();
$endDate = carbon::now();
return $this->bingReportHelper->downloadAdPerformanceReportCsv(
$client,
$startDate,
$endDate,
[$bingAccountId],
'/location/on/fileSytem/to/store/csv',
[] // arrray of colunm names to exclude.
);
Just a standard composer app.
- PHP
- Composer
Rob Sills