/src/main/Google/contrib/Google_AnalyticsService.php
PHP | 4233 lines | 3211 code | 698 blank | 324 comment | 30 complexity | f2cc9be822b4db4c8510060f999b0f05 MD5 | raw file
Large files files are truncated, but you can click here to view the full file
- <?php
- /*
- * Licensed under the Apache License, Version 2.0 (the "License"); you may not
- * use this file except in compliance with the License. You may obtain a copy of
- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations under
- * the License.
- */
- /**
- * The "data" collection of methods.
- * Typical usage is:
- * <code>
- * $analyticsService = new Google_AnalyticsService(...);
- * $data = $analyticsService->data;
- * </code>
- */
- class Google_DataServiceResource extends Google_ServiceResource
- {
- }
- /**
- * The "ga" collection of methods.
- * Typical usage is:
- * <code>
- * $analyticsService = new Google_AnalyticsService(...);
- * $ga = $analyticsService->ga;
- * </code>
- */
- class Google_DataGaServiceResource extends Google_ServiceResource
- {
- /**
- * Returns Analytics data for a profile. (ga.get)
- *
- * @param string $ids Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics profile ID.
- * @param string $start_date Start date for fetching Analytics data. All requests should specify a start date formatted as YYYY-MM-DD.
- * @param string $end_date End date for fetching Analytics data. All requests should specify an end date formatted as YYYY-MM-DD.
- * @param string $metrics A comma-separated list of Analytics metrics. E.g., 'ga:visits,ga:pageviews'. At least one metric must be specified.
- * @param array $optParams Optional parameters.
- *
- * @opt_param string dimensions A comma-separated list of Analytics dimensions. E.g., 'ga:browser,ga:city'.
- * @opt_param string filters A comma-separated list of dimension or metric filters to be applied to Analytics data.
- * @opt_param int max-results The maximum number of entries to include in this feed.
- * @opt_param string segment An Analytics advanced segment to be applied to data.
- * @opt_param string sort A comma-separated list of dimensions or metrics that determine the sort order for Analytics data.
- * @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_GaData
- */
- public function get($ids, $start_date, $end_date, $metrics, $optParams = array())
- {
- $params = array('ids' => $ids, 'start-date' => $start_date, 'end-date' => $end_date, 'metrics' => $metrics);
- $params = array_merge($params, $optParams);
- $data = $this->__call('get', array($params));
- if ($this->useObjects()) {
- return new Google_GaData($data);
- } else {
- return $data;
- }
- }
- }
- /**
- * The "mcf" collection of methods.
- * Typical usage is:
- * <code>
- * $analyticsService = new Google_AnalyticsService(...);
- * $mcf = $analyticsService->mcf;
- * </code>
- */
- class Google_DataMcfServiceResource extends Google_ServiceResource
- {
- /**
- * Returns Analytics Multi-Channel Funnels data for a profile. (mcf.get)
- *
- * @param string $ids Unique table ID for retrieving Analytics data. Table ID is of the form ga:XXXX, where XXXX is the Analytics profile ID.
- * @param string $start_date Start date for fetching Analytics data. All requests should specify a start date formatted as YYYY-MM-DD.
- * @param string $end_date End date for fetching Analytics data. All requests should specify an end date formatted as YYYY-MM-DD.
- * @param string $metrics A comma-separated list of Multi-Channel Funnels metrics. E.g., 'mcf:totalConversions,mcf:totalConversionValue'. At least one metric must be specified.
- * @param array $optParams Optional parameters.
- *
- * @opt_param string dimensions A comma-separated list of Multi-Channel Funnels dimensions. E.g., 'mcf:source,mcf:medium'.
- * @opt_param string filters A comma-separated list of dimension or metric filters to be applied to the Analytics data.
- * @opt_param int max-results The maximum number of entries to include in this feed.
- * @opt_param string sort A comma-separated list of dimensions or metrics that determine the sort order for the Analytics data.
- * @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_McfData
- */
- public function get($ids, $start_date, $end_date, $metrics, $optParams = array())
- {
- $params = array('ids' => $ids, 'start-date' => $start_date, 'end-date' => $end_date, 'metrics' => $metrics);
- $params = array_merge($params, $optParams);
- $data = $this->__call('get', array($params));
- if ($this->useObjects()) {
- return new Google_McfData($data);
- } else {
- return $data;
- }
- }
- }
- /**
- * The "management" collection of methods.
- * Typical usage is:
- * <code>
- * $analyticsService = new Google_AnalyticsService(...);
- * $management = $analyticsService->management;
- * </code>
- */
- class Google_ManagementServiceResource extends Google_ServiceResource
- {
- }
- /**
- * The "accounts" collection of methods.
- * Typical usage is:
- * <code>
- * $analyticsService = new Google_AnalyticsService(...);
- * $accounts = $analyticsService->accounts;
- * </code>
- */
- class Google_ManagementAccountsServiceResource extends Google_ServiceResource
- {
- /**
- * Lists all accounts to which the user has access. (accounts.list)
- *
- * @param array $optParams Optional parameters.
- *
- * @opt_param int max-results The maximum number of accounts to include in this response.
- * @opt_param int start-index An index of the first account to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
- * @return Google_Accounts
- */
- public function listManagementAccounts($optParams = array())
- {
- $params = array();
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_Accounts($data);
- } else {
- return $data;
- }
- }
- }
- /**
- * The "customDataSources" collection of methods.
- * Typical usage is:
- * <code>
- * $analyticsService = new Google_AnalyticsService(...);
- * $customDataSources = $analyticsService->customDataSources;
- * </code>
- */
- class Google_ManagementCustomDataSourcesServiceResource extends Google_ServiceResource
- {
- /**
- * List custom data sources to which the user has access. (customDataSources.list)
- *
- * @param string $accountId Account Id for the custom data sources to retrieve.
- * @param string $webPropertyId Web property Id for the custom data sources to retrieve.
- * @param array $optParams Optional parameters.
- *
- * @opt_param int max-results The maximum number of custom data sources to include in this response.
- * @opt_param int start-index A 1-based index of the first custom data source to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
- * @return Google_CustomDataSources
- */
- public function listManagementCustomDataSources($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_CustomDataSources($data);
- } else {
- return $data;
- }
- }
- }
- /**
- * The "dailyUploads" collection of methods.
- * Typical usage is:
- * <code>
- * $analyticsService = new Google_AnalyticsService(...);
- * $dailyUploads = $analyticsService->dailyUploads;
- * </code>
- */
- class Google_ManagementDailyUploadsServiceResource extends Google_ServiceResource
- {
- /**
- * Delete uploaded data for the given date. (dailyUploads.delete)
- *
- * @param string $accountId Account Id associated with daily upload delete.
- * @param string $webPropertyId Web property Id associated with daily upload delete.
- * @param string $customDataSourceId Custom data source Id associated with daily upload delete.
- * @param string $date Date for which data is to be deleted. Date should be formatted as YYYY-MM-DD.
- * @param string $type Type of data for this delete.
- * @param array $optParams Optional parameters.
- */
- public function delete($accountId, $webPropertyId, $customDataSourceId, $date, $type, $optParams = array())
- {
- $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'customDataSourceId' => $customDataSourceId, 'date' => $date, 'type' => $type);
- $params = array_merge($params, $optParams);
- $data = $this->__call('delete', array($params));
- return $data;
- }
- /**
- * List daily uploads to which the user has access. (dailyUploads.list)
- *
- * @param string $accountId Account Id for the daily uploads to retrieve.
- * @param string $webPropertyId Web property Id for the daily uploads to retrieve.
- * @param string $customDataSourceId Custom data source Id for daily uploads to retrieve.
- * @param string $start_date Start date of the form YYYY-MM-DD.
- * @param string $end_date End date of the form YYYY-MM-DD.
- * @param array $optParams Optional parameters.
- *
- * @opt_param int max-results The maximum number of custom data sources to include in this response.
- * @opt_param int start-index A 1-based index of the first daily upload to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
- * @return Google_DailyUploads
- */
- public function listManagementDailyUploads($accountId, $webPropertyId, $customDataSourceId, $start_date, $end_date, $optParams = array())
- {
- $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'customDataSourceId' => $customDataSourceId, 'start-date' => $start_date, 'end-date' => $end_date);
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_DailyUploads($data);
- } else {
- return $data;
- }
- }
- /**
- * Update/Overwrite data for a custom data source. (dailyUploads.upload)
- *
- * @param string $accountId Account Id associated with daily upload.
- * @param string $webPropertyId Web property Id associated with daily upload.
- * @param string $customDataSourceId Custom data source Id to which the data being uploaded belongs.
- * @param string $date Date for which data is uploaded. Date should be formatted as YYYY-MM-DD.
- * @param int $appendNumber Append number for this upload indexed from 1.
- * @param string $type Type of data for this upload.
- * @param array $optParams Optional parameters.
- *
- * @opt_param bool reset Reset/Overwrite all previous appends for this date and start over with this file as the first upload.
- * @return Google_DailyUploadAppend
- */
- public function upload($accountId, $webPropertyId, $customDataSourceId, $date, $appendNumber, $type, $optParams = array())
- {
- $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'customDataSourceId' => $customDataSourceId, 'date' => $date, 'appendNumber' => $appendNumber, 'type' => $type);
- $params = array_merge($params, $optParams);
- $data = $this->__call('upload', array($params));
- if ($this->useObjects()) {
- return new Google_DailyUploadAppend($data);
- } else {
- return $data;
- }
- }
- }
- /**
- * The "experiments" collection of methods.
- * Typical usage is:
- * <code>
- * $analyticsService = new Google_AnalyticsService(...);
- * $experiments = $analyticsService->experiments;
- * </code>
- */
- class Google_ManagementExperimentsServiceResource extends Google_ServiceResource
- {
- /**
- * Delete an experiment. (experiments.delete)
- *
- * @param string $accountId Account ID to which the experiment belongs
- * @param string $webPropertyId Web property ID to which the experiment belongs
- * @param string $profileId Profile ID to which the experiment belongs
- * @param string $experimentId ID of the experiment to delete
- * @param array $optParams Optional parameters.
- */
- public function delete($accountId, $webPropertyId, $profileId, $experimentId, $optParams = array())
- {
- $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'experimentId' => $experimentId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('delete', array($params));
- return $data;
- }
- /**
- * Returns an experiment to which the user has access. (experiments.get)
- *
- * @param string $accountId Account ID to retrieve the experiment for.
- * @param string $webPropertyId Web property ID to retrieve the experiment for.
- * @param string $profileId Profile ID to retrieve the experiment for.
- * @param string $experimentId Experiment ID to retrieve the experiment for.
- * @param array $optParams Optional parameters.
- * @return Google_Experiment
- */
- public function get($accountId, $webPropertyId, $profileId, $experimentId, $optParams = array())
- {
- $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'experimentId' => $experimentId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('get', array($params));
- if ($this->useObjects()) {
- return new Google_Experiment($data);
- } else {
- return $data;
- }
- }
- /**
- * Create a new experiment. (experiments.insert)
- *
- * @param string $accountId Account ID to create the experiment for.
- * @param string $webPropertyId Web property ID to create the experiment for.
- * @param string $profileId Profile ID to create the experiment for.
- * @param Google_Experiment $postBody
- * @param array $optParams Optional parameters.
- * @return Google_Experiment
- */
- public function insert($accountId, $webPropertyId, $profileId, Google_Experiment $postBody, $optParams = array())
- {
- $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('insert', array($params));
- if ($this->useObjects()) {
- return new Google_Experiment($data);
- } else {
- return $data;
- }
- }
- /**
- * Lists experiments to which the user has access. (experiments.list)
- *
- * @param string $accountId Account ID to retrieve experiments for.
- * @param string $webPropertyId Web property ID to retrieve experiments for.
- * @param string $profileId Profile ID to retrieve experiments for.
- * @param array $optParams Optional parameters.
- *
- * @opt_param int max-results The maximum number of experiments to include in this response.
- * @opt_param int start-index An index of the first experiment to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
- * @return Google_Experiments
- */
- public function listManagementExperiments($accountId, $webPropertyId, $profileId, $optParams = array())
- {
- $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_Experiments($data);
- } else {
- return $data;
- }
- }
- /**
- * Update an existing experiment. This method supports patch semantics. (experiments.patch)
- *
- * @param string $accountId Account ID of the experiment to update.
- * @param string $webPropertyId Web property ID of the experiment to update.
- * @param string $profileId Profile ID of the experiment to update.
- * @param string $experimentId Experiment ID of the experiment to update.
- * @param Google_Experiment $postBody
- * @param array $optParams Optional parameters.
- * @return Google_Experiment
- */
- public function patch($accountId, $webPropertyId, $profileId, $experimentId, Google_Experiment $postBody, $optParams = array())
- {
- $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'experimentId' => $experimentId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('patch', array($params));
- if ($this->useObjects()) {
- return new Google_Experiment($data);
- } else {
- return $data;
- }
- }
- /**
- * Update an existing experiment. (experiments.update)
- *
- * @param string $accountId Account ID of the experiment to update.
- * @param string $webPropertyId Web property ID of the experiment to update.
- * @param string $profileId Profile ID of the experiment to update.
- * @param string $experimentId Experiment ID of the experiment to update.
- * @param Google_Experiment $postBody
- * @param array $optParams Optional parameters.
- * @return Google_Experiment
- */
- public function update($accountId, $webPropertyId, $profileId, $experimentId, Google_Experiment $postBody, $optParams = array())
- {
- $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId, 'experimentId' => $experimentId, 'postBody' => $postBody);
- $params = array_merge($params, $optParams);
- $data = $this->__call('update', array($params));
- if ($this->useObjects()) {
- return new Google_Experiment($data);
- } else {
- return $data;
- }
- }
- }
- /**
- * The "goals" collection of methods.
- * Typical usage is:
- * <code>
- * $analyticsService = new Google_AnalyticsService(...);
- * $goals = $analyticsService->goals;
- * </code>
- */
- class Google_ManagementGoalsServiceResource extends Google_ServiceResource
- {
- /**
- * Lists goals to which the user has access. (goals.list)
- *
- * @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.
- * @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.
- * @param string $profileId Profile ID to retrieve goals for. Can either be a specific profile ID or '~all', which refers to all the profiles that user has access to.
- * @param array $optParams Optional parameters.
- *
- * @opt_param int max-results The maximum number of goals to include in this response.
- * @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.
- * @return Google_Goals
- */
- public function listManagementGoals($accountId, $webPropertyId, $profileId, $optParams = array())
- {
- $params = array('accountId' => $accountId, 'webPropertyId' => $webPropertyId, 'profileId' => $profileId);
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_Goals($data);
- } else {
- return $data;
- }
- }
- }
- /**
- * The "profiles" collection of methods.
- * Typical usage is:
- * <code>
- * $analyticsService = new Google_AnalyticsService(...);
- * $profiles = $analyticsService->profiles;
- * </code>
- */
- class Google_ManagementProfilesServiceResource extends Google_ServiceResource
- {
- /**
- * Lists profiles to which the user has access. (profiles.list)
- *
- * @param string $accountId Account ID for the 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 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 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;
- }
- }
- }
- /**
- * The "segments" collection of methods.
- * Typical usage is:
- * <code>
- * $analyticsService = new Google_AnalyticsService(...);
- * $segments = $analyticsService->segments;
- * </code>
- */
- class Google_ManagementSegmentsServiceResource extends Google_ServiceResource
- {
- /**
- * Lists advanced segments to which the user has access. (segments.list)
- *
- * @param array $optParams Optional parameters.
- *
- * @opt_param int max-results The maximum number of advanced segments to include in this response.
- * @opt_param int start-index An index of the first advanced segment to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
- * @return Google_Segments
- */
- public function listManagementSegments($optParams = array())
- {
- $params = array();
- $params = array_merge($params, $optParams);
- $data = $this->__call('list', array($params));
- if ($this->useObjects()) {
- return new Google_Segments($data);
- } else {
- return $data;
- }
- }
- }
- /**
- * The "webproperties" collection of methods.
- * Typical usage is:
- * <code>
- * $analyticsService = new Google_AnalyticsService(...);
- * $webproperties = $analyticsService->webproperties;
- * </code>
- */
- class Google_ManagementWebpropertiesServiceResource extends Google_ServiceResource
- {
- /**
- * 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;
- }
- }
- }
- /**
- * Service definition for Google_Analytics (v3).
- *
- * <p>
- * View and manage your Google Analytics data
- * </p>
- *
- * <p>
- * For more information about this service, see the
- * <a href="https://developers.google.com/analytics/" target="_blank">API Documentation</a>
- * </p>
- *
- * @author Google, Inc.
- */
- class Google_AnalyticsService extends Google_Service
- {
- public $data_ga;
- public $data_mcf;
- public $management_accounts;
- public $management_customDataSources;
- public $management_dailyUploads;
- public $management_experiments;
- public $management_goals;
- public $management_profiles;
- public $management_segments;
- public $management_webproperties;
- /**
- * Constructs the internal representation of the Analytics service.
- *
- * @param Google_Client $client
- */
- public function __construct(Google_Client $client)
- {
- $this->servicePath = 'analytics/v3/';
- $this->version = 'v3';
- $this->serviceName = 'analytics';
- $client->addService($this->serviceName, $this->version);
- $this->data_ga = new Google_DataGaServiceResource($this, $this->serviceName, 'ga', json_decode('{"methods": {"get": {"id": "analytics.data.ga.get", "path": "data/ga", "httpMethod": "GET", "parameters": {"dimensions": {"type": "string", "location": "query"}, "end-date": {"type": "string", "required": true, "location": "query"}, "filters": {"type": "string", "location": "query"}, "ids": {"type": "string", "required": true, "location": "query"}, "max-results": {"type": "integer", "format": "int32", "location": "query"}, "metrics": {"type": "string", "required": true, "location": "query"}, "segment": {"type": "string", "location": "query"}, "sort": {"type": "string", "location": "query"}, "start-date": {"type": "string", "required": true, "location": "query"}, "start-index": {"type": "integer", "format": "int32", "minimum": "1", "location": "query"}}, "response": {"$ref": "GaData"}, "scopes": ["https://www.googleapis.com/auth/analytics", "https://www.googleapis.com/auth/analytics.readonly"]}}}', true));
- $this->data_mcf = new Google_DataMcfServiceResource($this, $this->serviceName, 'mcf', json_decode('{"methods": {"get": {"id": "analytics.data.mcf.get", "path": "data/mcf", "httpMethod": "GET", "parameters": {"dimensions": {"type": "string", "location": "query"}, "end-date": {"type": "string", "required": true, "location": "query"}, "filters": {"type": "string", "location": "query"}, "ids": {"type": "string", "required": true, "location": "query"}, "max-results": {"type": "integer", "format": "int32", "location": "query"}, "metrics": {"type": "string", "required": true, "location": "query"}, "sort": {"type": "string", "location": "query"}, "start-date": {"type": "string", "required": true, "location": "query"}, "start-index": {"type": "integer", "format": "int32", "minimum": "1", "location": "query"}}, "response": {"$ref": "McfData"}, "scopes": ["https://www.googleapis.com/auth/analytics", "https://www.googleapis.com/auth/analytics.readonly"]}}}', true));
- $this->management_accounts = new Google_ManagementAccountsServiceResource($this, $this->serviceName, 'accounts', json_decode('{"methods": {"list": {"id": "analytics.management.accounts.list", "path": "management/accounts", "httpMethod": "GET", "parameters": {"max-results": {"type": "integer", "format": "int32", "location": "query"}, "start-index": {"type": "integer", "format": "int32", "minimum": "1", "location": "query"}}, "response": {"$ref": "Accounts"}, "scopes": ["https://www.googleapis.com/auth/analytics", "https://www.googleapis.com/auth/analytics.readonly"]}}}', true));
- $this->management_customDataSources = new Google_ManagementCustomDataSourcesServiceResource($this, $this->serviceName, 'customDataSources', json_decode('{"methods": {"list": {"id": "analytics.management.customDataSources.list", "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources", "httpMethod": "GET", "parameters": {"accountId": {"type": "string", "required": true, "location": "path"}, "max-results": {"type": "integer", "format": "int32", "minimum": "1", "location": "query"}, "start-index": {"type": "integer", "format": "int32", "minimum": "1", "location": "query"}, "webPropertyId": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "CustomDataSources"}, "scopes": ["https://www.googleapis.com/auth/analytics", "https://www.googleapis.com/auth/analytics.readonly"]}}}', true));
- $this->management_dailyUploads = new Google_ManagementDailyUploadsServiceResource($this, $this->serviceName, 'dailyUploads', json_decode('{"methods": {"delete": {"id": "analytics.management.dailyUploads.delete", "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/dailyUploads/{date}", "httpMethod": "DELETE", "parameters": {"accountId": {"type": "string", "required": true, "location": "path"}, "customDataSourceId": {"type": "string", "required": true, "location": "path"}, "date": {"type": "string", "required": true, "location": "path"}, "type": {"type": "string", "required": true, "enum": ["cost"], "location": "query"}, "webPropertyId": {"type": "string", "required": true, "location": "path"}}, "scopes": ["https://www.googleapis.com/auth/analytics"]}, "list": {"id": "analytics.management.dailyUploads.list", "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/dailyUploads", "httpMethod": "GET", "parameters": {"accountId": {"type": "string", "required": true, "location": "path"}, "customDataSourceId": {"type": "string", "required": true, "location": "path"}, "end-date": {"type": "string", "required": true, "location": "query"}, "max-results": {"type": "integer", "format": "int32", "minimum": "1", "location": "query"}, "start-date": {"type": "string", "required": true, "location": "query"}, "start-index": {"type": "integer", "format": "int32", "minimum": "1", "location": "query"}, "webPropertyId": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "DailyUploads"}, "scopes": ["https://www.googleapis.com/auth/analytics", "https://www.googleapis.com/auth/analytics.readonly"]}, "upload": {"id": "analytics.management.dailyUploads.upload", "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/dailyUploads/{date}/uploads", "httpMethod": "POST", "parameters": {"accountId": {"type": "string", "required": true, "location": "path"}, "appendNumber": {"type": "integer", "required": true, "format": "int32", "minimum": "1", "maximum": "20", "location": "query"}, "customDataSourceId": {"type": "string", "required": true, "location": "path"}, "date": {"type": "string", "required": true, "location": "path"}, "reset": {"type": "boolean", "default": "false", "location": "query"}, "type": {"type": "string", "required": true, "enum": ["cost"], "location": "query"}, "webPropertyId": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "DailyUploadAppend"}, "scopes": ["https://www.googleapis.com/auth/analytics"], "supportsMediaUpload": true, "mediaUpload": {"accept": ["application/octet-stream"], "maxSize": "5MB", "protocols": {"simple": {"multipart": true, "path": "/upload/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/dailyUploads/{date}/uploads"}, "resumable": {"multipart": true, "path": "/resumable/upload/analytics/v3/management/accounts/{accountId}/webproperties/{webPropertyId}/customDataSources/{customDataSourceId}/dailyUploads/{date}/uploads"}}}}}}', true));
- $this->management_experiments = new Google_ManagementExperimentsServiceResource($this, $this->serviceName, 'experiments', json_decode('{"methods": {"delete": {"id": "analytics.management.experiments.delete", "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}", "httpMethod": "DELETE", "parameters": {"accountId": {"type": "string", "required": true, "location": "path"}, "experimentId": {"type": "string", "required": true, "location": "path"}, "profileId": {"type": "string", "required": true, "location": "path"}, "webPropertyId": {"type": "string", "required": true, "location": "path"}}, "scopes": ["https://www.googleapis.com/auth/analytics"]}, "get": {"id": "analytics.management.experiments.get", "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}", "httpMethod": "GET", "parameters": {"accountId": {"type": "string", "required": true, "location": "path"}, "experimentId": {"type": "string", "required": true, "location": "path"}, "profileId": {"type": "string", "required": true, "location": "path"}, "webPropertyId": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "Experiment"}, "scopes": ["https://www.googleapis.com/auth/analytics", "https://www.googleapis.com/auth/analytics.readonly"]}, "insert": {"id": "analytics.management.experiments.insert", "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments", "httpMethod": "POST", "parameters": {"accountId": {"type": "string", "required": true, "location": "path"}, "profileId": {"type": "string", "required": true, "location": "path"}, "webPropertyId": {"type": "string", "required": true, "location": "path"}}, "request": {"$ref": "Experiment"}, "response": {"$ref": "Experiment"}, "scopes": ["https://www.googleapis.com/auth/analytics"]}, "list": {"id": "analytics.management.experiments.list", "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments", "httpMethod": "GET", "parameters": {"accountId": {"type": "string", "required": true, "location": "path"}, "max-results": {"type": "integer", "format": "int32", "location": "query"}, "profileId": {"type": "string", "required": true, "location": "path"}, "start-index": {"type": "integer", "format": "int32", "minimum": "1", "location": "query"}, "webPropertyId": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "Experiments"}, "scopes": ["https://www.googleapis.com/auth/analytics", "https://www.googleapis.com/auth/analytics.readonly"]}, "patch": {"id": "analytics.management.experiments.patch", "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}", "httpMethod": "PATCH", "parameters": {"accountId": {"type": "string", "required": true, "location": "path"}, "experimentId": {"type": "string", "required": true, "location": "path"}, "profileId": {"type": "string", "required": true, "location": "path"}, "webPropertyId": {"type": "string", "required": true, "location": "path"}}, "request": {"$ref": "Experiment"}, "response": {"$ref": "Experiment"}, "scopes": ["https://www.googleapis.com/auth/analytics"]}, "update": {"id": "analytics.management.experiments.update", "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/experiments/{experimentId}", "httpMethod": "PUT", "parameters": {"accountId": {"type": "string", "required": true, "location": "path"}, "experimentId": {"type": "string", "required": true, "location": "path"}, "profileId": {"type": "string", "required": true, "location": "path"}, "webPropertyId": {"type": "string", "required": true, "location": "path"}}, "request": {"$ref": "Experiment"}, "response": {"$ref": "Experiment"}, "scopes": ["https://www.googleapis.com/auth/analytics"]}}}', true));
- $this->management_goals = new Google_ManagementGoalsServiceResource($this, $this->serviceName, 'goals', json_decode('{"methods": {"list": {"id": "analytics.management.goals.list", "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals", "httpMethod": "GET", "parameters": {"accountId": {"type": "string", "required": true, "location": "path"}, "max-results": {"type": "integer", "format": "int32", "location": "query"}, "profileId": {"type": "string", "required": true, "location": "path"}, "start-index": {"type": "integer", "format": "int32", "minimum": "1", "location": "query"}, "webPropertyId": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "Goals"}, "scopes": ["https://www.googleapis.com/auth/analytics", "https://www.googleapis.com/auth/analytics.readonly"]}}}', true));
- $this->management_profiles = new Google_ManagementProfilesServiceResource($this, $this->serviceName, 'profiles', json_decode('{"methods": {"list": {"id": "analytics.management.profiles.list", "path": "management/accounts/{accountId}/webproperties/{webPropertyId}/profiles", "httpMethod": "GET", "parameters": {"accountId": {"type": "string", "required": true, "location": "path"}, "max-results": {"type": "integer", "format": "int32", "location": "query"}, "start-index": {"type": "integer", "format": "int32", "minimum": "1", "location": "query"}, "webPropertyId": {"type": "string", "required": true, "location": "path"}}, "response": {"$ref": "Profiles"}, "scopes": ["https://www.googleapis.com/auth/analytics", "https://www.googleapis.com/auth/analytics.readonly"]}}}', true));
- $this->management_segments = new Google_ManagementSegmentsServiceResource($this, $this->serviceName, 'segments', json_decode('{"methods": {"list": {"id": "analytics.management.segments.list", "path": "management/segments", "httpMethod": "GET", "parameters": {"max-results": {"type": "integer", "format": "int32", "location": "query"}, "start-index": {"type": "integer", "format": "int32", "minimum": "1", "location": "query"}}, "response": {"$ref": "Segments"}, "scopes": ["https://www.googleapis.com/auth/analytics", "https://www.googleapis.com/auth/analytics.readonly"]}}}', true));
- $this->management_webproperties = new Google_ManagementWebpropertiesServiceResource($this, $this->serviceName, 'webproperties', json_decode('{"methods": {"list": {"id": "analytics.management.webproperties.list", "path": "management/accounts/{accountId}/webproperties", "httpMethod": "GET", "parameters": {"accountId": {"type": "string", "required": true, "location": "path"}, "max-results": {"type": "integer", "format": "int32", "location": "query"}, "start-index": {"type": "integer", "format": "int32", "minimum": "1", "location": "query"}}, "response": {"$ref": "Webproperties"}, "scopes": ["https://www.googleapis.com/auth/analytics", "https://www.googleapis.com/auth/analytics.readonly"]}}}', true));
- }
- }
- class Google_Account extends Google_Model
- {
- protected $__childLinkType = 'Google_AccountChildLink';
- protected $__childLinkDataType = '';
- public $childLink;
- public $created;
- public $id;
- public $kind;
- public $name;
- public $selfLink;
- public $updated;
- public function setChildLink(Google_AccountChildLink $childLink)
- {
- $this->childLink = $childLink;
- }
- public function getChildLink()
- {
- return $this->childLink;
- }
- public function setCreated($created)
- {
- $this->created = $created;
- }
- public function getCreated()
- {
- return $this->created;
- }
- public function setId($id)
- {
- $this->id = $id;
- }
- public function getId()
- {
- return $this->id;
- }
- public function setKind($kind)
- {
- $this->kind = $kind;
- }
- public function getKind()
- {
- return $this->kind;
- }
- public function setName($name)
- {
- $this->name = $name;
- }
- public function getName()
- {
- return $this->name;
- }
- public function setSelfLink($selfLink)
- {
- $this->selfLink = $selfLink;
- }
- public function getSelfLink()
- {
- return $this->selfLink;
- }
- public function setUpdated($updated)
- {
- $this->updated = $updated;
- }
- public function getUpdated()
- {
- return $this->updated;
- }
- }
- class Google_AccountChildLink extends Google_Model
- {
- public $href;
- public $type;
- public function setHref($href)
- {
- $this->href = $href;
- }
- public function getHref()
- {
- return $this->href;
- }
- public function setType($type)
- {
- $this->type = $type;
- }
- public function getType()
- {
- return $this->type;
- }
- }
- class Google_Accounts extends Google_Model
- {
- protected $__itemsType = 'Google_Account';
- protected $__itemsDataType = 'array';
- public $items;
- public $itemsPerPage;
- public $kind;
- public $nextLink;
- public $previousLink;
- public $startIndex;
- public $totalResults;
- public $username;
- public function setItems( /* array(Google_Account) */
- $items)
- {
- $this->assertIsArray($items, 'Google_Account', __METHOD__);
- $this->items = $items;
- }
- public function getItems()
- {
- return $this->items;
- }
- public function setItemsPerPage($itemsPerPage)
- {
- $this->itemsPerPage = $itemsPerPage;
- }
- public function getItemsPerPage()
- {
- return $this->itemsPerPage;
- }
- public function setKind($kind)
- {
- $this->kind = $kind;
- }
- public function getKind()
- {
- return $this->kind;
- }
- public function setNextLink($nextLink)
- {
- $this->nextLink = $nextLink;
- }
- public function getNextLink()
- {
- return $this->nextLink;
- }
- public function setPreviousLink($previousLink)
- {
- $this->previousLink = $previousLink;
- }
- public function getPreviousLink()
- {
- return $this->previousLink;
- }
- public function setStartIndex($startIndex)
- {
- $this->startIndex = $startIndex;
- }
- public function getStartIndex()
- {
- return $this->startIndex;
- }
- public function setTotalResults($totalResults)
- {
- $this->totalResults = $totalResults;
- }
- public function getTotalResults()
- {
- return $this->totalResults;
- }
- public function setUsername($username)
- {
- $this->username = $username;
- }
- public function getUsername()
- {
- return $this->username;
- }
- }
- class Google_CustomDataSource extends Google_Model
- {
- public $accountId;
- protected $__childLinkType = 'Google_CustomDataSourceChildLink';
- protected $__childLinkDataType = '';
- public $childLink;
- public $created;
- public $description;
- public $id;
- public $kind;
- public $name;
- protected $__parentLinkType = 'Google_CustomDataSourceParentLink';
- protected $__parentLinkDataType = '';
- public $parentLink;
- public $profilesLinked;
- public $selfLink;
- public $updated;
- public $webPropertyId;
- public function setAccountId($accountId)
- {
- $this->accountId = $accountId;
- }
- public function getAccountId()
- {
- return $this->accountId;
- }
- public function setChildLink(Google_CustomDataSourceChildLink $childLink)
- {
- $this->childLink = $childLink;
- }
- public function getChildLink()
- {
- return $this->childLink;
- }
- public function setCreated($created)
- {
- $this->created = $created;
- }
- public function getCreated()
- {
- return $this->created;
- }
- public function setDescription($description)
- {
- $this->description = $description;
- }
- public function getDescription()
- {
- return $this->description;
- }
- public function setId($id)
- {
- $this->id = $id;
- }
- public function getId()
- {
- return $this->id;
- }
- public function setKind($kind)
- {
- $this->kind = $kind;
- }
- public function getKind()
- {
- return $this->kind;
- }
- public function setName($name)
- {
- $this->name = $name;
- }
- public function getName()
- {
- return $this->name;
- }
- public function setParentLink(Google_CustomDataSourceParentLink $parentLink)
- {
- $this->parentLink = $parentLink;
- }
- public function getParentLink()
- {
- return $this->parentLink;
- }
- public function setProfilesLinked( /* array(Google_string) */
- $profilesLinked)
- {
- $this->assertIsArray($profilesLinked, 'Google_string', __METHOD__);
- $this->profilesLinked = $profilesLinked;
- }
- public function getProfilesLinked()
- {
- return $this->profilesLinked;
- }
- public function setSelfLink($selfLink)
- {
- $this->selfLink = $selfLink;
- }
- public function getSelfLink()
- {
- return $this->selfLink;
- }
- public function setUpdated($updated)
- {
- $this->updated = $updated;
- }
- public function getUpdated()
- {
- return $this->updated;
- }
- public function setWebPropertyId($webPropertyId)
- {
- $this->webPropertyId = $webPropertyId;
- }
- public function getWebPropertyId()
- {
- return $this->webPropertyId;
- }
- }
- class Google_CustomDataSourceChildLink extends Google_Model
- {
- public $href;
- public $type;
- public function setHref($href)
- {
- $this->href = $href;
- }
- public function getHref()
- {
- return $this->href;
- }
- public function setType($type)
- {
- $this->type = $type;
- }
- public function getType()
- {
- return $this->type;
- }
- }
- class Google_CustomDataSourceParentLink extends Google_Model
- {
- public $href;
- public $type;
- public function setHref($href)
- {
- $this->href = $href;
- }
- public function getHref()
- {
- return $this->href;
- }
- public function setType($type)
- {
- $this->type = $type;
- }
- public function getType()
- {
- return $this->type;
- }
- }
- class Google_CustomDataSources extends Google_Model
- {
- protected $__itemsType = 'Google_CustomDataSource';
- protected $__itemsDataType = 'array';
- public $items;
- public $itemsPerPage;
- public $kind;
- public $nextLink;
- public $previousLink;
- public $startIndex;
- public $totalResults;
- public $username;
- public function setItems( /* array(Google_CustomDataSource) */
- $items)
- {
- $this->assertIsArray($items, 'Google_CustomDataSource', __METHOD__);
- $this->items = $items;
- }
- public function getItems()
- {
- return $this->items;
- }
- public function setItemsPerPage($itemsPerPage)
- {
- $this->itemsPerPage = $itemsPerPage;
- }
- public function getItemsPerPage()
- {
- return $this->itemsPerPage;
- }
- public function setKind($kind)
- {
- $this->kind = $kind;
- }
- public function getKind()
- {
- return $this->kind;
- }
- public function setNextLink($nextLink)
- {
- $this->nextLink = $nextLink;
- }
- public function getNextLink()
- {
- return $this->nextLink;
- }
- public function setPreviousLink($previousLink)
- {
- $this->previousLink = $previousLink;
- }
- public function getPreviousLink()
- {
- return $this->previousLink;
- }
- public function setStartIndex($startIndex)
- {
- $this->startIndex = $startIndex;
- }
- public function getStartIndex()
- {
- return $this->startIndex;
- }
- public function setTotalResults($totalResults)
- {
- $this->totalResults = $totalResults;
- }
- public function getTotalResults()
- {
- return $this->totalResults;
- }
- public function setUsername($username)
- {
- $this->username = $username;
- }
- public function getUsername()
- {
- return $this->username;
- }
- }
- class Google_DailyUpload extends Google_Model
- {
- public $accountId;
- public $appendCount;
- public $createdTime;
- public $customDataSourceId;
- public $date;
- public $kind;
- public $modifiedTime;
- protected $__parentLinkType = 'Google_DailyUploadParentLink';
- protected $__parentLinkDataType = '';
- public $parentLink;
- protected $__recentChangesType = 'Google_DailyUploadRecentChanges';
- protected $__recentChangesDataType = 'array';
- public $recentChanges;
- public $selfLink;
- public $webPropertyId;
- public function setAccountId($accountId)
- {
- $this->accountId = $accountId;
- }
- public function getAccountId()
- {
- return $this->accountId;
- }
- public function setAppendCount($appendCount)
- {
- $this->appendCount = $appendCount;
- }
- public function getAppendCount()
- {
- return $this->appendCount;
- }
- public function setCreatedTime($createdTime)
- {
- $this->createdTime = $createdTime;
- }
- public function getCreatedTime()
- {
- return $this->createdTime;
- }
- public function setCustomDataSourceId($customDataSourceId)
- {
- $this->customDataSourceId = $customDataSourceId;
- }
- public function getCustomDataSourceId()
- {
- return $this->customDataSourceId;
- }
- public function setDate($date)
- {
- $this->date = $date;
- }
- public function getDate()
- {
- return $this->date;
- }
- public function setKind($kind)
- {
- $this->kind = $kind;
- }
- public function getKind()
- {
- return $this->kind;
- }
- public function setModifiedTime($modifiedTime)
- {
- $this->modifiedTime = $modifiedTime;
- }
- public function getModifiedTime()
- {
- return $this->modifiedTime;
- }
- public function setParentLink(Google_DailyUploadParentLink $parentLink)
- {
- $this->parentLink = $parentLink;
- }
- public function getParentLink()
- {
- return $this->parentLink;
- }
- public function setRecentChanges( /* array(Google_DailyUploadRecentChanges) */
- $recentCha…
Large files files are truncated, but you can click here to view the full file