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

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

Overview

Response message for TargetedQueriesService.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) ⇒ QueryResponse

Returns a new instance of QueryResponse



487
488
489
# File 'generated/google/apis/youtube_analytics_v2/classes.rb', line 487

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



459
460
461
# File 'generated/google/apis/youtube_analytics_v2/classes.rb', line 459

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



466
467
468
# File 'generated/google/apis/youtube_analytics_v2/classes.rb', line 466

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)


473
474
475
# File 'generated/google/apis/youtube_analytics_v2/classes.rb', line 473

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


485
486
487
# File 'generated/google/apis/youtube_analytics_v2/classes.rb', line 485

def rows
  @rows
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



492
493
494
495
496
497
# File 'generated/google/apis/youtube_analytics_v2/classes.rb', line 492

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