RE: Cant find the Languages set to a Campaign

2021-11-14 Thread 'Google Ads API Forum Advisor' via AdWords API and Google Ads API Forum
Hi Binu,

Thank you for posting your concern.

It appears that the code could not properly get the methods under the 
CampaignCriterionService and this is the possible reason why the error 
occurred. With this, I would suggest reaching out to the author of the client 
library via this link to get assistance to this concern and to address the 
issue. The author of the client library is more equipped to provide support to 
code related issues / concerns.

Regards,
​​
Reminder: Share your feedback about the Google Ads (AdWords) API! Take the 2021 
Google Ads API and AdWords API Annual Survey

Ernie John Blanca Tacata
Google Ads API Team
ref:_00D1U1174p._5004Q2R8aA2:ref

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/VkU1_0R2LMJH00r7x6-XkdSUqYNoP92-P14A%40sfdc.net.


Re: Cant find the Languages set to a Campaign

2021-11-12 Thread Binu Mathew
Any Information Available ??

On Friday, 12 November 2021 at 22:28:00 UTC+5:30 Binu Mathew wrote:

> Hi All
>
> Here is the code i use get languages set to an individual campaign 
>
> $language_query='SELECT language_constant.id FROM campaign_criterion';
>  if ($id !== null) {
> $language_query .= " WHERE campaign.id= $id ";
> }
> $response =$googleAdsServiceClient->searchStream(' 
> ',$language_query);
>   
> foreach ($response->iterateAllElements() as $googleAdsRow) {
> $campaignCriterion = $googleAdsRow->getCampaignCriterion();
> $newCompete = new \StdClass();  
> $newCompete->langauge_code = 
> $campaignCriterion->getLanguage()->getCode();
>  array_push($googleAdsRow, $newCompete);
> 
> }
>
> This code return following error any idea why ? 
>
> message: "Call to a member function getCode() on null"
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/a1b76d79-1827-4297-8958-6cbd82e0d705n%40googlegroups.com.


Cant find the Languages set to a Campaign

2021-11-12 Thread Binu Mathew
Hi All

Here is the code i use get languages set to an individual campaign 

$language_query='SELECT language_constant.id FROM campaign_criterion';
 if ($id !== null) {
$language_query .= " WHERE campaign.id= $id ";
}
$response =$googleAdsServiceClient->searchStream(' 
',$language_query);
  
foreach ($response->iterateAllElements() as $googleAdsRow) {
$campaignCriterion = $googleAdsRow->getCampaignCriterion();
$newCompete = new \StdClass();  
$newCompete->langauge_code = 
$campaignCriterion->getLanguage()->getCode();
 array_push($googleAdsRow, $newCompete);

}

This code return following error any idea why ? 

message: "Call to a member function getCode() on null"

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/5aedffde-6e69-4184-b964-5399d60aa4fcn%40googlegroups.com.