PHP Class NetworkService, googleads-php-lib

Show file Open project: googleads/googleads-php-lib Class Usage Examples

Public Properties

Property Type Description
$classmap array Default class map for wsdl=>php
$endpoint string The endpoint of the service

Public Methods

Method Description
__construct ( string $wsdl, array $options, $user ) Constructor using wsdl location and options array
getAllNetworks ( ) : the Returns the list of {@link Network} objects to which the current login has access.
getCurrentNetwork ( ) : the Returns the current network for which requests are being made.
makeTestNetwork ( ) Creates a new blank network for testing purposes using the current login.
updateNetwork ( $network ) : the Updates the specified network. Currently, only the network display name can be updated.

Method Details

__construct() public method

Constructor using wsdl location and options array
public __construct ( string $wsdl, array $options, $user )
$wsdl string WSDL location for this service
$options array Options for the SoapClient

getAllNetworks() public method

Intended to be used without a network code in the SOAP header when the login may have more than one network associated with it.

public getAllNetworks ( ) : the
return the networks to which the current login has access

getCurrentNetwork() public method

Returns the current network for which requests are being made.
public getCurrentNetwork ( ) : the
return the network for which the user is currently making the request

makeTestNetwork() public method

Each login(i.e. email address) can only have one test network. Data from any of your existing networks will not be transferred to the new test network. Once the test network is created, the test network can be used in the API by supplying the {@link Network#networkCode} in the SOAP header or by logging into the DFP UI.

Test networks are limited in the following ways:

  • Test networks cannot serve ads.
  • Because test networks cannot serve ads, reports will always come back without data.
  • Since forecasting requires serving history, forecast service results will be faked. See {@link ForecastService} for more info.
  • Test networks are, by default, small business networks and do not have any premium features. To have additional features turned on, please contact your account manager.
  • Test networks are limited to 10,000 objects per entity type.

public makeTestNetwork ( )

updateNetwork() public method

Updates the specified network. Currently, only the network display name can be updated.
public updateNetwork ( $network ) : the
return the updated network

Property Details

$classmap public static property

Default class map for wsdl=>php
public static array $classmap
return array

$endpoint public static property

The endpoint of the service
public static string $endpoint
return string