Google_ManagementGoalsServiceResource

The "goals" collection of methods.

Defined (1)

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

/google-api-php-client/api-code/contrib/Google_AnalyticsService.php  
  1. class Google_ManagementGoalsServiceResource extends Google_ServiceResource { 
  2.  
  3. /** 
  4. * Gets a goal to which the user has access. (goals.get) 
  5. * @param string $accountId Account ID to retrieve the goal for. 
  6. * @param string $webPropertyId Web property ID to retrieve the goal for. 
  7. * @param string $profileId View (Profile) ID to retrieve the goal for. 
  8. * @param string $goalId Goal ID to retrieve the goal for. 
  9. * @param array $optParams Optional parameters. 
  10. * @return Google_Goal 
  11. */ 
  12. public function get($accountId, $webPropertyId, $profileId, $goalId, $optParams = array()) { 
  13. $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'goalId' => $goalId); 
  14. $params = array_merge($params, $optParams); 
  15. $data = $this->__call('get', array($params)); 
  16. if ($this->useObjects()) { 
  17. return new Google_Goal($data); 
  18. } else { 
  19. return $data; 
  20. /** 
  21. * Create a new goal. (goals.insert) 
  22. * @param string $accountId Account ID to create the goal for. 
  23. * @param string $webPropertyId Web property ID to create the goal for. 
  24. * @param string $profileId View (Profile) ID to create the goal for. 
  25. * @param Google_Goal $postBody 
  26. * @param array $optParams Optional parameters. 
  27. * @return Google_Goal 
  28. */ 
  29. public function insert($accountId, $webPropertyId, $profileId, Google_Goal $postBody, $optParams = array()) { 
  30. $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'postBody' => $postBody); 
  31. $params = array_merge($params, $optParams); 
  32. $data = $this->__call('insert', array($params)); 
  33. if ($this->useObjects()) { 
  34. return new Google_Goal($data); 
  35. } else { 
  36. return $data; 
  37. /** 
  38. * Lists goals to which the user has access. (goals.list) 
  39. * @param string $accountId Account ID to retrieve goals for. Can either be a specific account ID or '~all', which refers to all the accounts that user has access to. 
  40. * @param string $webPropertyId Web property ID to retrieve goals for. Can either be a specific web property ID or '~all', which refers to all the web properties that user has access to. 
  41. * @param string $profileId View (Profile) ID to retrieve goals for. Can either be a specific view (profile) ID or '~all', which refers to all the views (profiles) that user has access to. 
  42. * @param array $optParams Optional parameters. 
  43. * @opt_param int max-results The maximum number of goals to include in this response. 
  44. * @opt_param int start-index An index of the first goal to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter. 
  45. * @return Google_Goals 
  46. */ 
  47. public function listManagementGoals($accountId, $webPropertyId, $profileId, $optParams = array()) { 
  48. $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId); 
  49. $params = array_merge($params, $optParams); 
  50. $data = $this->__call('list', array($params)); 
  51. if ($this->useObjects()) { 
  52. return new Google_Goals($data); 
  53. } else { 
  54. return $data; 
  55. /** 
  56. * Updates an existing view (profile). This method supports patch semantics. 
  57. * (goals.patch) 
  58. * @param string $accountId Account ID to update the goal. 
  59. * @param string $webPropertyId Web property ID to update the goal. 
  60. * @param string $profileId View (Profile) ID to update the goal. 
  61. * @param string $goalId Index of the goal to be updated. 
  62. * @param Google_Goal $postBody 
  63. * @param array $optParams Optional parameters. 
  64. * @return Google_Goal 
  65. */ 
  66. public function patch($accountId, $webPropertyId, $profileId, $goalId, Google_Goal $postBody, $optParams = array()) { 
  67. $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'goalId' => $goalId, 'postBody' => $postBody); 
  68. $params = array_merge($params, $optParams); 
  69. $data = $this->__call('patch', array($params)); 
  70. if ($this->useObjects()) { 
  71. return new Google_Goal($data); 
  72. } else { 
  73. return $data; 
  74. /** 
  75. * Updates an existing view (profile). (goals.update) 
  76. * @param string $accountId Account ID to update the goal. 
  77. * @param string $webPropertyId Web property ID to update the goal. 
  78. * @param string $profileId View (Profile) ID to update the goal. 
  79. * @param string $goalId Index of the goal to be updated. 
  80. * @param Google_Goal $postBody 
  81. * @param array $optParams Optional parameters. 
  82. * @return Google_Goal 
  83. */ 
  84. public function update($accountId, $webPropertyId, $profileId, $goalId, Google_Goal $postBody, $optParams = array()) { 
  85. $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'goalId' => $goalId, 'postBody' => $postBody); 
  86. $params = array_merge($params, $optParams); 
  87. $data = $this->__call('update', array($params)); 
  88. if ($this->useObjects()) { 
  89. return new Google_Goal($data); 
  90. } else { 
  91. return $data;