Google_ManagementWebpropertiesServiceResource
The "webproperties" collection of methods.
Defined (1)
The class is defined in the following location(s).
- /src/contrib/Google_AnalyticsService.php
- class Google_ManagementWebpropertiesServiceResource extends Google_ServiceResource {
- /**
- * Gets a web property to which the user has access. (webproperties.get)
- *
- * @param string $accountId Account ID to retrieve the web property for.
- * @param string $webPropertyId ID to retrieve the web property for.
- * @param array $optParams Optional parameters.
- * @return Google_Webproperty
- */
- public function get($accountId, $webPropertyId, $optParams = array()) {
- $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('get', array($params));
- if ($this->useObjects()) {
- return new Google_Webproperty($data);
- } else {
- return $data;
- }
- }
- /**
- * Create a new property if the account has fewer than 20 properties.
- * (webproperties.insert)
- *
- * @param string $accountId Account ID to create the web property for.
- * @param Google_Webproperty $postBody
- * @param array $optParams Optional parameters.
- * @return Google_Webproperty
- */
- public function insert($accountId, Google_Webproperty $postBody, $optParams = array()) {
- $params = array('accountId' => $accountId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('insert', array($params));
- if ($this->useObjects()) {
- return new Google_Webproperty($data);
- } else {
- return $data;
- }
- }
- /**
- * Lists web properties to which the user has access. (webproperties.list)
- *
- * @param string $accountId Account ID to retrieve web properties for. Can either be a specific account ID or '~all', which refers to all the accounts that user has access to.
- * @param array $optParams Optional parameters.
- *
- * @opt_param int max-results The maximum number of web properties 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_Webproperties
- */
- public function listManagementWebproperties($accountId, $optParams = array()) {
- $params = array('accountId' => $accountId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_Webproperties($data);
- } else {
- return $data;
- }
- }
- /**
- * Updates an existing web property. This method supports patch semantics.
- * (webproperties.patch)
- *
- * @param string $accountId Account ID to which the web property belongs
- * @param string $webPropertyId Web property ID
- * @param Google_Webproperty $postBody
- * @param array $optParams Optional parameters.
- * @return Google_Webproperty
- */
- public function patch($accountId, $webPropertyId, Google_Webproperty $postBody, $optParams = array()) {
- $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('patch', array($params));
- if ($this->useObjects()) {
- return new Google_Webproperty($data);
- } else {
- return $data;
- }
- }
- /**
- * Updates an existing web property. (webproperties.update)
- *
- * @param string $accountId Account ID to which the web property belongs
- * @param string $webPropertyId Web property ID
- * @param Google_Webproperty $postBody
- * @param array $optParams Optional parameters.
- * @return Google_Webproperty
- */
- public function update($accountId, $webPropertyId, Google_Webproperty $postBody, $optParams = array()) {
- $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('update', array($params));
- if ($this->useObjects()) {
- return new Google_Webproperty($data);
- } else {
- return $data;
- }
- }
- }