Class: Google::Apis::AnalyticsV2_4::AnalyticsService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::AnalyticsV2_4::AnalyticsService
- Defined in:
- generated/google/apis/analytics_v2_4/service.rb
Overview
Google Analytics API
Views and manages your Google Analytics data.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
An opaque string that represents a user for quota purposes.
-
#user_ip ⇒ String
Deprecated.
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#get_datum(ids, start_date, end_date, metrics, dimensions: nil, filters: nil, max_results: nil, segment: nil, sort: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Returns Analytics report data for a view (profile).
-
#initialize ⇒ AnalyticsService
constructor
A new instance of AnalyticsService.
-
#list_management_accounts(max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Lists all accounts to which the user has access.
-
#list_management_goals(account_id, web_property_id, profile_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Lists goals to which the user has access.
-
#list_management_profiles(account_id, web_property_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Lists views (profiles) to which the user has access.
-
#list_management_segments(max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Lists advanced segments to which the user has access.
-
#list_management_webproperties(account_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Lists web properties to which the user has access.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Core::Logging
Constructor Details
#initialize ⇒ AnalyticsService
Returns a new instance of AnalyticsService
49 50 51 52 |
# File 'generated/google/apis/analytics_v2_4/service.rb', line 49 def initialize super('https://www.googleapis.com/', 'analytics/v2.4/') @batch_path = 'batch/analytics/v2.4' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
38 39 40 |
# File 'generated/google/apis/analytics_v2_4/service.rb', line 38 def key @key end |
#quota_user ⇒ String
Returns An opaque string that represents a user for quota purposes. Must not exceed 40 characters.
43 44 45 |
# File 'generated/google/apis/analytics_v2_4/service.rb', line 43 def quota_user @quota_user end |
#user_ip ⇒ String
Returns Deprecated. Please use quotaUser instead.
47 48 49 |
# File 'generated/google/apis/analytics_v2_4/service.rb', line 47 def user_ip @user_ip end |
Instance Method Details
#get_datum(ids, start_date, end_date, metrics, dimensions: nil, filters: nil, max_results: nil, segment: nil, sort: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Returns Analytics report data for a view (profile).
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'generated/google/apis/analytics_v2_4/service.rb', line 101 def get_datum(ids, start_date, end_date, metrics, dimensions: nil, filters: nil, max_results: nil, segment: nil, sort: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'data', ) command.query['dimensions'] = dimensions unless dimensions.nil? command.query['end-date'] = end_date unless end_date.nil? command.query['filters'] = filters unless filters.nil? command.query['ids'] = ids unless ids.nil? command.query['max-results'] = max_results unless max_results.nil? command.query['metrics'] = metrics unless metrics.nil? command.query['segment'] = segment unless segment.nil? command.query['sort'] = sort unless sort.nil? command.query['start-date'] = start_date unless start_date.nil? command.query['start-index'] = start_index unless start_index.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_management_accounts(max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Lists all accounts to which the user has access.
144 145 146 147 148 149 150 151 152 |
# File 'generated/google/apis/analytics_v2_4/service.rb', line 144 def list_management_accounts(max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'management/accounts', ) command.query['max-results'] = max_results unless max_results.nil? command.query['start-index'] = start_index unless start_index.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_management_goals(account_id, web_property_id, profile_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Lists goals to which the user has access.
189 190 191 192 193 194 195 196 197 198 199 200 |
# File 'generated/google/apis/analytics_v2_4/service.rb', line 189 def list_management_goals(account_id, web_property_id, profile_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles/{profileId}/goals', ) command.params['accountId'] = account_id unless account_id.nil? command.params['webPropertyId'] = web_property_id unless web_property_id.nil? command.params['profileId'] = profile_id unless profile_id.nil? command.query['max-results'] = max_results unless max_results.nil? command.query['start-index'] = start_index unless start_index.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_management_profiles(account_id, web_property_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Lists views (profiles) to which the user has access.
235 236 237 238 239 240 241 242 243 244 245 |
# File 'generated/google/apis/analytics_v2_4/service.rb', line 235 def list_management_profiles(account_id, web_property_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'management/accounts/{accountId}/webproperties/{webPropertyId}/profiles', ) command.params['accountId'] = account_id unless account_id.nil? command.params['webPropertyId'] = web_property_id unless web_property_id.nil? command.query['max-results'] = max_results unless max_results.nil? command.query['start-index'] = start_index unless start_index.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_management_segments(max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Lists advanced segments to which the user has access.
272 273 274 275 276 277 278 279 280 |
# File 'generated/google/apis/analytics_v2_4/service.rb', line 272 def list_management_segments(max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'management/segments', ) command.query['max-results'] = max_results unless max_results.nil? command.query['start-index'] = start_index unless start_index.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_management_webproperties(account_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Lists web properties to which the user has access.
310 311 312 313 314 315 316 317 318 319 |
# File 'generated/google/apis/analytics_v2_4/service.rb', line 310 def list_management_webproperties(account_id, max_results: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'management/accounts/{accountId}/webproperties', ) command.params['accountId'] = account_id unless account_id.nil? command.query['max-results'] = max_results unless max_results.nil? command.query['start-index'] = start_index unless start_index.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |