public static class ClientLoginTokens.ForApiBuilder extends Object implements Builder<ClientLoginTokens>
DEFAULT_CONFIGURATION_FILENAME
Modifier and Type | Method and Description |
---|---|
ClientLoginTokens |
build()
Constructs this object.
|
ClientLoginTokens.ForApiBuilder |
from(org.apache.commons.configuration.Configuration config)
Reads properties from the provided
Configuration object
Known properties: clientLoginServerUrl - e.g. |
ClientLoginTokens.ForApiBuilder |
fromFile()
Loads credentials from "ads.properties" file in one of the following
locations according to the following order: in the current directory, in
the user home directory, in the classpath
|
ClientLoginTokens.ForApiBuilder |
fromFile(File path)
Populates this builder from a properties file from a specified path.
|
ClientLoginTokens.ForApiBuilder |
fromFile(String path)
Populates this builder from a properties file from a specified path.
|
ClientLoginTokens.ForApiBuilder |
fromFile(URL path)
Populates this builder from a properties file from a specified path.
|
ClientLoginTokens.ForApiBuilder |
withClientLoginServerUrl(String serverUrl)
Sets the client login server that the token will be fetched typically in
the form of
https://www.google.com |
ClientLoginTokens.ForApiBuilder |
withEmailAndPassword(String email,
String password)
Includes email & password to fetch client login token.
|
ClientLoginTokens.ForApiBuilder |
withHttpTransport(com.google.api.client.http.HttpTransport httpTransport)
Sets the
HttpTransport to be used to make the request. |
public ClientLoginTokens.ForApiBuilder fromFile(String path) throws com.google.api.ads.common.lib.conf.ConfigurationLoadException
Builder
fromFile
in interface Builder<ClientLoginTokens>
path
- the path to try first as a resource, then as a filecom.google.api.ads.common.lib.conf.ConfigurationLoadException
- if the configuration could not be
loaded.public ClientLoginTokens.ForApiBuilder fromFile(File path) throws com.google.api.ads.common.lib.conf.ConfigurationLoadException
Builder
fromFile
in interface Builder<ClientLoginTokens>
path
- the path to load properties fromcom.google.api.ads.common.lib.conf.ConfigurationLoadException
- if the configuration could not be
loaded.public ClientLoginTokens.ForApiBuilder fromFile(URL path) throws com.google.api.ads.common.lib.conf.ConfigurationLoadException
Builder
fromFile
in interface Builder<ClientLoginTokens>
path
- the path to try first as a resource, then as a filecom.google.api.ads.common.lib.conf.ConfigurationLoadException
- if the configuration could not be
loaded.public ClientLoginTokens.ForApiBuilder fromFile() throws com.google.api.ads.common.lib.conf.ConfigurationLoadException
Builder
fromFile
in interface Builder<ClientLoginTokens>
com.google.api.ads.common.lib.conf.ConfigurationLoadException
- if the configuration could not be
loaded.public ClientLoginTokens.ForApiBuilder from(org.apache.commons.configuration.Configuration config)
Configuration
object
api.adwords.clientLoginToken
from
in interface Builder<ClientLoginTokens>
config
- the configurationpublic ClientLoginTokens.ForApiBuilder withEmailAndPassword(String email, String password)
public ClientLoginTokens.ForApiBuilder withHttpTransport(com.google.api.client.http.HttpTransport httpTransport)
HttpTransport
to be used to make the request. By
default, NetHttpTransport
will be used, but due to some
environment restrictions, you may want to use a different transport,
such as UrlFetchTransport
for AppEngine.public ClientLoginTokens.ForApiBuilder withClientLoginServerUrl(String serverUrl)
https://www.google.com
public ClientLoginTokens build() throws ValidationException
Builder
build
in interface Builder<ClientLoginTokens>
ValidationException
- if the provided data is not valid.Copyright © 2014. All Rights Reserved.