|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.api.adwords.lib.AdWordsUser
public final class AdWordsUser
An immutable object representing a single AdWords user. The user can act on his/her own behalf, or as an MCC user on behalf of a client.
Field Summary | |
---|---|
static int |
ACCOUNT_SERVICE
|
static int |
AD_GROUP_SERVICE
|
static int |
AD_SERVICE
|
static int |
CAMPAIGN_SERVICE
|
static int |
CRITERION_SERVICE
|
static int |
INFO_SERVICE
|
static int |
KEYWORDTOOL_SERVICE
|
static int |
REPORT_SERVICE
|
static int |
SITE_SUGGESTION_SERVICE
|
static int |
TRAFFIC_ESTIMATOR_SERVICE
|
protected java.lang.String |
version
|
Constructor Summary | |
---|---|
AdWordsUser()
Create an an AdWordsUser with the default properties file name "~/.adwords-api.properties" |
|
AdWordsUser(java.util.Map creds)
Create an an AdWordsUser with the given Map keys that can be specified are email, password, token, useragent, clientEmail and alternateUrl. |
|
AdWordsUser(java.lang.String filename)
Create an an AdWordsUser with the given properties file name properties that can be specified are email, password, token, useragent, clientEmail and alternateUrl. |
|
AdWordsUser(java.lang.String email,
java.lang.String password,
java.lang.String developerToken,
java.lang.String applicationToken,
java.lang.String useragent)
Create an an AdWordsUser with the given email, password, developer token, and useragent. |
|
AdWordsUser(java.lang.String email,
java.lang.String password,
java.lang.String developerToken,
java.lang.String applicationToken,
java.lang.String useragent,
java.lang.String clientEmail)
Create an an AdWordsUser with the given email, password, developer token, useragent, and clientEmail. |
|
AdWordsUser(java.lang.String email,
java.lang.String password,
java.lang.String developerToken,
java.lang.String applicationToken,
java.lang.String useragent,
java.lang.String clientEmail,
java.net.URL alternateUrl,
java.lang.String version)
Create an an AdWordsUser with the given email, password, developer token, useragent, clientEmail, and alternate base URL. |
|
AdWordsUser(java.lang.String email,
java.lang.String password,
java.lang.String developerToken,
java.lang.String applicationToken,
java.lang.String useragent,
java.net.URL url)
Create an an AdWordsUser with the given email, password, developer token, and useragent. |
Method Summary | |
---|---|
java.net.URL |
getAlternateUrl()
Returns the alternate URL associated with this AdWordsUser, or null if the default URL is to be used. |
java.lang.String |
getApplicationToken()
Returns the user's application token. |
java.lang.String |
getClientEmail()
Returns the client's email address, or null if this user acts on his/her own behalf. |
java.lang.String |
getDeveloperToken()
Returns the user's developer token. |
java.lang.String |
getEmail()
Returns the user's email address. |
static java.util.Map |
getMap(java.lang.String filename)
|
java.lang.String |
getPassword()
Returns the user's password. |
java.lang.Object |
getService(int service)
Create a new Axis Service object. |
java.lang.String |
getUseragent()
Returns the user's useragent. |
java.lang.String |
toString()
Returns a String describing this user. |
java.lang.String |
toString(boolean hidePassword,
boolean hideTokens)
Returns a String describing this user. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int ACCOUNT_SERVICE
public static final int AD_SERVICE
public static final int AD_GROUP_SERVICE
public static final int CAMPAIGN_SERVICE
public static final int CRITERION_SERVICE
public static final int INFO_SERVICE
public static final int KEYWORDTOOL_SERVICE
public static final int REPORT_SERVICE
public static final int SITE_SUGGESTION_SERVICE
public static final int TRAFFIC_ESTIMATOR_SERVICE
protected final java.lang.String version
Constructor Detail |
---|
public AdWordsUser() throws java.io.IOException
java.io.IOException
public AdWordsUser(java.lang.String filename) throws java.io.IOException
filename
- the path to the properties file
it needs to follow the java.util.Properties file format
java.io.IOException
public AdWordsUser(java.util.Map creds) throws java.net.MalformedURLException
properties
- the Map object containing the constructor parameters
java.net.MalformedURLException
public AdWordsUser(java.lang.String email, java.lang.String password, java.lang.String developerToken, java.lang.String applicationToken, java.lang.String useragent, java.lang.String clientEmail)
email
- the email address for the MCC account.password
- the password for the MCC account.token
- the developer token for the MCC account.useragent
- the useragent for the application.clientEmail
- the email address for the client.public AdWordsUser(java.lang.String email, java.lang.String password, java.lang.String developerToken, java.lang.String applicationToken, java.lang.String useragent)
email
- the email address for the account.password
- the password for the account.token
- the developer token for the account.useragent
- the useragent for the application.public AdWordsUser(java.lang.String email, java.lang.String password, java.lang.String developerToken, java.lang.String applicationToken, java.lang.String useragent, java.lang.String clientEmail, java.net.URL alternateUrl, java.lang.String version) throws java.net.MalformedURLException
email
- the email address for the MCC account.password
- the password for the MCC account.token
- the developer token for the MCC account.useragent
- the useragent for the application.clientEmail
- the email address for the client.alternateUrl
- the URL to use instead of the default when connecting
to the web service.
java.net.MalformedURLException
- if the provided URL concatenated with the
standard service names produces an invalid
URLpublic AdWordsUser(java.lang.String email, java.lang.String password, java.lang.String developerToken, java.lang.String applicationToken, java.lang.String useragent, java.net.URL url) throws java.net.MalformedURLException
email
- the email address for the account.password
- the password for the account.token
- the developer token for the account.useragent
- the useragent for the application.alternateUrl
- the URL to use instead of the default when connecting
to the web service.
java.net.MalformedURLException
- if the provided URL concatenated with the
standard service names produces an invalid
URLMethod Detail |
---|
public static java.util.Map getMap(java.lang.String filename) throws java.io.IOException
java.io.IOException
public java.lang.String getEmail()
public java.lang.String getPassword()
public java.lang.String getDeveloperToken()
public java.lang.String getApplicationToken()
public java.lang.String getUseragent()
public java.lang.String getClientEmail()
public java.lang.String toString()
"[AdWordsUser
email='user@company.com' clientEmail='someone@client.com']"
toString
in interface Credentials
toString
in class java.lang.Object
public java.lang.String toString(boolean hidePassword, boolean hideTokens)
"[AdWordsUser
email='user@company.com' token='difjwlkdi-fienw']"
hidePassword
- false iff the password may appear in the
result.hideTokens
- false iff the developer and application token may appear
in the result.
public java.net.URL getAlternateUrl()
public final java.lang.Object getService(int service) throws javax.xml.rpc.ServiceException
getService
in interface Credentials
javax.xml.rpc.ServiceException
- if the underlying Axis implementation cannot
be correctly instantiated.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |