Class: Google::Apis::YoutubeAnalyticsV1::ResultTable

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

Overview

Contains a single result table. The table is returned as an array of rows that contain the values for the cells of the table. Depending on the metric or dimension, the cell can contain a string (video ID, country code) or a number ( number of views or number of likes).

Defined Under Namespace

Classes: ColumnHeader

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) ⇒ ResultTable

Returns a new instance of ResultTable



293
294
295
# File 'generated/google/apis/youtube_analytics_v1/classes.rb', line 293

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

Instance Attribute Details

#column_headersArray<Google::Apis::YoutubeAnalyticsV1::ResultTable::ColumnHeader>

This value specifies information about the data returned in the rows fields. Each item in the columnHeaders list identifies a field returned in the rows value, which contains a list of comma-delimited data. The columnHeaders list will begin with the dimensions specified in the API request, which will be followed by the metrics specified in the API request. The order of both dimensions and metrics will match the ordering in the API request. For example, if the API request contains the parameters dimensions=ageGroup,gender&metrics= viewerPercentage, the API response will return columns in this order: ageGroup, gender,viewerPercentage. Corresponds to the JSON property columnHeaders



274
275
276
# File 'generated/google/apis/youtube_analytics_v1/classes.rb', line 274

def column_headers
  @column_headers
end

#kindString

This value specifies the type of data included in the API response. For the query method, the kind property value will be youtubeAnalytics#resultTable. Corresponds to the JSON property kind

Returns:

  • (String)


280
281
282
# File 'generated/google/apis/youtube_analytics_v1/classes.rb', line 280

def kind
  @kind
end

#rowsArray<Array<Object>>

The list contains all rows of the result table. Each item in the list is an array that contains comma-delimited data corresponding to a single row of data. The order of the comma-delimited data fields will match the order of the columns listed in the columnHeaders field. If no data is available for the given query, the rows element will be omitted from the response. The response for a query with the day dimension will not contain rows for the most recent days. Corresponds to the JSON property rows

Returns:

  • (Array<Array<Object>>)


291
292
293
# File 'generated/google/apis/youtube_analytics_v1/classes.rb', line 291

def rows
  @rows
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



298
299
300
301
302
# File 'generated/google/apis/youtube_analytics_v1/classes.rb', line 298

def update!(**args)
  @column_headers = args[:column_headers] if args.key?(:column_headers)
  @kind = args[:kind] if args.key?(:kind)
  @rows = args[:rows] if args.key?(:rows)
end