Class: Google::Apis::YoutubeAnalyticsV2::YouTubeAnalyticsService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::YoutubeAnalyticsV2::YouTubeAnalyticsService
- Defined in:
- generated/google/apis/youtube_analytics_v2/service.rb
Overview
YouTube Analytics API
Retrieves your YouTube Analytics data.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#delete_group(id: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::YoutubeAnalyticsV2::EmptyResponse
Deletes a group.
-
#delete_group_item(id: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::YoutubeAnalyticsV2::EmptyResponse
Removes an item from a group.
-
#initialize ⇒ YouTubeAnalyticsService
constructor
A new instance of YouTubeAnalyticsService.
-
#insert_group(group_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::YoutubeAnalyticsV2::Group
Creates a group.
-
#insert_group_item(group_item_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::YoutubeAnalyticsV2::GroupItem
Creates a group item.
-
#list_group_items(group_id: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::YoutubeAnalyticsV2::ListGroupItemsResponse
Returns a collection of group items that match the API request parameters.
-
#list_groups(id: nil, mine: nil, on_behalf_of_content_owner: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::YoutubeAnalyticsV2::ListGroupsResponse
Returns a collection of groups that match the API request parameters.
-
#query_report(currency: nil, dimensions: nil, end_date: nil, filters: nil, ids: nil, include_historical_channel_data: nil, max_results: nil, metrics: nil, sort: nil, start_date: nil, start_index: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::YoutubeAnalyticsV2::QueryResponse
Retrieve your YouTube Analytics reports.
-
#update_group(group_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::YoutubeAnalyticsV2::Group
Modifies a group.
Constructor Details
#initialize ⇒ YouTubeAnalyticsService
Returns a new instance of YouTubeAnalyticsService.
45 46 47 48 |
# File 'generated/google/apis/youtube_analytics_v2/service.rb', line 45 def initialize super('https://youtubeanalytics.googleapis.com/', '') @batch_path = 'batch' 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/youtube_analytics_v2/service.rb', line 38 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
43 44 45 |
# File 'generated/google/apis/youtube_analytics_v2/service.rb', line 43 def quota_user @quota_user end |
Instance Method Details
#delete_group(id: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::YoutubeAnalyticsV2::EmptyResponse
Deletes a group.
206 207 208 209 210 211 212 213 214 215 |
# File 'generated/google/apis/youtube_analytics_v2/service.rb', line 206 def delete_group(id: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v2/groups', ) command.response_representation = Google::Apis::YoutubeAnalyticsV2::EmptyResponse::Representation command.response_class = Google::Apis::YoutubeAnalyticsV2::EmptyResponse command.query['id'] = id unless id.nil? command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_group_item(id: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::YoutubeAnalyticsV2::EmptyResponse
Removes an item from a group.
81 82 83 84 85 86 87 88 89 90 |
# File 'generated/google/apis/youtube_analytics_v2/service.rb', line 81 def delete_group_item(id: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v2/groupItems', ) command.response_representation = Google::Apis::YoutubeAnalyticsV2::EmptyResponse::Representation command.response_class = Google::Apis::YoutubeAnalyticsV2::EmptyResponse command.query['id'] = id unless id.nil? command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#insert_group(group_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::YoutubeAnalyticsV2::Group
Creates a group.
246 247 248 249 250 251 252 253 254 255 256 |
# File 'generated/google/apis/youtube_analytics_v2/service.rb', line 246 def insert_group(group_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/groups', ) command.request_representation = Google::Apis::YoutubeAnalyticsV2::Group::Representation command.request_object = group_object command.response_representation = Google::Apis::YoutubeAnalyticsV2::Group::Representation command.response_class = Google::Apis::YoutubeAnalyticsV2::Group command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#insert_group_item(group_item_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::YoutubeAnalyticsV2::GroupItem
Creates a group item.
121 122 123 124 125 126 127 128 129 130 131 |
# File 'generated/google/apis/youtube_analytics_v2/service.rb', line 121 def insert_group_item(group_item_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v2/groupItems', ) command.request_representation = Google::Apis::YoutubeAnalyticsV2::GroupItem::Representation command.request_object = group_item_object command.response_representation = Google::Apis::YoutubeAnalyticsV2::GroupItem::Representation command.response_class = Google::Apis::YoutubeAnalyticsV2::GroupItem command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_group_items(group_id: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::YoutubeAnalyticsV2::ListGroupItemsResponse
Returns a collection of group items that match the API request parameters.
164 165 166 167 168 169 170 171 172 173 |
# File 'generated/google/apis/youtube_analytics_v2/service.rb', line 164 def list_group_items(group_id: nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/groupItems', ) command.response_representation = Google::Apis::YoutubeAnalyticsV2::ListGroupItemsResponse::Representation command.response_class = Google::Apis::YoutubeAnalyticsV2::ListGroupItemsResponse command.query['groupId'] = group_id unless group_id.nil? command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_groups(id: nil, mine: nil, on_behalf_of_content_owner: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::YoutubeAnalyticsV2::ListGroupsResponse
Returns a collection of groups that match the API request parameters. For example, you can retrieve all groups that the authenticated user owns, or you can retrieve one or more groups by their unique IDs.
302 303 304 305 306 307 308 309 310 311 312 313 |
# File 'generated/google/apis/youtube_analytics_v2/service.rb', line 302 def list_groups(id: nil, mine: nil, on_behalf_of_content_owner: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/groups', ) command.response_representation = Google::Apis::YoutubeAnalyticsV2::ListGroupsResponse::Representation command.response_class = Google::Apis::YoutubeAnalyticsV2::ListGroupsResponse command.query['id'] = id unless id.nil? command.query['mine'] = mine unless mine.nil? command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#query_report(currency: nil, dimensions: nil, end_date: nil, filters: nil, ids: nil, include_historical_channel_data: nil, max_results: nil, metrics: nil, sort: nil, start_date: nil, start_index: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::YoutubeAnalyticsV2::QueryResponse
Retrieve your YouTube Analytics reports.
429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 |
# File 'generated/google/apis/youtube_analytics_v2/service.rb', line 429 def query_report(currency: nil, dimensions: nil, end_date: nil, filters: nil, ids: nil, include_historical_channel_data: nil, max_results: nil, metrics: nil, sort: nil, start_date: nil, start_index: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v2/reports', ) command.response_representation = Google::Apis::YoutubeAnalyticsV2::QueryResponse::Representation command.response_class = Google::Apis::YoutubeAnalyticsV2::QueryResponse command.query['currency'] = currency unless currency.nil? command.query['dimensions'] = dimensions unless dimensions.nil? command.query['endDate'] = end_date unless end_date.nil? command.query['filters'] = filters unless filters.nil? command.query['ids'] = ids unless ids.nil? command.query['includeHistoricalChannelData'] = include_historical_channel_data unless include_historical_channel_data.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['metrics'] = metrics unless metrics.nil? command.query['sort'] = sort unless sort.nil? command.query['startDate'] = start_date unless start_date.nil? command.query['startIndex'] = start_index unless start_index.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#update_group(group_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::YoutubeAnalyticsV2::Group
Modifies a group. For example, you could change a group's title.
344 345 346 347 348 349 350 351 352 353 354 |
# File 'generated/google/apis/youtube_analytics_v2/service.rb', line 344 def update_group(group_object = nil, on_behalf_of_content_owner: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'v2/groups', ) command.request_representation = Google::Apis::YoutubeAnalyticsV2::Group::Representation command.request_object = group_object command.response_representation = Google::Apis::YoutubeAnalyticsV2::Group::Representation command.response_class = Google::Apis::YoutubeAnalyticsV2::Group command.query['onBehalfOfContentOwner'] = on_behalf_of_content_owner unless on_behalf_of_content_owner.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |