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, 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 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. 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.
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