Hi,

When I tried to retrieved frequency cap like this It is giving me error.

*Call to undefined method Google\Protobuf\Internal\RepeatedField::getCap()*

Is this  not correct way to get repeated fields?

                   foreach ($campaign->getFrequencyCaps()  as 
$frequencyCapEntry) {
                        $freCaps[] = array($frequencyCapEntry->getCap());
                    }

                   foreach ($campaign->getFrequencyCaps() as 
$frequencyCapEntry) {
                    $freCaps[] = array(
                        'key' => array(
                            'level'=> 
$frequencyCapEntry->getKey()->getLevel(),
                            'event_type'=> 
$frequencyCapEntry->getKey()->getEventType(),
                            'time_unit'=> 
$frequencyCapEntry->getKey()->getTimeUnit(),
                            'time_length'=> 
$frequencyCapEntry->getKey()->getTimeLength()
                        ),
                        'cap' => $frequencyCapEntry->getCap()
                    );
                }
                




On Wednesday, 3 March 2021 at 13:23:44 UTC+5:30 cv wrote:

> Hi,
>
> I need to get FrequencyCapMaxImpressions from Adwords API to Google Ads 
> API.
>
> I am not able to get those details in Google Ads API.
> I am using campaign.frequency_caps fields in SELECT agsing FROM campaign.
>
> Can you please check which fields I need to use?
>
>
> On Friday, 14 August 2020 at 22:11:41 UTC+5:30 adsapiforumadvisor wrote:
>
>> Hi,
>>
>> We have received the logs and will discuss further in the new thread.
>>
>>
>>
>> Thanks and regards,
>> Xiaoming, Google Ads API Team
>>
>>
>>
>> ref:_00D1U1174p._5004Q23I8vx: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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/65deedcc-50e2-42f1-b2a5-5f6451a8b63cn%40googlegroups.com.

Reply via email to