croudtech/bing-wrapper

此包已被废弃,不再维护。作者建议使用croudtech/bingads-wrapper包。
此包最新版本(1.2.2)没有可用的许可证信息。

Bing包装器。

1.2.2 2018-04-16 14:36 UTC

This package is auto-updated.

Last update: 2021-05-10 20:41:23 UTC


README

一些辅助类,围绕Bing API,使生活更加轻松。

用法

Bing报告辅助类

BingReportHelper 包含许多方法,使报告检索变得更加容易。

getReportingClient

这只是检索 Bing 客户端的一种简化方式

$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.
);

工作站设置

一个标准的 composer 应用。

先决条件

  • PHP
  • Composer

版本控制

SemVer

所有者

Rob Sills