late-sdk 0.0.109 → 0.0.111
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +47 -0
- data/docs/AnalyticsApi.md +232 -0
- data/docs/CreateWhatsAppFlow200Response.md +20 -0
- data/docs/CreateWhatsAppFlow200ResponseFlow.md +24 -0
- data/docs/CreateWhatsAppFlowRequest.md +24 -0
- data/docs/GetGoogleBusinessPerformance200Response.md +28 -0
- data/docs/GetGoogleBusinessPerformance200ResponseDateRange.md +20 -0
- data/docs/GetGoogleBusinessPerformance200ResponseMetricsValue.md +20 -0
- data/docs/GetGoogleBusinessPerformance200ResponseMetricsValueValuesInner.md +20 -0
- data/docs/GetGoogleBusinessPerformance400Response.md +20 -0
- data/docs/GetGoogleBusinessSearchKeywords200Response.md +28 -0
- data/docs/GetGoogleBusinessSearchKeywords200ResponseKeywordsInner.md +20 -0
- data/docs/GetGoogleBusinessSearchKeywords200ResponseMonthRange.md +20 -0
- data/docs/GetGoogleBusinessSearchKeywords400Response.md +18 -0
- data/docs/GetWhatsAppFlow200Response.md +20 -0
- data/docs/GetWhatsAppFlow200ResponseFlow.md +30 -0
- data/docs/GetWhatsAppFlow200ResponseFlowPreview.md +20 -0
- data/docs/GetWhatsAppFlowJson200Response.md +20 -0
- data/docs/GetWhatsAppFlowJson200ResponseAssetsInner.md +22 -0
- data/docs/GetYouTubeDemographics412Response.md +24 -0
- data/docs/GetYouTubeDemographics412ResponseScopeStatus.md +22 -0
- data/docs/ListWhatsAppFlows200Response.md +20 -0
- data/docs/ListWhatsAppFlows200ResponseFlowsInner.md +26 -0
- data/docs/PublishWhatsAppFlowRequest.md +18 -0
- data/docs/SendWhatsAppFlowMessage200Response.md +20 -0
- data/docs/SendWhatsAppFlowMessageRequest.md +38 -0
- data/docs/SendWhatsAppFlowMessageRequestFlowActionPayload.md +20 -0
- data/docs/SendWhatsAppFlowMessageRequestHeader.md +20 -0
- data/docs/UpdateWhatsAppFlowRequest.md +22 -0
- data/docs/UploadWhatsAppFlowJson200Response.md +20 -0
- data/docs/UploadWhatsAppFlowJson200ResponseValidationErrorsInner.md +30 -0
- data/docs/UploadWhatsAppFlowJsonRequest.md +20 -0
- data/docs/UploadWhatsAppFlowJsonRequestFlowJson.md +49 -0
- data/docs/WhatsAppFlowsApi.md +725 -0
- data/docs/YouTubeDemographicsResponse.md +28 -0
- data/docs/YouTubeDemographicsResponseDateRange.md +20 -0
- data/docs/YouTubeDemographicsResponseDemographicsValueInner.md +20 -0
- data/lib/late-sdk/api/analytics_api.rb +226 -0
- data/lib/late-sdk/api/whats_app_flows_api.rb +731 -0
- data/lib/late-sdk/models/create_whats_app_flow200_response.rb +156 -0
- data/lib/late-sdk/models/create_whats_app_flow200_response_flow.rb +176 -0
- data/lib/late-sdk/models/create_whats_app_flow_request.rb +257 -0
- data/lib/late-sdk/models/get_google_business_performance200_response.rb +195 -0
- data/lib/late-sdk/models/get_google_business_performance200_response_date_range.rb +156 -0
- data/lib/late-sdk/models/get_google_business_performance200_response_metrics_value.rb +159 -0
- data/lib/late-sdk/models/get_google_business_performance200_response_metrics_value_values_inner.rb +156 -0
- data/lib/late-sdk/models/get_google_business_performance400_response.rb +158 -0
- data/lib/late-sdk/models/get_google_business_search_keywords200_response.rb +194 -0
- data/lib/late-sdk/models/get_google_business_search_keywords200_response_keywords_inner.rb +156 -0
- data/lib/late-sdk/models/get_google_business_search_keywords200_response_month_range.rb +156 -0
- data/lib/late-sdk/models/get_google_business_search_keywords400_response.rb +147 -0
- data/lib/late-sdk/models/get_whats_app_flow200_response.rb +156 -0
- data/lib/late-sdk/models/get_whats_app_flow200_response_flow.rb +205 -0
- data/lib/late-sdk/models/get_whats_app_flow200_response_flow_preview.rb +156 -0
- data/lib/late-sdk/models/get_whats_app_flow_json200_response.rb +158 -0
- data/lib/late-sdk/models/get_whats_app_flow_json200_response_assets_inner.rb +166 -0
- data/lib/late-sdk/models/get_you_tube_demographics412_response.rb +174 -0
- data/lib/late-sdk/models/get_you_tube_demographics412_response_scope_status.rb +165 -0
- data/lib/late-sdk/models/list_whats_app_flows200_response.rb +158 -0
- data/lib/late-sdk/models/list_whats_app_flows200_response_flows_inner.rb +221 -0
- data/lib/late-sdk/models/publish_whats_app_flow_request.rb +165 -0
- data/lib/late-sdk/models/send_whats_app_flow_message200_response.rb +157 -0
- data/lib/late-sdk/models/send_whats_app_flow_message_request.rb +395 -0
- data/lib/late-sdk/models/send_whats_app_flow_message_request_flow_action_payload.rb +158 -0
- data/lib/late-sdk/models/send_whats_app_flow_message_request_header.rb +190 -0
- data/lib/late-sdk/models/update_whats_app_flow_request.rb +232 -0
- data/lib/late-sdk/models/upload_whats_app_flow_json200_response.rb +159 -0
- data/lib/late-sdk/models/upload_whats_app_flow_json200_response_validation_errors_inner.rb +201 -0
- data/lib/late-sdk/models/upload_whats_app_flow_json_request.rb +191 -0
- data/lib/late-sdk/models/upload_whats_app_flow_json_request_flow_json.rb +105 -0
- data/lib/late-sdk/models/you_tube_demographics_response.rb +196 -0
- data/lib/late-sdk/models/you_tube_demographics_response_date_range.rb +156 -0
- data/lib/late-sdk/models/you_tube_demographics_response_demographics_value_inner.rb +158 -0
- data/lib/late-sdk/version.rb +1 -1
- data/lib/late-sdk.rb +35 -0
- data/openapi.yaml +831 -0
- data/spec/api/analytics_api_spec.rb +44 -0
- data/spec/api/whats_app_flows_api_spec.rb +163 -0
- data/spec/models/create_whats_app_flow200_response_flow_spec.rb +54 -0
- data/spec/models/create_whats_app_flow200_response_spec.rb +42 -0
- data/spec/models/create_whats_app_flow_request_spec.rb +58 -0
- data/spec/models/get_google_business_performance200_response_date_range_spec.rb +42 -0
- data/spec/models/get_google_business_performance200_response_metrics_value_spec.rb +42 -0
- data/spec/models/get_google_business_performance200_response_metrics_value_values_inner_spec.rb +42 -0
- data/spec/models/get_google_business_performance200_response_spec.rb +66 -0
- data/spec/models/get_google_business_performance400_response_spec.rb +42 -0
- data/spec/models/get_google_business_search_keywords200_response_keywords_inner_spec.rb +42 -0
- data/spec/models/get_google_business_search_keywords200_response_month_range_spec.rb +42 -0
- data/spec/models/get_google_business_search_keywords200_response_spec.rb +66 -0
- data/spec/models/get_google_business_search_keywords400_response_spec.rb +36 -0
- data/spec/models/get_whats_app_flow200_response_flow_preview_spec.rb +42 -0
- data/spec/models/get_whats_app_flow200_response_flow_spec.rb +72 -0
- data/spec/models/get_whats_app_flow200_response_spec.rb +42 -0
- data/spec/models/get_whats_app_flow_json200_response_assets_inner_spec.rb +48 -0
- data/spec/models/get_whats_app_flow_json200_response_spec.rb +42 -0
- data/spec/models/get_you_tube_demographics412_response_scope_status_spec.rb +48 -0
- data/spec/models/get_you_tube_demographics412_response_spec.rb +54 -0
- data/spec/models/list_whats_app_flows200_response_flows_inner_spec.rb +64 -0
- data/spec/models/list_whats_app_flows200_response_spec.rb +42 -0
- data/spec/models/publish_whats_app_flow_request_spec.rb +36 -0
- data/spec/models/send_whats_app_flow_message200_response_spec.rb +42 -0
- data/spec/models/send_whats_app_flow_message_request_flow_action_payload_spec.rb +42 -0
- data/spec/models/send_whats_app_flow_message_request_header_spec.rb +46 -0
- data/spec/models/send_whats_app_flow_message_request_spec.rb +100 -0
- data/spec/models/update_whats_app_flow_request_spec.rb +52 -0
- data/spec/models/upload_whats_app_flow_json200_response_spec.rb +42 -0
- data/spec/models/upload_whats_app_flow_json200_response_validation_errors_inner_spec.rb +72 -0
- data/spec/models/upload_whats_app_flow_json_request_flow_json_spec.rb +32 -0
- data/spec/models/upload_whats_app_flow_json_request_spec.rb +42 -0
- data/spec/models/you_tube_demographics_response_date_range_spec.rb +42 -0
- data/spec/models/you_tube_demographics_response_demographics_value_inner_spec.rb +42 -0
- data/spec/models/you_tube_demographics_response_spec.rb +66 -0
- data/zernio-sdk-0.0.111.gem +0 -0
- metadata +143 -3
- data/zernio-sdk-0.0.109.gem +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Late::YouTubeDemographicsResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **success** | **Boolean** | | [optional] |
|
|
8
|
+
| **account_id** | **String** | The Zernio SocialAccount ID | [optional] |
|
|
9
|
+
| **platform** | **String** | | [optional] |
|
|
10
|
+
| **demographics** | **Hash<String, Array<YouTubeDemographicsResponseDemographicsValueInner>>** | Object keyed by breakdown dimension (age, gender, country) | [optional] |
|
|
11
|
+
| **date_range** | [**YouTubeDemographicsResponseDateRange**](YouTubeDemographicsResponseDateRange.md) | | [optional] |
|
|
12
|
+
| **note** | **String** | | [optional] |
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require 'late-sdk'
|
|
18
|
+
|
|
19
|
+
instance = Late::YouTubeDemographicsResponse.new(
|
|
20
|
+
success: true,
|
|
21
|
+
account_id: null,
|
|
22
|
+
platform: youtube,
|
|
23
|
+
demographics: null,
|
|
24
|
+
date_range: null,
|
|
25
|
+
note: Age/gender values are viewer percentages (0-100). Country values are view counts. Data based on signed-in viewers only, with 2-3 day delay.
|
|
26
|
+
)
|
|
27
|
+
```
|
|
28
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Late::YouTubeDemographicsResponseDateRange
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **start_date** | **String** | | [optional] |
|
|
8
|
+
| **end_date** | **String** | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'late-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Late::YouTubeDemographicsResponseDateRange.new(
|
|
16
|
+
start_date: 2026-01-01,
|
|
17
|
+
end_date: 2026-03-31
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Late::YouTubeDemographicsResponseDemographicsValueInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **dimension** | **String** | The dimension value (e.g., \"25-34\", \"US\", \"male\") | [optional] |
|
|
8
|
+
| **value** | **Float** | Viewer percentage (age/gender) or view count (country) | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'late-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Late::YouTubeDemographicsResponseDemographicsValueInner.new(
|
|
16
|
+
dimension: null,
|
|
17
|
+
value: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -428,6 +428,159 @@ module Late
|
|
|
428
428
|
return data, status_code, headers
|
|
429
429
|
end
|
|
430
430
|
|
|
431
|
+
# Get Google Business Profile performance metrics
|
|
432
|
+
# Returns daily performance metrics for a Google Business Profile location. Metrics include impressions (Maps/Search, desktop/mobile), website clicks, call clicks, direction requests, conversations, bookings, and food orders. Data may be delayed 2-3 days. Max 18 months of historical data. Requires the Analytics add-on.
|
|
433
|
+
# @param account_id [String] The Zernio SocialAccount ID for the Google Business Profile account.
|
|
434
|
+
# @param [Hash] opts the optional parameters
|
|
435
|
+
# @option opts [String] :metrics Comma-separated metric names. Defaults to all available metrics. Valid values: BUSINESS_IMPRESSIONS_DESKTOP_MAPS, BUSINESS_IMPRESSIONS_DESKTOP_SEARCH, BUSINESS_IMPRESSIONS_MOBILE_MAPS, BUSINESS_IMPRESSIONS_MOBILE_SEARCH, BUSINESS_CONVERSATIONS, BUSINESS_DIRECTION_REQUESTS, CALL_CLICKS, WEBSITE_CLICKS, BUSINESS_BOOKINGS, BUSINESS_FOOD_ORDERS, BUSINESS_FOOD_MENU_CLICKS
|
|
436
|
+
# @option opts [Date] :start_date Start date (YYYY-MM-DD). Defaults to 30 days ago. Max 18 months back.
|
|
437
|
+
# @option opts [Date] :end_date End date (YYYY-MM-DD). Defaults to today.
|
|
438
|
+
# @return [GetGoogleBusinessPerformance200Response]
|
|
439
|
+
def get_google_business_performance(account_id, opts = {})
|
|
440
|
+
data, _status_code, _headers = get_google_business_performance_with_http_info(account_id, opts)
|
|
441
|
+
data
|
|
442
|
+
end
|
|
443
|
+
|
|
444
|
+
# Get Google Business Profile performance metrics
|
|
445
|
+
# Returns daily performance metrics for a Google Business Profile location. Metrics include impressions (Maps/Search, desktop/mobile), website clicks, call clicks, direction requests, conversations, bookings, and food orders. Data may be delayed 2-3 days. Max 18 months of historical data. Requires the Analytics add-on.
|
|
446
|
+
# @param account_id [String] The Zernio SocialAccount ID for the Google Business Profile account.
|
|
447
|
+
# @param [Hash] opts the optional parameters
|
|
448
|
+
# @option opts [String] :metrics Comma-separated metric names. Defaults to all available metrics. Valid values: BUSINESS_IMPRESSIONS_DESKTOP_MAPS, BUSINESS_IMPRESSIONS_DESKTOP_SEARCH, BUSINESS_IMPRESSIONS_MOBILE_MAPS, BUSINESS_IMPRESSIONS_MOBILE_SEARCH, BUSINESS_CONVERSATIONS, BUSINESS_DIRECTION_REQUESTS, CALL_CLICKS, WEBSITE_CLICKS, BUSINESS_BOOKINGS, BUSINESS_FOOD_ORDERS, BUSINESS_FOOD_MENU_CLICKS
|
|
449
|
+
# @option opts [Date] :start_date Start date (YYYY-MM-DD). Defaults to 30 days ago. Max 18 months back.
|
|
450
|
+
# @option opts [Date] :end_date End date (YYYY-MM-DD). Defaults to today.
|
|
451
|
+
# @return [Array<(GetGoogleBusinessPerformance200Response, Integer, Hash)>] GetGoogleBusinessPerformance200Response data, response status code and response headers
|
|
452
|
+
def get_google_business_performance_with_http_info(account_id, opts = {})
|
|
453
|
+
if @api_client.config.debugging
|
|
454
|
+
@api_client.config.logger.debug 'Calling API: AnalyticsApi.get_google_business_performance ...'
|
|
455
|
+
end
|
|
456
|
+
# verify the required parameter 'account_id' is set
|
|
457
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
458
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling AnalyticsApi.get_google_business_performance"
|
|
459
|
+
end
|
|
460
|
+
# resource path
|
|
461
|
+
local_var_path = '/v1/analytics/googlebusiness/performance'
|
|
462
|
+
|
|
463
|
+
# query parameters
|
|
464
|
+
query_params = opts[:query_params] || {}
|
|
465
|
+
query_params[:'accountId'] = account_id
|
|
466
|
+
query_params[:'metrics'] = opts[:'metrics'] if !opts[:'metrics'].nil?
|
|
467
|
+
query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
|
|
468
|
+
query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
|
469
|
+
|
|
470
|
+
# header parameters
|
|
471
|
+
header_params = opts[:header_params] || {}
|
|
472
|
+
# HTTP header 'Accept' (if needed)
|
|
473
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
474
|
+
|
|
475
|
+
# form parameters
|
|
476
|
+
form_params = opts[:form_params] || {}
|
|
477
|
+
|
|
478
|
+
# http body (model)
|
|
479
|
+
post_body = opts[:debug_body]
|
|
480
|
+
|
|
481
|
+
# return_type
|
|
482
|
+
return_type = opts[:debug_return_type] || 'GetGoogleBusinessPerformance200Response'
|
|
483
|
+
|
|
484
|
+
# auth_names
|
|
485
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
486
|
+
|
|
487
|
+
new_options = opts.merge(
|
|
488
|
+
:operation => :"AnalyticsApi.get_google_business_performance",
|
|
489
|
+
:header_params => header_params,
|
|
490
|
+
:query_params => query_params,
|
|
491
|
+
:form_params => form_params,
|
|
492
|
+
:body => post_body,
|
|
493
|
+
:auth_names => auth_names,
|
|
494
|
+
:return_type => return_type
|
|
495
|
+
)
|
|
496
|
+
|
|
497
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
498
|
+
if @api_client.config.debugging
|
|
499
|
+
@api_client.config.logger.debug "API called: AnalyticsApi#get_google_business_performance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
500
|
+
end
|
|
501
|
+
return data, status_code, headers
|
|
502
|
+
end
|
|
503
|
+
|
|
504
|
+
# Get Google Business Profile search keywords
|
|
505
|
+
# Returns search keywords that triggered impressions for a Google Business Profile location. Data is aggregated monthly. Keywords below a minimum impression threshold set by Google are excluded. Max 18 months of historical data. Requires the Analytics add-on.
|
|
506
|
+
# @param account_id [String] The Zernio SocialAccount ID for the Google Business Profile account.
|
|
507
|
+
# @param [Hash] opts the optional parameters
|
|
508
|
+
# @option opts [String] :start_month Start month (YYYY-MM). Defaults to 3 months ago.
|
|
509
|
+
# @option opts [String] :end_month End month (YYYY-MM). Defaults to current month.
|
|
510
|
+
# @return [GetGoogleBusinessSearchKeywords200Response]
|
|
511
|
+
def get_google_business_search_keywords(account_id, opts = {})
|
|
512
|
+
data, _status_code, _headers = get_google_business_search_keywords_with_http_info(account_id, opts)
|
|
513
|
+
data
|
|
514
|
+
end
|
|
515
|
+
|
|
516
|
+
# Get Google Business Profile search keywords
|
|
517
|
+
# Returns search keywords that triggered impressions for a Google Business Profile location. Data is aggregated monthly. Keywords below a minimum impression threshold set by Google are excluded. Max 18 months of historical data. Requires the Analytics add-on.
|
|
518
|
+
# @param account_id [String] The Zernio SocialAccount ID for the Google Business Profile account.
|
|
519
|
+
# @param [Hash] opts the optional parameters
|
|
520
|
+
# @option opts [String] :start_month Start month (YYYY-MM). Defaults to 3 months ago.
|
|
521
|
+
# @option opts [String] :end_month End month (YYYY-MM). Defaults to current month.
|
|
522
|
+
# @return [Array<(GetGoogleBusinessSearchKeywords200Response, Integer, Hash)>] GetGoogleBusinessSearchKeywords200Response data, response status code and response headers
|
|
523
|
+
def get_google_business_search_keywords_with_http_info(account_id, opts = {})
|
|
524
|
+
if @api_client.config.debugging
|
|
525
|
+
@api_client.config.logger.debug 'Calling API: AnalyticsApi.get_google_business_search_keywords ...'
|
|
526
|
+
end
|
|
527
|
+
# verify the required parameter 'account_id' is set
|
|
528
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
529
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling AnalyticsApi.get_google_business_search_keywords"
|
|
530
|
+
end
|
|
531
|
+
pattern = Regexp.new(/^\d{4}-\d{2}$/)
|
|
532
|
+
if @api_client.config.client_side_validation && !opts[:'start_month'].nil? && opts[:'start_month'] !~ pattern
|
|
533
|
+
fail ArgumentError, "invalid value for 'opts[:\"start_month\"]' when calling AnalyticsApi.get_google_business_search_keywords, must conform to the pattern #{pattern}."
|
|
534
|
+
end
|
|
535
|
+
|
|
536
|
+
pattern = Regexp.new(/^\d{4}-\d{2}$/)
|
|
537
|
+
if @api_client.config.client_side_validation && !opts[:'end_month'].nil? && opts[:'end_month'] !~ pattern
|
|
538
|
+
fail ArgumentError, "invalid value for 'opts[:\"end_month\"]' when calling AnalyticsApi.get_google_business_search_keywords, must conform to the pattern #{pattern}."
|
|
539
|
+
end
|
|
540
|
+
|
|
541
|
+
# resource path
|
|
542
|
+
local_var_path = '/v1/analytics/googlebusiness/search-keywords'
|
|
543
|
+
|
|
544
|
+
# query parameters
|
|
545
|
+
query_params = opts[:query_params] || {}
|
|
546
|
+
query_params[:'accountId'] = account_id
|
|
547
|
+
query_params[:'startMonth'] = opts[:'start_month'] if !opts[:'start_month'].nil?
|
|
548
|
+
query_params[:'endMonth'] = opts[:'end_month'] if !opts[:'end_month'].nil?
|
|
549
|
+
|
|
550
|
+
# header parameters
|
|
551
|
+
header_params = opts[:header_params] || {}
|
|
552
|
+
# HTTP header 'Accept' (if needed)
|
|
553
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
554
|
+
|
|
555
|
+
# form parameters
|
|
556
|
+
form_params = opts[:form_params] || {}
|
|
557
|
+
|
|
558
|
+
# http body (model)
|
|
559
|
+
post_body = opts[:debug_body]
|
|
560
|
+
|
|
561
|
+
# return_type
|
|
562
|
+
return_type = opts[:debug_return_type] || 'GetGoogleBusinessSearchKeywords200Response'
|
|
563
|
+
|
|
564
|
+
# auth_names
|
|
565
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
566
|
+
|
|
567
|
+
new_options = opts.merge(
|
|
568
|
+
:operation => :"AnalyticsApi.get_google_business_search_keywords",
|
|
569
|
+
:header_params => header_params,
|
|
570
|
+
:query_params => query_params,
|
|
571
|
+
:form_params => form_params,
|
|
572
|
+
:body => post_body,
|
|
573
|
+
:auth_names => auth_names,
|
|
574
|
+
:return_type => return_type
|
|
575
|
+
)
|
|
576
|
+
|
|
577
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
578
|
+
if @api_client.config.debugging
|
|
579
|
+
@api_client.config.logger.debug "API called: AnalyticsApi#get_google_business_search_keywords\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
580
|
+
end
|
|
581
|
+
return data, status_code, headers
|
|
582
|
+
end
|
|
583
|
+
|
|
431
584
|
# Get Instagram account-level insights
|
|
432
585
|
# Returns account-level Instagram insights such as reach, views, accounts engaged, and total interactions. These metrics reflect the entire account's performance across all content surfaces (feed, stories, explore, profile), and are fundamentally different from post-level metrics. Data may be delayed up to 48 hours. Max 90 days, defaults to last 30 days. Requires the Analytics add-on.
|
|
433
586
|
# @param account_id [String] The Zernio SocialAccount ID for the Instagram account
|
|
@@ -1041,5 +1194,78 @@ module Late
|
|
|
1041
1194
|
end
|
|
1042
1195
|
return data, status_code, headers
|
|
1043
1196
|
end
|
|
1197
|
+
|
|
1198
|
+
# Get YouTube audience demographics
|
|
1199
|
+
# Returns audience demographic insights for a YouTube channel, broken down by age, gender, and/or country. Age and gender values are viewer percentages (0-100). Country values are view counts. Data is based on signed-in viewers only, with a 2-3 day delay. Requires the Analytics add-on.
|
|
1200
|
+
# @param account_id [String] The Zernio SocialAccount ID for the YouTube account
|
|
1201
|
+
# @param [Hash] opts the optional parameters
|
|
1202
|
+
# @option opts [String] :breakdown Comma-separated list of demographic dimensions: age, gender, country. Defaults to all three if omitted.
|
|
1203
|
+
# @option opts [Date] :start_date Start date in YYYY-MM-DD format. Defaults to 90 days ago.
|
|
1204
|
+
# @option opts [Date] :end_date End date in YYYY-MM-DD format. Defaults to 3 days ago (YouTube data latency).
|
|
1205
|
+
# @return [YouTubeDemographicsResponse]
|
|
1206
|
+
def get_you_tube_demographics(account_id, opts = {})
|
|
1207
|
+
data, _status_code, _headers = get_you_tube_demographics_with_http_info(account_id, opts)
|
|
1208
|
+
data
|
|
1209
|
+
end
|
|
1210
|
+
|
|
1211
|
+
# Get YouTube audience demographics
|
|
1212
|
+
# Returns audience demographic insights for a YouTube channel, broken down by age, gender, and/or country. Age and gender values are viewer percentages (0-100). Country values are view counts. Data is based on signed-in viewers only, with a 2-3 day delay. Requires the Analytics add-on.
|
|
1213
|
+
# @param account_id [String] The Zernio SocialAccount ID for the YouTube account
|
|
1214
|
+
# @param [Hash] opts the optional parameters
|
|
1215
|
+
# @option opts [String] :breakdown Comma-separated list of demographic dimensions: age, gender, country. Defaults to all three if omitted.
|
|
1216
|
+
# @option opts [Date] :start_date Start date in YYYY-MM-DD format. Defaults to 90 days ago.
|
|
1217
|
+
# @option opts [Date] :end_date End date in YYYY-MM-DD format. Defaults to 3 days ago (YouTube data latency).
|
|
1218
|
+
# @return [Array<(YouTubeDemographicsResponse, Integer, Hash)>] YouTubeDemographicsResponse data, response status code and response headers
|
|
1219
|
+
def get_you_tube_demographics_with_http_info(account_id, opts = {})
|
|
1220
|
+
if @api_client.config.debugging
|
|
1221
|
+
@api_client.config.logger.debug 'Calling API: AnalyticsApi.get_you_tube_demographics ...'
|
|
1222
|
+
end
|
|
1223
|
+
# verify the required parameter 'account_id' is set
|
|
1224
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
1225
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling AnalyticsApi.get_you_tube_demographics"
|
|
1226
|
+
end
|
|
1227
|
+
# resource path
|
|
1228
|
+
local_var_path = '/v1/analytics/youtube/demographics'
|
|
1229
|
+
|
|
1230
|
+
# query parameters
|
|
1231
|
+
query_params = opts[:query_params] || {}
|
|
1232
|
+
query_params[:'accountId'] = account_id
|
|
1233
|
+
query_params[:'breakdown'] = opts[:'breakdown'] if !opts[:'breakdown'].nil?
|
|
1234
|
+
query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
|
|
1235
|
+
query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
|
1236
|
+
|
|
1237
|
+
# header parameters
|
|
1238
|
+
header_params = opts[:header_params] || {}
|
|
1239
|
+
# HTTP header 'Accept' (if needed)
|
|
1240
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1241
|
+
|
|
1242
|
+
# form parameters
|
|
1243
|
+
form_params = opts[:form_params] || {}
|
|
1244
|
+
|
|
1245
|
+
# http body (model)
|
|
1246
|
+
post_body = opts[:debug_body]
|
|
1247
|
+
|
|
1248
|
+
# return_type
|
|
1249
|
+
return_type = opts[:debug_return_type] || 'YouTubeDemographicsResponse'
|
|
1250
|
+
|
|
1251
|
+
# auth_names
|
|
1252
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1253
|
+
|
|
1254
|
+
new_options = opts.merge(
|
|
1255
|
+
:operation => :"AnalyticsApi.get_you_tube_demographics",
|
|
1256
|
+
:header_params => header_params,
|
|
1257
|
+
:query_params => query_params,
|
|
1258
|
+
:form_params => form_params,
|
|
1259
|
+
:body => post_body,
|
|
1260
|
+
:auth_names => auth_names,
|
|
1261
|
+
:return_type => return_type
|
|
1262
|
+
)
|
|
1263
|
+
|
|
1264
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1265
|
+
if @api_client.config.debugging
|
|
1266
|
+
@api_client.config.logger.debug "API called: AnalyticsApi#get_you_tube_demographics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1267
|
+
end
|
|
1268
|
+
return data, status_code, headers
|
|
1269
|
+
end
|
|
1044
1270
|
end
|
|
1045
1271
|
end
|