Friday, August 9, 2024

Digest for adsense-api@googlegroups.com - 2 updates in 1 topic

Jason <qq286027564@gmail.com>: Aug 07 03:03PM -0700

Hi Andrew,
thank you for the answer.
https://github.com/googleads/googleads-adsense-examples/tree/HEAD/v2/php/examples/GenerateReport.php has
only an example of generate method, but no generateCsv method
I tried $report = $service->accounts_reports->generateCsv($account,
$optParams); its returned value is HttpBody and I have no idea how to get
data from it.
 
 
 
 
On Thursday, August 8, 2024 at 1:42:39 AM UTC+8 Ad Sense API wrote:
 
Ad Sense API <adsenseapi@forumsupport.google>: Aug 08 09:12AM

Hi Jason,
 
It looks like you will be getting back the https://github.com/googleapis/google-api-php-client-services/blob/main/src/Adsense/HttpBody.php type, and calling getData() should get you the contents. Alternatively if you can get the generateCsv output in plain text, the CSV report appears after the http headers, so it should just be a case of ignoring the text until it gets to the line that includes the report column names.
 
I hope that helps.
Regards,
Andrew (AdSense API team)
ref:!00D1U01174p.!5004Q02vEfLJ:ref
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to adsense-api+unsubscribe@googlegroups.com.

No comments:

Post a Comment