\Google\AdsApi\AdWords\ReportingReportDownloadResult

A report result downloaded from the AdWords API. The result can be read either in the form of stream or string, or saved to a file only once.

Trying to re-use the result will cause an exception to be thrown.

Summary

Methods
Properties
Constants
__construct()
getStream()
getAsString()
saveToFile()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$reportDownloadResultDelegate
$adsUtilityRegistry
N/A

Properties

$reportDownloadResultDelegate

$reportDownloadResultDelegate :

Type

$adsUtilityRegistry

$adsUtilityRegistry :

Type

Methods

__construct()

__construct(\Psr\Http\Message\ResponseInterface  $response,\Google\AdsApi\AdWords\Reporting\ReportDownloadResultDelegate|null  $reportDownloadResultDelegate = null,\Google\AdsApi\Common\AdsUtilityRegistry|null  $adsUtilityRegistry = null)

Creates a report download result with the Guzzle response containing the report.

Parameters

\Psr\Http\Message\ResponseInterface $response
\Google\AdsApi\AdWords\Reporting\ReportDownloadResultDelegate|null $reportDownloadResultDelegate
\Google\AdsApi\Common\AdsUtilityRegistry|null $adsUtilityRegistry

getStream()

getStream(): \Psr\Http\Message\StreamInterface

Gets the report download response as a stream.

Returns

\Psr\Http\Message\StreamInterface

getAsString()

getAsString(): string

Gets the report download response as a string.

Throws

\RuntimeException

in case the stream of this download result is read more than once

Returns

string

saveToFile()

saveToFile(string  $filePath)

Writes the contents of the report download response to the specified file.

Parameters

string $filePath

the path to the file to which the contents are saved

Throws

\RuntimeException

in case the stream of this download result is read more than once