croudtech/bingads-wrapper

There is no license information available for the latest version (1.2.2) of this package.

A Wrapper Around Bing.

1.2.2 2018-04-16 14:36 UTC

This package is auto-updated.

Last update: 2024-04-11 02:47:09 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

SemVer

Owner

Rob Sills