Thank you for the enums list, it solved most of the issues I had, but there 
is a function getType() which always returns 11 integer value and I can't 
relate to it for the label part.
For example 

foreach ($response->iterateAllElements() as $googleAdsRow) {
            /** @var GoogleAdsRow $googleAdsRow */
            $recommendation = $googleAdsRow->getRecommendation();

            $recommendedAd = $recommendation->
getTargetCpaOptInRecommendation();    
            echo $recommendedAd = $recommendation->
getTargetCpaOptInRecommendation()->getOptions()->getType();###ALWAYS PRINTS 
11

}



Also I got struct while trying to display data for SITELINK_EXTENSION type 
recommendation.

How do I extract information for this type, I do see some methods like

 $recommendedAd = $recommendation->getSitelinkExtensionRecommendation();
                    
 print_r(get_class_methods($recommendedAd->getRecommendedExtensions()->
getClass() ));
 echo "<br>getLine1Unwrapped: " . print_r($recommendedAd->
getRecommendedExtensions()->getClass()->getLine1Unwrapped() ); 


But they give me error that `Uncaught Error: Call to a member function 
getLine1Unwrapped() on string`. 

For recommendation type "SEARCH_PARTNERS_OPT_IN" I do not see any get 
function that can be used to extract data, is that the case?

On Wednesday, May 6, 2020 at 7:16:27 PM UTC+5:30, adsapiforumadvisor wrote:
>
> Hi Shiv,
>
> For your first question, you can find this information in the resource 
> <https://developers.google.com/google-ads/api/reference/rpc/google.ads.googleads.v3.resources>
>  
> of the desired recommendation type. For the example of keyword 
> recommendations, you can retrieve the values available in 
> KeywordRecommendation 
> <https://developers.google.com/google-ads/api/reference/rpc/google.ads.googleads.v3.resources#keywordrecommendation>
>  
> and for text ad recommendations, TextAdRecommendation 
> <https://developers.google.com/google-ads/api/reference/rpc/google.ads.googleads.v3.resources#textadrecommendation>
> .
>
> To understand the numeric value of the match types, you can see here 
> <https://github.com/googleapis/googleapis/blob/master/google/ads/googleads/v3/enums/keyword_match_type.proto>.
>  
> The enums 
> <https://github.com/googleapis/googleapis/tree/master/google/ads/googleads/v3/enums>
>  
> folder contains all of the protos for different resources.
>
> Regards,
> Mitchell
> Google Ads API Team
>
> ref:_00D1U1174p._5004Q1zK8TD: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/6bf82974-e550-4cec-8ad5-ade5d7cac35a%40googlegroups.com.

Reply via email to