Hi Team,

Thanks a lot for your tips, they did helps!

Thanks again.

Wenjun

在 2019年7月23日星期二 UTC+8上午3:45:19,adsapiforumadvisor写道:
>
> Hi Yang,
>
> Thank you for the question! I see you're using Python so I'll give you my 
> advice from a Python perspective.
>
> Currently there is not good documentation for the methods on each of the 
> services in Python. From a general standpoint you can review these docs 
> <https://developers.google.com/google-ads/api/reference/rpc/google.ads.googleads.v2.services>,
>  
> which describe each of the services and methods defined in the source 
> Protobuf definitions, but they do not provide much detail about how each 
> method is implemented in Python. 
>
> Right now the best source of information is to look at the services source 
> code in the Python library, for example here 
> <https://github.com/googleads/google-ads-python/tree/master/google/ads/google_ads/v2/services>
>  
> are all the services for v2. All of the services are well documented and 
> will tell you what each of the parameters are. You can also find methods 
> that aren't defined at the protobuf level, such as the helper methods that 
> construct resource names. 
>
> On a separate note, regarding resource names, you can check the format for 
> resource names for all objects in the API by looking at the Google Ads 
> Developer Site, for example here's the definition for AdGroupAd 
> <https://developers.google.com/google-ads/api/reference/rpc/google.ads.googleads.v2.resources#adgroupad>.
>  
> Some resource names, including those for AdGroupAds, contain a compound ID, 
> which is the section at the end separated by a '~'. The resource name 
> methods in Python require that those sections be constructed before being 
> passed into the method, which can be confusing. So we have a utility that 
> helps construct those compound IDs, you can see how it's used here 
> <https://github.com/googleads/google-ads-python/blob/master/examples/basic_operations/update_keyword.py#L36>
> .
>
> One last bit of advice, which is something I use quite a lot, is to print 
> the list of a service's attributes using dir to see what methods it has, 
> then use the __doc__ attribute to see it's documentation. It would give 
> you info about the parameters, but it's a useful starting point before 
> digging through the source code.
>
> I'll add a suggestion for us to add language-specific documentation for 
> the service methods and hopefully we can improve this in the future.
>
> Thanks,
> Ben Karl, Google Ads API Team
>
> ref:_00D1U1174p._5001UEFyDn: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/c95f35f1-5bf2-459b-8763-ffabd752b1e2%40googlegroups.com.

Reply via email to