Google_AdvertisersServiceResource

The "advertisers" collection of methods.

Defined (1)

The class is defined in the following location(s).

/google-api-php-client/src/contrib/Google_GanService.php  
  1. class Google_AdvertisersServiceResource extends Google_ServiceResource { 
  2.  
  3. /** 
  4. * Retrieves data about a single advertiser if that the requesting advertiser/publisher has access 
  5. * to it. Only publishers can lookup advertisers. Advertisers can request information about 
  6. * themselves by omitting the advertiserId query parameter. (advertisers.get) 
  7. * @param string $role The role of the requester. Valid values: 'advertisers' or 'publishers'. 
  8. * @param string $roleId The ID of the requesting advertiser or publisher. 
  9. * @param array $optParams Optional parameters. 
  10. * @opt_param string advertiserId The ID of the advertiser to look up. Optional. 
  11. * @return Google_Advertiser 
  12. */ 
  13. public function get($role, $roleId, $optParams = array()) { 
  14. $params = array('role' => $role, 'roleId' => $roleId); 
  15. $params = array_merge($params, $optParams); 
  16. $data = $this->__call('get', array($params)); 
  17. if ($this->useObjects()) { 
  18. return new Google_Advertiser($data); 
  19. } else { 
  20. return $data; 
  21. /** 
  22. * Retrieves data about all advertisers that the requesting advertiser/publisher has access to. 
  23. * (advertisers.list) 
  24. * @param string $role The role of the requester. Valid values: 'advertisers' or 'publishers'. 
  25. * @param string $roleId The ID of the requesting advertiser or publisher. 
  26. * @param array $optParams Optional parameters. 
  27. * @opt_param string advertiserCategory Caret(^) delimted list of advertiser categories. Valid categories are defined here: http://www.google.com/support/affiliatenetwork/advertiser/bin/answer.py?hl=en=107581. Filters out all advertisers not in one of the given advertiser categories. Optional. 
  28. * @opt_param string maxResults Max number of items to return in this page. Optional. Defaults to 20. 
  29. * @opt_param double minNinetyDayEpc Filters out all advertisers that have a ninety day EPC average lower than the given value (inclusive). Min value: 0.0. Optional. 
  30. * @opt_param int minPayoutRank A value between 1 and 4, where 1 represents the quartile of advertisers with the lowest ranks and 4 represents the quartile of advertisers with the highest ranks. Filters out all advertisers with a lower rank than the given quartile. For example if a 2 was given only advertisers with a payout rank of 25 or higher would be included. Optional. 
  31. * @opt_param double minSevenDayEpc Filters out all advertisers that have a seven day EPC average lower than the given value (inclusive). Min value: 0.0. Optional. 
  32. * @opt_param string pageToken The value of 'nextPageToken' from the previous page. Optional. 
  33. * @opt_param string relationshipStatus Filters out all advertisers for which do not have the given relationship status with the requesting publisher. 
  34. * @return Google_Advertisers 
  35. */ 
  36. public function listAdvertisers($role, $roleId, $optParams = array()) { 
  37. $params = array('role' => $role, 'roleId' => $roleId); 
  38. $params = array_merge($params, $optParams); 
  39. $data = $this->__call('list', array($params)); 
  40. if ($this->useObjects()) { 
  41. return new Google_Advertisers($data); 
  42. } else { 
  43. return $data;