Class: Google::Apis::YoutubeAnalyticsV2::QueryResponse

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

Overview

Response message for TargetedQueriesService.Query.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ QueryResponse

Returns a new instance of QueryResponse.



460
461
462
# File 'lib/google/apis/youtube_analytics_v2/classes.rb', line 460

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

Instance Attribute Details

#column_headersArray<Google::Apis::YoutubeAnalyticsV2::ResultTableColumnHeader>

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



435
436
437
# File 'lib/google/apis/youtube_analytics_v2/classes.rb', line 435

def column_headers
  @column_headers
end

#errorsGoogle::Apis::YoutubeAnalyticsV2::Errors

Request Error information. The presence of an error field signals that the operation has failed. Corresponds to the JSON property errors



441
442
443
# File 'lib/google/apis/youtube_analytics_v2/classes.rb', line 441

def errors
  @errors
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)


447
448
449
# File 'lib/google/apis/youtube_analytics_v2/classes.rb', line 447

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


458
459
460
# File 'lib/google/apis/youtube_analytics_v2/classes.rb', line 458

def rows
  @rows
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



465
466
467
468
469
470
# File 'lib/google/apis/youtube_analytics_v2/classes.rb', line 465

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