Google_Service_Dfareporting_Campaigns_Resource

The "campaigns" collection of methods.

Defined (1)

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

/includes/api-libs/Google/Service/Dfareporting.php  
  1. class Google_Service_Dfareporting_Campaigns_Resource extends Google_Service_Resource 
  2.  
  3. /** 
  4. * Gets one campaign by ID. (campaigns.get) 
  5. * @param string $profileId User profile ID associated with this request. 
  6. * @param string $id Campaign ID. 
  7. * @param array $optParams Optional parameters. 
  8. * @return Google_Service_Dfareporting_Campaign 
  9. */ 
  10. public function get($profileId, $id, $optParams = array()) 
  11. $params = array('profileId' => $profileId, 'id' => $id); 
  12. $params = array_merge($params, $optParams); 
  13. return $this->call('get', array($params), "Google_Service_Dfareporting_Campaign"); 
  14.  
  15. /** 
  16. * Inserts a new campaign. (campaigns.insert) 
  17. * @param string $profileId User profile ID associated with this request. 
  18. * @param string $defaultLandingPageName Default landing page name for this new 
  19. * campaign. Must be less than 256 characters long. 
  20. * @param string $defaultLandingPageUrl Default landing page URL for this new 
  21. * campaign. 
  22. * @param Google_Campaign $postBody 
  23. * @param array $optParams Optional parameters. 
  24. * @return Google_Service_Dfareporting_Campaign 
  25. */ 
  26. public function insert($profileId, $defaultLandingPageName, $defaultLandingPageUrl, Google_Service_Dfareporting_Campaign $postBody, $optParams = array()) 
  27. $params = array('profileId' => $profileId, 'defaultLandingPageName' => $defaultLandingPageName, 'defaultLandingPageUrl' => $defaultLandingPageUrl, 'postBody' => $postBody); 
  28. $params = array_merge($params, $optParams); 
  29. return $this->call('insert', array($params), "Google_Service_Dfareporting_Campaign"); 
  30.  
  31. /** 
  32. * Retrieves a list of campaigns, possibly filtered. (campaigns.listCampaigns) 
  33. * @param string $profileId User profile ID associated with this request. 
  34. * @param array $optParams Optional parameters. 
  35. * @opt_param bool archived Select only archived campaigns. Don't set this field 
  36. * to select both archived and non-archived campaigns. 
  37. * @opt_param string searchString Allows searching for campaigns by name or ID. 
  38. * Wildcards (*) are allowed. For example, "campaign*2015" will return campaigns 
  39. * with names like "campaign June 2015", "campaign April 2015" or simply 
  40. * "campaign 2015". Most of the searches also add wildcards implicitly at the 
  41. * start and the end of the search string. For example, a search string of 
  42. * "campaign" will match campaigns with name "my campaign", "campaign 2015" or 
  43. * simply "campaign". 
  44. * @opt_param string subaccountId Select only campaigns that belong to this 
  45. * subaccount. 
  46. * @opt_param string sortField Field by which to sort the list. 
  47. * @opt_param string advertiserIds Select only campaigns that belong to these 
  48. * advertisers. 
  49. * @opt_param string ids Select only campaigns with these IDs. 
  50. * @opt_param int maxResults Maximum number of results to return. 
  51. * @opt_param string excludedIds Exclude campaigns with these IDs. 
  52. * @opt_param string pageToken Value of the nextPageToken from the previous 
  53. * result page. 
  54. * @opt_param string advertiserGroupIds Select only campaigns whose advertisers 
  55. * belong to these advertiser groups. 
  56. * @opt_param string sortOrder Order of sorted results, default is ASCENDING. 
  57. * @opt_param string overriddenEventTagId Select only campaigns that have 
  58. * overridden this event tag ID. 
  59. * @opt_param bool atLeastOneOptimizationActivity Select only campaigns that 
  60. * have at least one optimization activity. 
  61. * @return Google_Service_Dfareporting_CampaignsListResponse 
  62. */ 
  63. public function listCampaigns($profileId, $optParams = array()) 
  64. $params = array('profileId' => $profileId); 
  65. $params = array_merge($params, $optParams); 
  66. return $this->call('list', array($params), "Google_Service_Dfareporting_CampaignsListResponse"); 
  67.  
  68. /** 
  69. * Updates an existing campaign. This method supports patch semantics. 
  70. * (campaigns.patch) 
  71. * @param string $profileId User profile ID associated with this request. 
  72. * @param string $id Campaign ID. 
  73. * @param Google_Campaign $postBody 
  74. * @param array $optParams Optional parameters. 
  75. * @return Google_Service_Dfareporting_Campaign 
  76. */ 
  77. public function patch($profileId, $id, Google_Service_Dfareporting_Campaign $postBody, $optParams = array()) 
  78. $params = array('profileId' => $profileId, 'id' => $id, 'postBody' => $postBody); 
  79. $params = array_merge($params, $optParams); 
  80. return $this->call('patch', array($params), "Google_Service_Dfareporting_Campaign"); 
  81.  
  82. /** 
  83. * Updates an existing campaign. (campaigns.update) 
  84. * @param string $profileId User profile ID associated with this request. 
  85. * @param Google_Campaign $postBody 
  86. * @param array $optParams Optional parameters. 
  87. * @return Google_Service_Dfareporting_Campaign 
  88. */ 
  89. public function update($profileId, Google_Service_Dfareporting_Campaign $postBody, $optParams = array()) 
  90. $params = array('profileId' => $profileId, 'postBody' => $postBody); 
  91. $params = array_merge($params, $optParams); 
  92. return $this->call('update', array($params), "Google_Service_Dfareporting_Campaign");