Skip to content

CroudTech/library-php-bing-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bing Wrapper

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

SemVer

Owner

Rob Sills

About

A Wrapper Around Bing.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages