Class: Google::Apis::AnalyticsV3::GaData

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/analytics_v3/classes.rb,
generated/google/apis/analytics_v3/representations.rb,
generated/google/apis/analytics_v3/representations.rb

Overview

Analytics data for a given view (profile).

Defined Under Namespace

Classes: ColumnHeader, DataTable, ProfileInfo, Query

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ GaData

Returns a new instance of GaData



2504
2505
2506
# File 'generated/google/apis/analytics_v3/classes.rb', line 2504

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#column_headersArray<Google::Apis::AnalyticsV3::GaData::ColumnHeader>

Column headers that list dimension names followed by the metric names. The order of dimensions and metrics is same as specified in the request. Corresponds to the JSON property columnHeaders



2414
2415
2416
# File 'generated/google/apis/analytics_v3/classes.rb', line 2414

def column_headers
  @column_headers
end

#contains_sampled_dataBoolean Also known as: contains_sampled_data?

Determines if Analytics data contains samples. Corresponds to the JSON property containsSampledData

Returns:

  • (Boolean)


2419
2420
2421
# File 'generated/google/apis/analytics_v3/classes.rb', line 2419

def contains_sampled_data
  @contains_sampled_data
end

#data_last_refreshedFixnum

The last refreshed time in seconds for Analytics data. Corresponds to the JSON property dataLastRefreshed

Returns:

  • (Fixnum)


2425
2426
2427
# File 'generated/google/apis/analytics_v3/classes.rb', line 2425

def data_last_refreshed
  @data_last_refreshed
end

#data_tableGoogle::Apis::AnalyticsV3::GaData::DataTable

Corresponds to the JSON property dataTable



2430
2431
2432
# File 'generated/google/apis/analytics_v3/classes.rb', line 2430

def data_table
  @data_table
end

#idString

Unique ID for this data response. Corresponds to the JSON property id

Returns:

  • (String)


2435
2436
2437
# File 'generated/google/apis/analytics_v3/classes.rb', line 2435

def id
  @id
end

#items_per_pageFixnum

The maximum number of rows the response can contain, regardless of the actual number of rows returned. Its value ranges from 1 to 10,000 with a value of 1000 by default, or otherwise specified by the max-results query parameter. Corresponds to the JSON property itemsPerPage

Returns:

  • (Fixnum)


2442
2443
2444
# File 'generated/google/apis/analytics_v3/classes.rb', line 2442

def items_per_page
  @items_per_page
end

#kindString

Resource type. Corresponds to the JSON property kind

Returns:

  • (String)


2447
2448
2449
# File 'generated/google/apis/analytics_v3/classes.rb', line 2447

def kind
  @kind
end

Link to next page for this Analytics data query. Corresponds to the JSON property nextLink

Returns:

  • (String)


2452
2453
2454
# File 'generated/google/apis/analytics_v3/classes.rb', line 2452

def next_link
  @next_link
end

Link to previous page for this Analytics data query. Corresponds to the JSON property previousLink

Returns:

  • (String)


2457
2458
2459
# File 'generated/google/apis/analytics_v3/classes.rb', line 2457

def previous_link
  @previous_link
end

#profile_infoGoogle::Apis::AnalyticsV3::GaData::ProfileInfo

Information for the view (profile), for which the Analytics data was requested. Corresponds to the JSON property profileInfo



2462
2463
2464
# File 'generated/google/apis/analytics_v3/classes.rb', line 2462

def profile_info
  @profile_info
end

#queryGoogle::Apis::AnalyticsV3::GaData::Query

Analytics data request query parameters. Corresponds to the JSON property query



2467
2468
2469
# File 'generated/google/apis/analytics_v3/classes.rb', line 2467

def query
  @query
end

#rowsArray<Array<String>>

Analytics data rows, where each row contains a list of dimension values followed by the metric values. The order of dimensions and metrics is same as specified in the request. Corresponds to the JSON property rows

Returns:

  • (Array<Array<String>>)


2474
2475
2476
# File 'generated/google/apis/analytics_v3/classes.rb', line 2474

def rows
  @rows
end

#sample_sizeFixnum

The number of samples used to calculate the result. Corresponds to the JSON property sampleSize

Returns:

  • (Fixnum)


2479
2480
2481
# File 'generated/google/apis/analytics_v3/classes.rb', line 2479

def sample_size
  @sample_size
end

#sample_spaceFixnum

Total size of the sample space from which the samples were selected. Corresponds to the JSON property sampleSpace

Returns:

  • (Fixnum)


2484
2485
2486
# File 'generated/google/apis/analytics_v3/classes.rb', line 2484

def sample_space
  @sample_space
end

Link to this page. Corresponds to the JSON property selfLink

Returns:

  • (String)


2489
2490
2491
# File 'generated/google/apis/analytics_v3/classes.rb', line 2489

def self_link
  @self_link
end

#total_resultsFixnum

The total number of rows for the query, regardless of the number of rows in the response. Corresponds to the JSON property totalResults

Returns:

  • (Fixnum)


2495
2496
2497
# File 'generated/google/apis/analytics_v3/classes.rb', line 2495

def total_results
  @total_results
end

#totals_for_all_resultsHash<String,String>

Total values for the requested metrics over all the results, not just the results returned in this response. The order of the metric totals is same as the metric order specified in the request. Corresponds to the JSON property totalsForAllResults

Returns:

  • (Hash<String,String>)


2502
2503
2504
# File 'generated/google/apis/analytics_v3/classes.rb', line 2502

def totals_for_all_results
  @totals_for_all_results
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
# File 'generated/google/apis/analytics_v3/classes.rb', line 2509

def update!(**args)
  @column_headers = args[:column_headers] if args.key?(:column_headers)
  @contains_sampled_data = args[:contains_sampled_data] if args.key?(:contains_sampled_data)
  @data_last_refreshed = args[:data_last_refreshed] if args.key?(:data_last_refreshed)
  @data_table = args[:data_table] if args.key?(:data_table)
  @id = args[:id] if args.key?(:id)
  @items_per_page = args[:items_per_page] if args.key?(:items_per_page)
  @kind = args[:kind] if args.key?(:kind)
  @next_link = args[:next_link] if args.key?(:next_link)
  @previous_link = args[:previous_link] if args.key?(:previous_link)
  @profile_info = args[:profile_info] if args.key?(:profile_info)
  @query = args[:query] if args.key?(:query)
  @rows = args[:rows] if args.key?(:rows)
  @sample_size = args[:sample_size] if args.key?(:sample_size)
  @sample_space = args[:sample_space] if args.key?(:sample_space)
  @self_link = args[:self_link] if args.key?(:self_link)
  @total_results = args[:total_results] if args.key?(:total_results)
  @totals_for_all_results = args[:totals_for_all_results] if args.key?(:totals_for_all_results)
end