GoogleApiAdsAdWords
[ class tree: GoogleApiAdsAdWords ] [ index: GoogleApiAdsAdWords ] [ all elements ]

Class: AdWordsUser

Source Location: /AdWords/Lib/AdWordsUser.php

Class Overview

AdsUser
   |
   --AdWordsUser

User class for the AdWords API to create SOAP clients to the available API services.


Methods


Inherited Methods

Class: AdsUser

AdsUser::__construct()
Constructor for AdsUser.
AdsUser::GetAuthServer()
Gets the server used for authentication.
AdsUser::GetAuthVarValue()
Gets the authenticaiton value for the $authVar supplied. If the $authVar is set, it is is used. Otherwirse, the supplied $authenticationIni is queired for the variable. If none is found NULL is returned.
AdsUser::GetClientLibraryIdentifier()
Gets the client library identifier used for user-agent fields.
AdsUser::GetDefaultServer()
Gets the default server.
AdsUser::GetDefaultVersion()
Gets the default version.
AdsUser::GetHeaderNames()
Gets the names of all registered request header elements.
AdsUser::GetHeaderValue()
Gets the value for a registered request header element.
AdsUser::GetLogsDirectory()
Gets the logs directory.
AdsUser::GetOAuthAuthorizationUrl()
Gets the OAuth authorization URL for the OAuth token.
AdsUser::GetOAuthInfo()
Gets the OAuth info for this user.
AdsUser::GetOAuthScope()
Gets the OAuth scope for this user.
AdsUser::GetServiceSoapClient()
Gets the service by its service name.
AdsUser::GetSoapCompressionLevel()
Gets the SOAP compression level.
AdsUser::GetWsdlCacheType()
Gets the type of WSDL caching in use.
AdsUser::IsSoapCompressionEnabled()
Is SOAP compression enabled.
AdsUser::LoadSettings()
Loads the settings for this client library. If the settings INI file located at $settingsIniPath cannot be loaded, then the parameters passed into this method are used.
AdsUser::LogDefaults()
Initiates the default logging behavior of logging all HTTP headers and SOAP XML to the soap_xml.log file and all request information to the request_info.log file under the logs directory.
AdsUser::RequestOAuthToken()
Requests a new OAuth token.
AdsUser::SetDefaultServer()
Sets the default server.
AdsUser::SetDefaultVersion()
Sets the default version.
AdsUser::SetHeaderValue()
Sets the value for a request header.
AdsUser::SetOAuthInfo()
Sets the OAuth info for this user.
AdsUser::UpgradeOAuthToken()
Upgrades the authorized OAuth token.
AdsUser::ValidateOAuthInfo()
Validates that the OAuth info is complete.

Class Details

[line 42]
User class for the AdWords API to create SOAP clients to the available API services.



[ Top ]


Class Methods


constructor __construct [line 99]

AdWordsUser __construct( [string $authenticationIniPath = NULL], [string $email = NULL], [string $password = NULL], [string $developerToken = NULL], [string $applicationToken = NULL], [string $userAgent = NULL], [string $clientId = NULL], [string $settingsIniPath = NULL], [string $authToken = NULL], [array $oauthInfo = NULL])

The AdWordsUser constructor.

The AdWordsUser class can be configured in one of two ways:

  1. Using an authenitcation INI file
  2. Using supplied credentials

If an authentication INI file is provided and successfully loaded, those values will be used unless a corresponding parameter overwrites it. If the authentication INI file is not provided (e.g. it is NULL) the class will attempt to load the default authentication file at the path of "../auth.ini" relative to this file's directory. Any corresponding parameter, which is not NULL, will, however, overwrite any parameter loaded from the default INI.

Likewise, if a custom settings INI file is not provided, the default settings INI file will be loaded from the path of "../settings.ini" relative to this file's directory.




Tags:

access:  public


Overrides AdsUser::__construct() (Constructor for AdsUser.)

Parameters:

string   $authenticationIniPath   the absolute path to the authentication INI or relative to the current directory (cwd). If NULL, the default authentication INI file will attempt to be loaded
string   $email   the email of the user (required header). Will overwrite the email entry loaded from any INI file
string   $password   the password of the user (required header). Will overwrite the password entry loaded from any INI file
string   $developerToken   the developer token (required header). Will overwrite the developer token entry loaded from any INI file
string   $applicationToken   the application token (required header). Will overwrite the application token entry loaded from any INI file
string   $userAgent   the user agent name (required header). Will be prepended with the library name and version. Will also overwrite the userAgent entry in any INI file
string   $clientId   the client email or ID to make the request against (optional header). Will overwrite the clientId, clientEmail, or clientCustomerId entries loaded from any INI file
string   $settingsIniPath   the path to the settings INI file. If NULL, the default settings INI file will be loaded
string   $authToken   the authToken to use for requests
array   $oauthInfo   the OAuth information to use for requests

[ Top ]

method GetAdExtensionOverrideService [line 165]

AdExtensionOverrideService GetAdExtensionOverrideService( [string $version = NULL], [string $server = NULL], [ $serviceFactory = NULL], [bool $validateOnly = NULL])

Gets the AdExtensionOverrideService SOAP client.



Tags:

return:  the instantiated ad extension override service
access:  public


Parameters:

string   $version   the version of the service to get. If NULL, then the default version will be used
string   $server   the server to make the request to. If NULL, then the default server will be used
SoapClientFactory   $serviceFactory   the factory to create the client. If NULL, then the built-in SOAP client factory will be used
bool   $validateOnly   if the service should be created in validateOnly mode

[ Top ]

method GetAdGroupAdService [line 184]

AdGroupAdService GetAdGroupAdService( [string $version = NULL], [string $server = NULL], [ $serviceFactory = NULL], [bool $validateOnly = NULL])

Gets the AdGroupAdService SOAP client.



Tags:

return:  the instantiated ad group ad service
access:  public


Parameters:

string   $version   the version of the service to get. If NULL, then the default version will be used
string   $server   the server to make the request to. If NULL, then the default server will be used
SoapClientFactory   $serviceFactory   the factory to create the client. If NULL, then the built-in SOAP client factory will be used
bool   $validateOnly   if the service should be created in validateOnly mode

[ Top ]

method GetAdGroupCriterionService [line 205]

AdGroupCriterionService GetAdGroupCriterionService( [string $version = NULL], [string $server = NULL], [ $serviceFactory = NULL], [bool $validateOnly = NULL], [bool $partialFailure = NULL])

Gets the AdGroupCriterionService SOAP client.



Tags:

return:  the instantiated ad group criterion service
access:  public


Parameters:

string   $version   the version of the service to get. If NULL, then the default version will be used
string   $server   the server to make the request to. If NULL, then the default server will be used
SoapClientFactory   $serviceFactory   the factory to create the client. If NULL, then the built-in SOAP client factory will be used
bool   $validateOnly   if the service should be created in validateOnly mode
bool   $partialFailure   if the service should be created in partialFailure mode

[ Top ]

method GetAdGroupService [line 224]

AdGroupService GetAdGroupService( [string $version = NULL], [string $server = NULL], [ $serviceFactory = NULL], [bool $validateOnly = NULL])

Gets the AdGroupService SOAP client.



Tags:

return:  the instantiated ad group service
access:  public


Parameters:

string   $version   the version of the service to get. If NULL, then the default version will be used
string   $server   the server to make the request to. If NULL, then the default server will be used
SoapClientFactory   $serviceFactory   the factory to create the client. If NULL, then the built-in SOAP client factory will be used
bool   $validateOnly   if the service should be created in validateOnly mode

[ Top ]

method GetAdParamService [line 243]

AdParamService GetAdParamService( [string $version = NULL], [string $server = NULL], [ $serviceFactory = NULL], [bool $validateOnly = NULL])

Gets the AdParamService SOAP client.



Tags:

return:  the instantiated ad group service
access:  public


Parameters:

string   $version   the version of the service to get. If NULL, then the default version will be used
string   $server   the server to make the request to. If NULL, then the default server will be used
SoapClientFactory   $serviceFactory   the factory to create the client. If NULL, then the built-in SOAP client factory will be used
bool   $validateOnly   if the service should be created in validateOnly mode

[ Top ]

method GetAlertService [line 262]

AlertService GetAlertService( [string $version = NULL], [string $server = NULL], [ $serviceFactory = NULL], [bool $validateOnly = NULL])

Gets the AlertService SOAP client.



Tags:

return:  the instantiated alert service
access:  public


Parameters:

string   $version   the version of the service to get. If NULL, then the default version will be used
string   $server   the server to make the request to. If NULL, then the default server will be used
SoapClientFactory   $serviceFactory   the factory to create the client. If NULL, then the built-in SOAP client factory will be used
bool   $validateOnly   if the service should be created in validateOnly mode

[ Top ]

method GetApplicationToken [line 734]

string GetApplicationToken( )

Gets the application token that this user.



Tags:

return:  the application token
access:  public


[ Top ]

method GetAuthToken [line 698]

string GetAuthToken( )

Gets the authentication token.



Tags:

return:  the auth token
access:  public


[ Top ]

method GetBidLandscapeService [line 281]

BidLandscapeService GetBidLandscapeService( [string $version = NULL], [string $server = NULL], [ $serviceFactory = NULL], [bool $validateOnly = NULL])

Gets the BidLandscapeService SOAP client.



Tags:

return:  the instantiated bid landscape service
access:  public


Parameters:

string   $version   the version of the service to get. If NULL, then the default version will be used
string   $server   the server to make the request to. If NULL, then the default server will be used
SoapClientFactory   $serviceFactory   the factory to create the client. If NULL, then the built-in SOAP client factory will be used
bool   $validateOnly   if the service should be created in validateOnly mode

[ Top ]

method GetBulkMutateJobService [line 300]

BulkMutateJobService GetBulkMutateJobService( [string $version = NULL], [string $server = NULL], [ $serviceFactory = NULL], [bool $validateOnly = NULL])

Gets the BulkMutateJobService SOAP client.



Tags:

return:  the instantiated bulk mutate job service
access:  public


Parameters:

string   $version   the version of the service to get. If NULL, then the default version will be used
string   $server   the server to make the request to. If NULL, then the default server will be used
SoapClientFactory   $serviceFactory   the factory to create the client. If NULL, then the built-in SOAP client factory will be used
bool   $validateOnly   if the service should be created in validateOnly mode

[ Top ]

method GetBulkOpportunityService [line 319]

BulkOpportunityService GetBulkOpportunityService( [string $version = NULL], [string $server = NULL], [ $serviceFactory = NULL], [bool $validateOnly = NULL])

Gets the BulkOpportunityService SOAP client.



Tags:

return:  the instantiated bulk opportunity service
access:  public


Parameters:

string   $version   the version of the service to get. If NULL, then the default version will be used
string   $server   the server to make the request to. If NULL, then the default server will be used
SoapClientFactory   $serviceFactory   the factory to create the client. If NULL, then the built-in SOAP client factory will be used
bool   $validateOnly   if the service should be created in validateOnly mode

[ Top ]

method GetCampaignAdExtensionService [line 339]

CampaignAdExtensionService GetCampaignAdExtensionService( [string $version = NULL], [string $server = NULL], [ $serviceFactory = NULL], [bool $validateOnly = NULL])

Gets the CampaignAdExtensionService SOAP client.



Tags:

return:  the instantiated campaign ad extension service
access:  public


Parameters:

string   $version   the version of the service to get. If NULL, then the default version will be used
string   $server   the server to make the request to. If NULL, then the default server will be used
SoapClientFactory   $serviceFactory   the factory to create the client. If NULL, then the built-in SOAP client factory will be used
bool   $validateOnly   if the service should be created in validateOnly mode

[ Top ]

method GetCampaignCriterionService [line 359]

CampaignCriterionService GetCampaignCriterionService( [string $version = NULL], [string $server = NULL], [ $serviceFactory = NULL], [bool $validateOnly = NULL])

Gets the CampaignCriterionService SOAP client.



Tags:

return:  the instantiated campaign criterion service
access:  public


Parameters:

string   $version   the version of the service to get. If NULL, then the default version will be used
string   $server   the server to make the request to. If NULL, then the default server will be used
SoapClientFactory   $serviceFactory   the factory to create the client. If NULL, then the built-in SOAP client factory will be used
bool   $validateOnly   if the service should be created in validateOnly mode

[ Top ]

method GetCampaignService [line 378]

CampaignService GetCampaignService( [string $version = NULL], [string $server = NULL], [ $serviceFactory = NULL], [bool $validateOnly = NULL])

Gets the CampaignService SOAP client.



Tags:

return:  the instantiated campaign service
access:  public


Parameters:

string   $version   the version of the service to get. If NULL, then the default version will be used
string   $server   the server to make the request to. If NULL, then the default server will be used
SoapClientFactory   $serviceFactory   the factory to create the client. If NULL, then the built-in SOAP client factory will be used
bool   $validateOnly   if the service should be created in validateOnly mode

[ Top ]

method GetCampaignTargetService [line 397]

CampaignTargetService GetCampaignTargetService( [string $version = NULL], [string $server = NULL], [ $serviceFactory = NULL], [bool $validateOnly = NULL])

Gets the CampaignTargetService SOAP client.



Tags:

return:  the instantiated campaign target service
access:  public


Parameters:

string   $version   the version of the service to get. If NULL, then the default version will be used
string   $server   the server to make the request to. If NULL, then the default server will be used
SoapClientFactory   $serviceFactory   the factory to create the client. If NULL, then the built-in SOAP client factory will be used
bool   $validateOnly   if the service should be created in validateOnly mode

[ Top ]

method GetClientId [line 751]

string GetClientId( )

Gets the client ID for this user. Can be the client email or client customer ID.



Tags:

return:  the client ID for this user
access:  public


[ Top ]

method GetClientLibraryIdentifier [line 830]

string GetClientLibraryIdentifier( )

Gets the client library identifier used for user-agent fields.



Tags:

return:  a unique client library identifier
access:  public


Overrides AdsUser::GetClientLibraryIdentifier() (Gets the client library identifier used for user-agent fields.)

[ Top ]

method GetConversionTrackerService [line 417]

ConversionTrackerService GetConversionTrackerService( [string $version = NULL], [string $server = NULL], [ $serviceFactory = NULL], [bool $validateOnly = NULL])

Gets the ConversionTrackerService SOAP client.



Tags:

return:  the instantiated conversion tracker service
access:  public


Parameters:

string   $version   the version of the service to get. If NULL, then the default version will be used
string   $server   the server to make the request to. If NULL, then the default server will be used
SoapClientFactory   $serviceFactory   the factory to create the client. If NULL, then the built-in SOAP client factory will be used
bool   $validateOnly   if the service should be created in validateOnly mode

[ Top ]

method GetCustomerSyncService [line 436]

CustomerSyncService GetCustomerSyncService( [string $version = NULL], [string $server = NULL], [ $serviceFactory = NULL], [bool $validateOnly = NULL])

Gets the CustomerSyncService SOAP client.



Tags:

return:  the instantiated customer sync service
access:  public


Parameters:

string   $version   the version of the service to get. If NULL, then the default version will be used
string   $server   the server to make the request to. If NULL, then the default server will be used
SoapClientFactory   $serviceFactory   the factory to create the client. If NULL, then the built-in SOAP client factory will be used
bool   $validateOnly   if the service should be created in validateOnly mode

[ Top ]

method GetDataService [line 455]

DataService GetDataService( [string $version = NULL], [string $server = NULL], [ $serviceFactory = NULL], [bool $validateOnly = NULL])

Gets the DataService SOAP client.



Tags:

return:  the instantiated data service
access:  public


Parameters:

string   $version   the version of the service to get. If NULL, then the default version will be used
string   $server   the server to make the request to. If NULL, then the default server will be used
SoapClientFactory   $serviceFactory   the factory to create the client. If NULL, then the built-in SOAP client factory will be used
bool   $validateOnly   if the service should be created in validateOnly mode

[ Top ]

method GetDeveloperToken [line 718]

string GetDeveloperToken( )

Gets the developer token for this user.



Tags:

return:  the developer token
access:  public


[ Top ]

method GetEmail [line 798]

string GetEmail( )

Gets the email address of the user login.



Tags:

return:  the user login email
access:  public


[ Top ]

method GetExperimentService [line 474]

ExperimentService GetExperimentService( [string $version = NULL], [string $server = NULL], [ $serviceFactory = NULL], [bool $validateOnly = NULL])

Gets the ExperimentService SOAP client.



Tags:

return:  the instantiated experiment service
access:  public


Parameters:

string   $version   the version of the service to get. If NULL, then the default version will be used
string   $server   the server to make the request to. If NULL, then the default server will be used
SoapClientFactory   $serviceFactory   the factory to create the client. If NULL, then the built-in SOAP client factory will be used
bool   $validateOnly   if the service should be created in validateOnly mode

[ Top ]

method GetGeoLocationService [line 493]

GeoLocationService GetGeoLocationService( [string $version = NULL], [string $server = NULL], [ $serviceFactory = NULL], [bool $validateOnly = NULL])

Gets the GeoLocationService SOAP client.



Tags:

return:  the instantiated geo location service
access:  public


Parameters:

string   $version   the version of the service to get. If NULL, then the default version will be used
string   $server   the server to make the request to. If NULL, then the default server will be used
SoapClientFactory   $serviceFactory   the factory to create the client. If NULL, then the built-in SOAP client factory will be used
bool   $validateOnly   if the service should be created in validateOnly mode

[ Top ]

method GetInfoService [line 512]

InfoService GetInfoService( [string $version = NULL], [string $server = NULL], [ $serviceFactory = NULL], [bool $validateOnly = NULL])

Gets the InfoService SOAP client.



Tags:

return:  the instantiated info service
access:  public


Parameters:

string   $version   the version of the service to get. If NULL, then the default version will be used
string   $server   the server to make the request to. If NULL, then the default server will be used
SoapClientFactory   $serviceFactory   the factory to create the client. If NULL, then the built-in SOAP client factory will be used
bool   $validateOnly   if the service should be created in validateOnly mode

[ Top ]

method GetMediaService [line 531]

MediaService GetMediaService( [string $version = NULL], [string $server = NULL], [ $serviceFactory = NULL], [bool $validateOnly = NULL])

Gets the MediaService SOAP client.



Tags:

return:  the instantiated media service
access:  public


Parameters:

string   $version   the version of the service to get. If NULL, then the default version will be used
string   $server   the server to make the request to. If NULL, then the default server will be used
SoapClientFactory   $serviceFactory   the factory to create the client. If NULL, then the built-in SOAP client factory will be used
bool   $validateOnly   if the service should be created in validateOnly mode

[ Top ]

method GetOAuthScope [line 871]

string GetOAuthScope( [string $server = NULL])

Gets the OAuth scope for this user.



Tags:

return:  the OAuth scope to use when requesting the token
access:  protected


Overrides AdsUser::GetOAuthScope() (Gets the OAuth scope for this user.)

Parameters:

string   $server   the AdWords API server that requests will be made to

[ Top ]

method GetPassword [line 814]

string GetPassword( )

Gets the password for this user.



Tags:

return:  the password for this user
access:  public


[ Top ]

method GetReportDefinitionService [line 550]

ReportDefinitionService GetReportDefinitionService( [string $version = NULL], [string $server = NULL], [ $serviceFactory = NULL], [bool $validateOnly = NULL])

Gets the ReportDefinitionService SOAP client.



Tags:

return:  the instantiated report definition service
access:  public


Parameters:

string   $version   the version of the service to get. If NULL, then the default version will be used
string   $server   the server to make the request to. If NULL, then the default server will be used
SoapClientFactory   $serviceFactory   the factory to create the client. If NULL, then the built-in SOAP client factory will be used
bool   $validateOnly   if the service should be created in validateOnly mode

[ Top ]

method GetServicedAccountService [line 569]

ServicedAccountService GetServicedAccountService( [string $version = NULL], [string $server = NULL], [ $serviceFactory = NULL], [bool $validateOnly = NULL])

Gets the ServicedAccountService SOAP client.



Tags:

return:  the instantiated report definition service
access:  public


Parameters:

string   $version   the version of the service to get. If NULL, then the default version will be used
string   $server   the server to make the request to. If NULL, then the default server will be used
SoapClientFactory   $serviceFactory   the factory to create the client. If NULL, then the built-in SOAP client factory will be used
bool   $validateOnly   if the service should be created in validateOnly mode

[ Top ]

method GetTargetingIdeaService [line 588]

TargetingIdeaService GetTargetingIdeaService( [string $version = NULL], [string $server = NULL], [ $serviceFactory = NULL], [bool $validateOnly = NULL])

Gets the TargetingIdeaService SOAP client.



Tags:

return:  the instantiated targeting idea service
access:  public


Parameters:

string   $version   the version of the service to get. If NULL, then the default version will be used
string   $server   the server to make the request to. If NULL, then the default server will be used
SoapClientFactory   $serviceFactory   the factory to create the client. If NULL, then the built-in SOAP client factory will be used
bool   $validateOnly   if the service should be created in validateOnly mode

[ Top ]

method GetTrafficEstimatorService [line 607]

TrafficEstimatorService GetTrafficEstimatorService( [string $version = NULL], [string $server = NULL], [ $serviceFactory = NULL], [bool $validateOnly = NULL])

Gets the TrafficEstimatorService SOAP client.



Tags:

return:  the instantiated traffic estimator service
access:  public


Parameters:

string   $version   the version of the service to get. If NULL, then the default version will be used
string   $server   the server to make the request to. If NULL, then the default server will be used
SoapClientFactory   $serviceFactory   the factory to create the client. If NULL, then the built-in SOAP client factory will be used
bool   $validateOnly   if the service should be created in validateOnly mode

[ Top ]

method GetUserAgent [line 780]

string GetUserAgent( )

Gets the user agent for this library.



Tags:

return:  the user agent
access:  public


[ Top ]

method GetUserListService [line 626]

TrafficEstimatorService GetUserListService( [string $version = NULL], [string $server = NULL], [ $serviceFactory = NULL], [bool $validateOnly = NULL])

Gets the UserListService SOAP client.



Tags:

return:  the instantiated traffic estimator service
access:  public


Parameters:

string   $version   the version of the service to get. If NULL, then the default version will be used
string   $server   the server to make the request to. If NULL, then the default server will be used
SoapClientFactory   $serviceFactory   the factory to create the client. If NULL, then the built-in SOAP client factory will be used
bool   $validateOnly   if the service should be created in validateOnly mode

[ Top ]

method RegenerateAuthToken [line 683]

string RegenerateAuthToken( [string $server = NULL])

Regenerates the authentication token and sets it for this user.



Tags:

return:  the newly generated auth token
access:  public


Parameters:

string   $server   the sever to retrieve the token from

[ Top ]

method SetApplicationToken [line 742]

void SetApplicationToken( string $applicationToken)

Sets the application token for this user.



Tags:

access:  public


Parameters:

string   $applicationToken   the application token

[ Top ]

method SetAuthToken [line 710]

void SetAuthToken( string $authToken)

Sets the authentication token.



Tags:

access:  public


Parameters:

string   $authToken   the auth token to set

[ Top ]

method SetClientId [line 765]

void SetClientId( string $clientId)

Sets the client ID for this user. Can be the client email or client customer ID. Setting $clientId to NULL will result in removing both the clientEmail and clientCustomerId fields.



Tags:

access:  public


Parameters:

string   $clientId   the client ID for this user

[ Top ]

method SetClientLibraryUserAgent [line 789]

void SetClientLibraryUserAgent( string $userAgent)

Sets the user agent for this library.



Tags:

access:  public


Parameters:

string   $userAgent   the user agent. Will be prepended with the library name and version.

[ Top ]

method SetDeveloperToken [line 726]

void SetDeveloperToken( string $developerToken)

Sets the developer token for this user.



Tags:

access:  public


Parameters:

string   $developerToken   the developer token

[ Top ]

method SetEmail [line 806]

void SetEmail( string $email)

Sets the email address of the user login.



Tags:

access:  public


Parameters:

string   $email   the user login email

[ Top ]

method SetPassword [line 822]

void SetPassword( string $password)

Sets the password for this user.



Tags:

access:  public


Parameters:

string   $password   the password for this user

[ Top ]

method ValidateUser [line 838]

void ValidateUser( )

Validates the user and throws a validation error if there are any errors.



Tags:

throws:  ValidationException if there are any validation errors
access:  public


[ Top ]


Documentation generated by phpDocumentor 1.4.3