croudtech / bing-wrapper
A Wrapper Around Bing.
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
pkg:composer/croudtech/bing-wrapper
Requires
- league/csv: ^9.1
- microsoft/bingads: ^0.11.5
- nesbot/carbon: ^1.22
Requires (Dev)
- larapack/dd: ^1.1
- phpunit/phpunit: ~5.7
This package is auto-updated.
Last update: 2021-05-10 20:41:23 UTC
README
Some helper classes arround the Bing API to make life alittle easier.
Usage
Bing Report Helper Class
The BingReportHelper cointains a number of methods that makes report retreival much easier.
getReportingClient
This is just a simplifeid way of retreiveing a bing client
$bingReportHelper = new \BingWrapper\ReportHelper\ReportHelper(); // use $client = $this->bingReportHelper->getReportingClient( 'bingUserName', 'bingPassword', 'bingApiKey' );
downloadKeywordPerformanceReportCsv
$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. );
downloadAdPerformanceReportCsv
$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. );
Workstation Setup
Just a standard composer app.
Prerequisites
- PHP
- Composer
Versioning
Owner
Rob Sills