\Google\AdsApi\CommonAdsHeaderFormatter

Provides methods related to formatting HTTP and SOAP headers for ads APIs.

Summary

Methods
Properties
Constants
__construct()
formatApplicationNameForSoapHeader()
formatApplicationNameForGuzzleHeader()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
formatUtilUsages()
formatGuzzleInfo()
getGuzzleVersion()
$adsUtilityRegistry
$libraryMetadataProvider
N/A

Properties

$adsUtilityRegistry

$adsUtilityRegistry :

Type

$libraryMetadataProvider

$libraryMetadataProvider :

Type

Methods

formatApplicationNameForSoapHeader()

formatApplicationNameForSoapHeader(string  $applicationName,string  $productNameForSoapHeader,boolean  $includeUtilityUsage): string

Formats an application name in a format standard to the ads libraries to include in the SOAP header.

Parameters

string $applicationName

the application name to format

string $productNameForSoapHeader

the ads product API calls are being made against, formatted to be used in the SOAP header

boolean $includeUtilityUsage

true if logging of utilities usages is turned on

Returns

string —

the formatted application name

formatApplicationNameForGuzzleHeader()

formatApplicationNameForGuzzleHeader(string  $applicationName,string  $productName,boolean  $includeUtilityUsage,null|boolean  $isReportingGzipEnabled = null): string

Formats an application name in a format standard to the ads libraries to include in the Guzzle HTTP header.

Parameters

string $applicationName

the application name to format

string $productName

the ads product API calls are being made against

boolean $includeUtilityUsage

true if logging of utilities usages is turned on

null|boolean $isReportingGzipEnabled

true if the user agent should include "gzip" to indicate that this request should be gzip-compressed

Returns

string —

the formatted application name

formatUtilUsages()

formatUtilUsages(  $adsUtilities,  $includeUtilityUsage)

Parameters

$adsUtilities
$includeUtilityUsage

formatGuzzleInfo()

formatGuzzleInfo()

getGuzzleVersion()

getGuzzleVersion()