Google_ManagementProfilesServiceResource
The "profiles" collection of methods.
Defined (1)
The class is defined in the following location(s).
- /src/contrib/Google_AnalyticsService.php
- class Google_ManagementProfilesServiceResource extends Google_ServiceResource {
- /**
- * Deletes a view (profile). (profiles.delete)
- *
- * @param string $accountId Account ID to delete the view (profile) for.
- * @param string $webPropertyId Web property ID to delete the view (profile) for.
- * @param string $profileId ID of the view (profile) to be deleted.
- * @param array $optParams Optional parameters.
- */
- public function delete($accountId, $webPropertyId, $profileId, $optParams = array()) {
- $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('delete', array($params));
- return $data;
- }
- /**
- * Gets a view (profile) to which the user has access. (profiles.get)
- *
- * @param string $accountId Account ID to retrieve the goal for.
- * @param string $webPropertyId Web property ID to retrieve the goal for.
- * @param string $profileId View (Profile) ID to retrieve the goal for.
- * @param array $optParams Optional parameters.
- * @return Google_Profile
- */
- public function get($accountId, $webPropertyId, $profileId, $optParams = array()) {
- $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('get', array($params));
- if ($this->useObjects()) {
- return new Google_Profile($data);
- } else {
- return $data;
- }
- }
- /**
- * Create a new view (profile). (profiles.insert)
- *
- * @param string $accountId Account ID to create the view (profile) for.
- * @param string $webPropertyId Web property ID to create the view (profile) for.
- * @param Google_Profile $postBody
- * @param array $optParams Optional parameters.
- * @return Google_Profile
- */
- public function insert($accountId, $webPropertyId, Google_Profile $postBody, $optParams = array()) {
- $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('insert', array($params));
- if ($this->useObjects()) {
- return new Google_Profile($data);
- } else {
- return $data;
- }
- }
- /**
- * Lists views (profiles) to which the user has access. (profiles.list)
- *
- * @param string $accountId Account ID for the view (profiles) to retrieve. Can either be a specific account ID or '~all', which refers to all the accounts to which the user has access.
- * @param string $webPropertyId Web property ID for the views (profiles) to retrieve. Can either be a specific web property ID or '~all', which refers to all the web properties to which the user has access.
- * @param array $optParams Optional parameters.
- *
- * @opt_param int max-results The maximum number of views (profiles) to include in this response.
- * @opt_param int start-index An index of the first entity to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
- * @return Google_Profiles
- */
- public function listManagementProfiles($accountId, $webPropertyId, $optParams = array()) {
- $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_Profiles($data);
- } else {
- return $data;
- }
- }
- /**
- * Updates an existing view (profile). This method supports patch semantics.
- * (profiles.patch)
- *
- * @param string $accountId Account ID to which the view (profile) belongs
- * @param string $webPropertyId Web property ID to which the view (profile) belongs
- * @param string $profileId ID of the view (profile) to be updated.
- * @param Google_Profile $postBody
- * @param array $optParams Optional parameters.
- * @return Google_Profile
- */
- public function patch($accountId, $webPropertyId, $profileId, Google_Profile $postBody, $optParams = array()) {
- $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('patch', array($params));
- if ($this->useObjects()) {
- return new Google_Profile($data);
- } else {
- return $data;
- }
- }
- /**
- * Updates an existing view (profile). (profiles.update)
- *
- * @param string $accountId Account ID to which the view (profile) belongs
- * @param string $webPropertyId Web property ID to which the view (profile) belongs
- * @param string $profileId ID of the view (profile) to be updated.
- * @param Google_Profile $postBody
- * @param array $optParams Optional parameters.
- * @return Google_Profile
- */
- public function update($accountId, $webPropertyId, $profileId, Google_Profile $postBody, $optParams = array()) {
- $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('update', array($params));
- if ($this->useObjects()) {
- return new Google_Profile($data);
- } else {
- return $data;
- }
- }
- }