Read Me
The Java client library for the AdWords API makes it easier to write
Java clients to programmatically access AdWords accounts. The client
library is provided in a single jar file that contains all the Axis
jars and pre-compiled stub classes needed to write Java clients.
To use the Java client library, unzip the adwords-{version}.zip file.
This will create and adwords directory that I will reference here as $ADWORDS_ROOT.
Put $ADWORDS_ROOT/adwords-{version}.jar in your classpath. You don't
need to put anything else in your classpath or do any pre-compiling.
You don't need to worry about accessing the WSDL for the web services
-- classes in the client library do it for you.
You can use the demo programs in the $ADWORDS_ROOT/examples directory to get started
writing your own client.
They should work out og the box if you provide the right credentials.
The examples use the default constructor
AdWordsUser me = new AdWordsUser();
which uses credentials provided in ~/adwords.properties
There is sample adwords.properties file in the root of the unzipped adwords-{version}.zip.
You need to customize it with your actual credentials, and copy it in your home directory
before using the samples.
Else you need to use one of the laternate constructors, passing in all the credential parameters,
or a Map containing the credentials with the same keys used in the properties file.
AdWordsUser me = new AdWordsUser(email, password, useragent, token);
To compile the examples:
> cd $ADWORDS_ROOT/examples
> javac --classpath $ADWORDS_ROOT/adwords-{version}.jar *.java
To run the examples:
> javac --classpath $ADWORDS_ROOT/adwords-{version}.jar classname [parameters]
For information on how to use the AdWords API Java client library,
visit index.html in the doc/javadoc directory. For more information
about the AdWords API in general, read the Developer Guide at
http://www.google.com/apis/adwords/developer/