late-sdk 0.0.64 → 0.0.66

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.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -0
  3. data/docs/AnalyticsApi.md +160 -0
  4. data/docs/GetInstagramAccountInsights404Response.md +18 -0
  5. data/docs/InstagramAccountInsightsResponse.md +32 -0
  6. data/docs/InstagramAccountInsightsResponseDateRange.md +20 -0
  7. data/docs/InstagramAccountInsightsResponseMetricsValue.md +22 -0
  8. data/docs/InstagramAccountInsightsResponseMetricsValueBreakdownsInner.md +20 -0
  9. data/docs/InstagramAccountInsightsResponseMetricsValueValuesInner.md +20 -0
  10. data/docs/InstagramDemographicsResponse.md +30 -0
  11. data/docs/InstagramDemographicsResponseDemographicsValueInner.md +20 -0
  12. data/docs/TikTokPlatformData.md +1 -1
  13. data/lib/late-sdk/api/analytics_api.rb +164 -0
  14. data/lib/late-sdk/models/get_instagram_account_insights404_response.rb +147 -0
  15. data/lib/late-sdk/models/instagram_account_insights_response.rb +249 -0
  16. data/lib/late-sdk/models/instagram_account_insights_response_date_range.rb +156 -0
  17. data/lib/late-sdk/models/instagram_account_insights_response_metrics_value.rb +172 -0
  18. data/lib/late-sdk/models/instagram_account_insights_response_metrics_value_breakdowns_inner.rb +156 -0
  19. data/lib/late-sdk/models/instagram_account_insights_response_metrics_value_values_inner.rb +156 -0
  20. data/lib/late-sdk/models/instagram_demographics_response.rb +252 -0
  21. data/lib/late-sdk/models/instagram_demographics_response_demographics_value_inner.rb +158 -0
  22. data/lib/late-sdk/models/tik_tok_platform_data.rb +1 -1
  23. data/lib/late-sdk/version.rb +1 -1
  24. data/lib/late-sdk.rb +8 -0
  25. data/openapi.yaml +363 -1
  26. data/spec/api/analytics_api_spec.rb +32 -0
  27. data/spec/models/get_instagram_account_insights404_response_spec.rb +36 -0
  28. data/spec/models/instagram_account_insights_response_date_range_spec.rb +42 -0
  29. data/spec/models/instagram_account_insights_response_metrics_value_breakdowns_inner_spec.rb +42 -0
  30. data/spec/models/instagram_account_insights_response_metrics_value_spec.rb +48 -0
  31. data/spec/models/instagram_account_insights_response_metrics_value_values_inner_spec.rb +42 -0
  32. data/spec/models/instagram_account_insights_response_spec.rb +82 -0
  33. data/spec/models/instagram_demographics_response_demographics_value_inner_spec.rb +42 -0
  34. data/spec/models/instagram_demographics_response_spec.rb +80 -0
  35. data/zernio-sdk-0.0.66.gem +0 -0
  36. metadata +35 -3
  37. data/zernio-sdk-0.0.64.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 24830fb6775e04474fc03794c91df6c85a5239ac3c2ddecc2122c9d4f0d40bd6
4
- data.tar.gz: 11e9a596ef6241b37bebd9d3d80260ec53bb16626ed8d31fb9b6e209ecbef324
3
+ metadata.gz: eec3299a15df39e81ba4a26f00fbc2c1f079508c2d736eab8de783394fb57dd0
4
+ data.tar.gz: 78ec7d2263ace152b4c7ddd9d7058bce1971b49b50d5e43fe145b99e486896fc
5
5
  SHA512:
6
- metadata.gz: f2b9572ec7a8f5199ad9e81acc70e6ef2e7764afc053b14f3f6803162008118c9dc8c43c029fa34d74a873ba362ff39ff98100a885d64300afaa1ea74580e32a
7
- data.tar.gz: c90f97a16493478b3dd18ec5d61e19bdb9f0c682bacd6ff2ee14fa91aad7a1aee46ff207950f685499365f406ddc7e44253a694ced856cc63999b9fc8ad376a0
6
+ metadata.gz: 2400a0349be5461a4a7a218e3c6ddf8b440ba9bb20e8ab1db19f912f9bb34c81b25b4da2dbf72c43113de0dd2024e974038cb3f9e7785d1ad804c2aec4bf3875
7
+ data.tar.gz: 79ecab18fe6eb8c8ced9c89a8023635f3297b1886fa915f25b829ad37fdbe59eb7cf20658c8024d80d5c272852911d68bbc862f11b62a7252891bea47c59c63f
data/README.md CHANGED
@@ -92,6 +92,8 @@ Class | Method | HTTP request | Description
92
92
  *Late::AnalyticsApi* | [**get_content_decay**](docs/AnalyticsApi.md#get_content_decay) | **GET** /v1/analytics/content-decay | Get content performance decay
93
93
  *Late::AnalyticsApi* | [**get_daily_metrics**](docs/AnalyticsApi.md#get_daily_metrics) | **GET** /v1/analytics/daily-metrics | Get daily aggregated metrics
94
94
  *Late::AnalyticsApi* | [**get_follower_stats**](docs/AnalyticsApi.md#get_follower_stats) | **GET** /v1/accounts/follower-stats | Get follower stats
95
+ *Late::AnalyticsApi* | [**get_instagram_account_insights**](docs/AnalyticsApi.md#get_instagram_account_insights) | **GET** /v1/analytics/instagram/account-insights | Get Instagram account-level insights
96
+ *Late::AnalyticsApi* | [**get_instagram_demographics**](docs/AnalyticsApi.md#get_instagram_demographics) | **GET** /v1/analytics/instagram/demographics | Get Instagram audience demographics
95
97
  *Late::AnalyticsApi* | [**get_linked_in_aggregate_analytics**](docs/AnalyticsApi.md#get_linked_in_aggregate_analytics) | **GET** /v1/accounts/{accountId}/linkedin-aggregate-analytics | Get LinkedIn aggregate stats
96
98
  *Late::AnalyticsApi* | [**get_linked_in_post_analytics**](docs/AnalyticsApi.md#get_linked_in_post_analytics) | **GET** /v1/accounts/{accountId}/linkedin-post-analytics | Get LinkedIn post stats
97
99
  *Late::AnalyticsApi* | [**get_linked_in_post_reactions**](docs/AnalyticsApi.md#get_linked_in_post_reactions) | **GET** /v1/accounts/{accountId}/linkedin-post-reactions | Get LinkedIn post reactions
@@ -427,6 +429,7 @@ Class | Method | HTTP request | Description
427
429
  - [Late::GetInboxPostComments200ResponseCommentsInnerFrom](docs/GetInboxPostComments200ResponseCommentsInnerFrom.md)
428
430
  - [Late::GetInboxPostComments200ResponseMeta](docs/GetInboxPostComments200ResponseMeta.md)
429
431
  - [Late::GetInboxPostComments200ResponsePagination](docs/GetInboxPostComments200ResponsePagination.md)
432
+ - [Late::GetInstagramAccountInsights404Response](docs/GetInstagramAccountInsights404Response.md)
430
433
  - [Late::GetLinkedInAggregateAnalytics200Response](docs/GetLinkedInAggregateAnalytics200Response.md)
431
434
  - [Late::GetLinkedInAggregateAnalytics400Response](docs/GetLinkedInAggregateAnalytics400Response.md)
432
435
  - [Late::GetLinkedInAggregateAnalytics402Response](docs/GetLinkedInAggregateAnalytics402Response.md)
@@ -528,6 +531,13 @@ Class | Method | HTTP request | Description
528
531
  - [Late::InitiateTelegramConnectRequest](docs/InitiateTelegramConnectRequest.md)
529
532
  - [Late::InlineObject](docs/InlineObject.md)
530
533
  - [Late::InlineObject1](docs/InlineObject1.md)
534
+ - [Late::InstagramAccountInsightsResponse](docs/InstagramAccountInsightsResponse.md)
535
+ - [Late::InstagramAccountInsightsResponseDateRange](docs/InstagramAccountInsightsResponseDateRange.md)
536
+ - [Late::InstagramAccountInsightsResponseMetricsValue](docs/InstagramAccountInsightsResponseMetricsValue.md)
537
+ - [Late::InstagramAccountInsightsResponseMetricsValueBreakdownsInner](docs/InstagramAccountInsightsResponseMetricsValueBreakdownsInner.md)
538
+ - [Late::InstagramAccountInsightsResponseMetricsValueValuesInner](docs/InstagramAccountInsightsResponseMetricsValueValuesInner.md)
539
+ - [Late::InstagramDemographicsResponse](docs/InstagramDemographicsResponse.md)
540
+ - [Late::InstagramDemographicsResponseDemographicsValueInner](docs/InstagramDemographicsResponseDemographicsValueInner.md)
531
541
  - [Late::InstagramPlatformData](docs/InstagramPlatformData.md)
532
542
  - [Late::InstagramPlatformDataTrialParams](docs/InstagramPlatformDataTrialParams.md)
533
543
  - [Late::InstagramPlatformDataUserTagsInner](docs/InstagramPlatformDataUserTagsInner.md)
data/docs/AnalyticsApi.md CHANGED
@@ -9,6 +9,8 @@ All URIs are relative to *https://zernio.com/api*
9
9
  | [**get_content_decay**](AnalyticsApi.md#get_content_decay) | **GET** /v1/analytics/content-decay | Get content performance decay |
10
10
  | [**get_daily_metrics**](AnalyticsApi.md#get_daily_metrics) | **GET** /v1/analytics/daily-metrics | Get daily aggregated metrics |
11
11
  | [**get_follower_stats**](AnalyticsApi.md#get_follower_stats) | **GET** /v1/accounts/follower-stats | Get follower stats |
12
+ | [**get_instagram_account_insights**](AnalyticsApi.md#get_instagram_account_insights) | **GET** /v1/analytics/instagram/account-insights | Get Instagram account-level insights |
13
+ | [**get_instagram_demographics**](AnalyticsApi.md#get_instagram_demographics) | **GET** /v1/analytics/instagram/demographics | Get Instagram audience demographics |
12
14
  | [**get_linked_in_aggregate_analytics**](AnalyticsApi.md#get_linked_in_aggregate_analytics) | **GET** /v1/accounts/{accountId}/linkedin-aggregate-analytics | Get LinkedIn aggregate stats |
13
15
  | [**get_linked_in_post_analytics**](AnalyticsApi.md#get_linked_in_post_analytics) | **GET** /v1/accounts/{accountId}/linkedin-post-analytics | Get LinkedIn post stats |
14
16
  | [**get_linked_in_post_reactions**](AnalyticsApi.md#get_linked_in_post_reactions) | **GET** /v1/accounts/{accountId}/linkedin-post-reactions | Get LinkedIn post reactions |
@@ -414,6 +416,164 @@ end
414
416
  - **Accept**: application/json
415
417
 
416
418
 
419
+ ## get_instagram_account_insights
420
+
421
+ > <InstagramAccountInsightsResponse> get_instagram_account_insights(account_id, opts)
422
+
423
+ Get Instagram account-level insights
424
+
425
+ 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.
426
+
427
+ ### Examples
428
+
429
+ ```ruby
430
+ require 'time'
431
+ require 'late-sdk'
432
+ # setup authorization
433
+ Late.configure do |config|
434
+ # Configure Bearer authorization (JWT): bearerAuth
435
+ config.access_token = 'YOUR_BEARER_TOKEN'
436
+ end
437
+
438
+ api_instance = Late::AnalyticsApi.new
439
+ account_id = 'account_id_example' # String | The Zernio SocialAccount ID for the Instagram account
440
+ opts = {
441
+ metrics: 'metrics_example', # String | Comma-separated list of metrics. Defaults to \"reach,views,accounts_engaged,total_interactions\". Valid metrics: reach, views, accounts_engaged, total_interactions, comments, likes, saves, shares, replies, reposts, follows_and_unfollows, profile_links_taps. Note: only \"reach\" supports metricType=time_series. All other metrics are total_value only.
442
+ since: Date.parse('2013-10-20'), # Date | Start date (YYYY-MM-DD). Defaults to 30 days ago.
443
+ _until: Date.parse('2013-10-20'), # Date | End date (YYYY-MM-DD). Defaults to today.
444
+ metric_type: 'time_series', # String | \"total_value\" (default) returns aggregated totals and supports breakdowns. \"time_series\" returns daily values but only works with the \"reach\" metric.
445
+ breakdown: 'breakdown_example' # String | Breakdown dimension (only valid with metricType=total_value). Valid values depend on the metric: media_product_type, follow_type, follower_type, contact_button_type.
446
+ }
447
+
448
+ begin
449
+ # Get Instagram account-level insights
450
+ result = api_instance.get_instagram_account_insights(account_id, opts)
451
+ p result
452
+ rescue Late::ApiError => e
453
+ puts "Error when calling AnalyticsApi->get_instagram_account_insights: #{e}"
454
+ end
455
+ ```
456
+
457
+ #### Using the get_instagram_account_insights_with_http_info variant
458
+
459
+ This returns an Array which contains the response data, status code and headers.
460
+
461
+ > <Array(<InstagramAccountInsightsResponse>, Integer, Hash)> get_instagram_account_insights_with_http_info(account_id, opts)
462
+
463
+ ```ruby
464
+ begin
465
+ # Get Instagram account-level insights
466
+ data, status_code, headers = api_instance.get_instagram_account_insights_with_http_info(account_id, opts)
467
+ p status_code # => 2xx
468
+ p headers # => { ... }
469
+ p data # => <InstagramAccountInsightsResponse>
470
+ rescue Late::ApiError => e
471
+ puts "Error when calling AnalyticsApi->get_instagram_account_insights_with_http_info: #{e}"
472
+ end
473
+ ```
474
+
475
+ ### Parameters
476
+
477
+ | Name | Type | Description | Notes |
478
+ | ---- | ---- | ----------- | ----- |
479
+ | **account_id** | **String** | The Zernio SocialAccount ID for the Instagram account | |
480
+ | **metrics** | **String** | Comma-separated list of metrics. Defaults to \&quot;reach,views,accounts_engaged,total_interactions\&quot;. Valid metrics: reach, views, accounts_engaged, total_interactions, comments, likes, saves, shares, replies, reposts, follows_and_unfollows, profile_links_taps. Note: only \&quot;reach\&quot; supports metricType&#x3D;time_series. All other metrics are total_value only. | [optional] |
481
+ | **since** | **Date** | Start date (YYYY-MM-DD). Defaults to 30 days ago. | [optional] |
482
+ | **_until** | **Date** | End date (YYYY-MM-DD). Defaults to today. | [optional] |
483
+ | **metric_type** | **String** | \&quot;total_value\&quot; (default) returns aggregated totals and supports breakdowns. \&quot;time_series\&quot; returns daily values but only works with the \&quot;reach\&quot; metric. | [optional][default to &#39;total_value&#39;] |
484
+ | **breakdown** | **String** | Breakdown dimension (only valid with metricType&#x3D;total_value). Valid values depend on the metric: media_product_type, follow_type, follower_type, contact_button_type. | [optional] |
485
+
486
+ ### Return type
487
+
488
+ [**InstagramAccountInsightsResponse**](InstagramAccountInsightsResponse.md)
489
+
490
+ ### Authorization
491
+
492
+ [bearerAuth](../README.md#bearerAuth)
493
+
494
+ ### HTTP request headers
495
+
496
+ - **Content-Type**: Not defined
497
+ - **Accept**: application/json
498
+
499
+
500
+ ## get_instagram_demographics
501
+
502
+ > <InstagramDemographicsResponse> get_instagram_demographics(account_id, opts)
503
+
504
+ Get Instagram audience demographics
505
+
506
+ Returns audience demographic insights for an Instagram account, broken down by age, city, country, and/or gender. Requires at least 100 followers. Returns top 45 entries per dimension. Data may be delayed up to 48 hours. Requires the Analytics add-on.
507
+
508
+ ### Examples
509
+
510
+ ```ruby
511
+ require 'time'
512
+ require 'late-sdk'
513
+ # setup authorization
514
+ Late.configure do |config|
515
+ # Configure Bearer authorization (JWT): bearerAuth
516
+ config.access_token = 'YOUR_BEARER_TOKEN'
517
+ end
518
+
519
+ api_instance = Late::AnalyticsApi.new
520
+ account_id = 'account_id_example' # String | The Zernio SocialAccount ID for the Instagram account
521
+ opts = {
522
+ metric: 'follower_demographics', # String | \"follower_demographics\" for follower audience data, or \"engaged_audience_demographics\" for engaged viewers.
523
+ breakdown: 'breakdown_example', # String | Comma-separated list of demographic dimensions: age, city, country, gender. Defaults to all four if omitted.
524
+ timeframe: 'this_week' # String | Time period for demographic data. Defaults to \"this_month\".
525
+ }
526
+
527
+ begin
528
+ # Get Instagram audience demographics
529
+ result = api_instance.get_instagram_demographics(account_id, opts)
530
+ p result
531
+ rescue Late::ApiError => e
532
+ puts "Error when calling AnalyticsApi->get_instagram_demographics: #{e}"
533
+ end
534
+ ```
535
+
536
+ #### Using the get_instagram_demographics_with_http_info variant
537
+
538
+ This returns an Array which contains the response data, status code and headers.
539
+
540
+ > <Array(<InstagramDemographicsResponse>, Integer, Hash)> get_instagram_demographics_with_http_info(account_id, opts)
541
+
542
+ ```ruby
543
+ begin
544
+ # Get Instagram audience demographics
545
+ data, status_code, headers = api_instance.get_instagram_demographics_with_http_info(account_id, opts)
546
+ p status_code # => 2xx
547
+ p headers # => { ... }
548
+ p data # => <InstagramDemographicsResponse>
549
+ rescue Late::ApiError => e
550
+ puts "Error when calling AnalyticsApi->get_instagram_demographics_with_http_info: #{e}"
551
+ end
552
+ ```
553
+
554
+ ### Parameters
555
+
556
+ | Name | Type | Description | Notes |
557
+ | ---- | ---- | ----------- | ----- |
558
+ | **account_id** | **String** | The Zernio SocialAccount ID for the Instagram account | |
559
+ | **metric** | **String** | \&quot;follower_demographics\&quot; for follower audience data, or \&quot;engaged_audience_demographics\&quot; for engaged viewers. | [optional][default to &#39;follower_demographics&#39;] |
560
+ | **breakdown** | **String** | Comma-separated list of demographic dimensions: age, city, country, gender. Defaults to all four if omitted. | [optional] |
561
+ | **timeframe** | **String** | Time period for demographic data. Defaults to \&quot;this_month\&quot;. | [optional][default to &#39;this_month&#39;] |
562
+
563
+ ### Return type
564
+
565
+ [**InstagramDemographicsResponse**](InstagramDemographicsResponse.md)
566
+
567
+ ### Authorization
568
+
569
+ [bearerAuth](../README.md#bearerAuth)
570
+
571
+ ### HTTP request headers
572
+
573
+ - **Content-Type**: Not defined
574
+ - **Accept**: application/json
575
+
576
+
417
577
  ## get_linked_in_aggregate_analytics
418
578
 
419
579
  > <GetLinkedInAggregateAnalytics200Response> get_linked_in_aggregate_analytics(account_id, opts)
@@ -0,0 +1,18 @@
1
+ # Late::GetInstagramAccountInsights404Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **error** | **String** | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'late-sdk'
13
+
14
+ instance = Late::GetInstagramAccountInsights404Response.new(
15
+ error: Account not found
16
+ )
17
+ ```
18
+
@@ -0,0 +1,32 @@
1
+ # Late::InstagramAccountInsightsResponse
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
+ | **date_range** | [**InstagramAccountInsightsResponseDateRange**](InstagramAccountInsightsResponseDateRange.md) | | [optional] |
11
+ | **metric_type** | **String** | | [optional] |
12
+ | **breakdown** | **String** | Breakdown dimension used (only present when breakdown was requested) | [optional] |
13
+ | **metrics** | [**Hash&lt;String, InstagramAccountInsightsResponseMetricsValue&gt;**](InstagramAccountInsightsResponseMetricsValue.md) | Object keyed by metric name. For time_series: each metric has \&quot;total\&quot; (number) and \&quot;values\&quot; (array of {date, value}). For total_value: each metric has \&quot;total\&quot; (number) and optionally \&quot;breakdowns\&quot; (array of {dimension, value}). | [optional] |
14
+ | **data_delay** | **String** | | [optional] |
15
+
16
+ ## Example
17
+
18
+ ```ruby
19
+ require 'late-sdk'
20
+
21
+ instance = Late::InstagramAccountInsightsResponse.new(
22
+ success: true,
23
+ account_id: null,
24
+ platform: instagram,
25
+ date_range: null,
26
+ metric_type: null,
27
+ breakdown: null,
28
+ metrics: null,
29
+ data_delay: Data may be delayed up to 48 hours
30
+ )
31
+ ```
32
+
@@ -0,0 +1,20 @@
1
+ # Late::InstagramAccountInsightsResponseDateRange
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **since** | **Date** | | [optional] |
8
+ | **_until** | **Date** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'late-sdk'
14
+
15
+ instance = Late::InstagramAccountInsightsResponseDateRange.new(
16
+ since: null,
17
+ _until: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,22 @@
1
+ # Late::InstagramAccountInsightsResponseMetricsValue
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **total** | **Float** | Sum or aggregate value for the metric | [optional] |
8
+ | **values** | [**Array&lt;InstagramAccountInsightsResponseMetricsValueValuesInner&gt;**](InstagramAccountInsightsResponseMetricsValueValuesInner.md) | Daily values (only for time_series) | [optional] |
9
+ | **breakdowns** | [**Array&lt;InstagramAccountInsightsResponseMetricsValueBreakdownsInner&gt;**](InstagramAccountInsightsResponseMetricsValueBreakdownsInner.md) | Breakdown values (only for total_value with breakdown) | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'late-sdk'
15
+
16
+ instance = Late::InstagramAccountInsightsResponseMetricsValue.new(
17
+ total: null,
18
+ values: null,
19
+ breakdowns: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,20 @@
1
+ # Late::InstagramAccountInsightsResponseMetricsValueBreakdownsInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **dimension** | **String** | | [optional] |
8
+ | **value** | **Float** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'late-sdk'
14
+
15
+ instance = Late::InstagramAccountInsightsResponseMetricsValueBreakdownsInner.new(
16
+ dimension: null,
17
+ value: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,20 @@
1
+ # Late::InstagramAccountInsightsResponseMetricsValueValuesInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **date** | **Date** | | [optional] |
8
+ | **value** | **Float** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'late-sdk'
14
+
15
+ instance = Late::InstagramAccountInsightsResponseMetricsValueValuesInner.new(
16
+ date: null,
17
+ value: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,30 @@
1
+ # Late::InstagramDemographicsResponse
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
+ | **metric** | **String** | | [optional] |
11
+ | **timeframe** | **String** | The timeframe used for demographic data | [optional] |
12
+ | **demographics** | **Hash&lt;String, Array&lt;InstagramDemographicsResponseDemographicsValueInner&gt;&gt;** | Object keyed by breakdown dimension (age, city, country, gender) | [optional] |
13
+ | **note** | **String** | | [optional] |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'late-sdk'
19
+
20
+ instance = Late::InstagramDemographicsResponse.new(
21
+ success: true,
22
+ account_id: null,
23
+ platform: instagram,
24
+ metric: null,
25
+ timeframe: null,
26
+ demographics: null,
27
+ note: Demographics show top 45 entries per dimension. Requires 100+ followers.
28
+ )
29
+ ```
30
+
@@ -0,0 +1,20 @@
1
+ # Late::InstagramDemographicsResponseDemographicsValueInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **dimension** | **String** | The dimension value (e.g., \&quot;25-34\&quot;, \&quot;US\&quot;, \&quot;M\&quot;) | [optional] |
8
+ | **value** | **Float** | Count of accounts in this dimension | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'late-sdk'
14
+
15
+ instance = Late::InstagramDemographicsResponseDemographicsValueInner.new(
16
+ dimension: null,
17
+ value: null
18
+ )
19
+ ```
20
+
@@ -16,7 +16,7 @@
16
16
  | **express_consent_given** | **Boolean** | User has given express consent for posting | [optional] |
17
17
  | **media_type** | **String** | Optional override. Defaults based on provided media items. | [optional] |
18
18
  | **video_cover_timestamp_ms** | **Integer** | Optional for video posts. Timestamp in milliseconds to select which frame to use as thumbnail (defaults to 1000ms/1 second). Ignored when videoCoverImageUrl is provided. | [optional] |
19
- | **video_cover_image_url** | **String** | Optional for video posts. URL of a custom thumbnail image (JPG, PNG, or WebP, max 20MB). The image is prepended as a 1-second still frame to the video and used as the cover. Overrides videoCoverTimestampMs when provided. | [optional] |
19
+ | **video_cover_image_url** | **String** | Optional for video posts. URL of a custom thumbnail image (JPG, PNG, or WebP, max 20MB). The image is stitched as a single frame at the start of the video and used as the cover. Overrides videoCoverTimestampMs when provided. | [optional] |
20
20
  | **photo_cover_index** | **Integer** | Optional for photo carousels. Index of image to use as cover, 0-based (defaults to 0/first image). | [optional] |
21
21
  | **auto_add_music** | **Boolean** | When true, TikTok may add recommended music (photos only) | [optional] |
22
22
  | **video_made_with_ai** | **Boolean** | Set true to disclose AI-generated content | [optional] |
@@ -422,6 +422,170 @@ module Late
422
422
  return data, status_code, headers
423
423
  end
424
424
 
425
+ # Get Instagram account-level insights
426
+ # 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.
427
+ # @param account_id [String] The Zernio SocialAccount ID for the Instagram account
428
+ # @param [Hash] opts the optional parameters
429
+ # @option opts [String] :metrics Comma-separated list of metrics. Defaults to \&quot;reach,views,accounts_engaged,total_interactions\&quot;. Valid metrics: reach, views, accounts_engaged, total_interactions, comments, likes, saves, shares, replies, reposts, follows_and_unfollows, profile_links_taps. Note: only \&quot;reach\&quot; supports metricType&#x3D;time_series. All other metrics are total_value only.
430
+ # @option opts [Date] :since Start date (YYYY-MM-DD). Defaults to 30 days ago.
431
+ # @option opts [Date] :_until End date (YYYY-MM-DD). Defaults to today.
432
+ # @option opts [String] :metric_type \&quot;total_value\&quot; (default) returns aggregated totals and supports breakdowns. \&quot;time_series\&quot; returns daily values but only works with the \&quot;reach\&quot; metric. (default to 'total_value')
433
+ # @option opts [String] :breakdown Breakdown dimension (only valid with metricType&#x3D;total_value). Valid values depend on the metric: media_product_type, follow_type, follower_type, contact_button_type.
434
+ # @return [InstagramAccountInsightsResponse]
435
+ def get_instagram_account_insights(account_id, opts = {})
436
+ data, _status_code, _headers = get_instagram_account_insights_with_http_info(account_id, opts)
437
+ data
438
+ end
439
+
440
+ # Get Instagram account-level insights
441
+ # Returns account-level Instagram insights such as reach, views, accounts engaged, and total interactions. These metrics reflect the entire account&#39;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.
442
+ # @param account_id [String] The Zernio SocialAccount ID for the Instagram account
443
+ # @param [Hash] opts the optional parameters
444
+ # @option opts [String] :metrics Comma-separated list of metrics. Defaults to \&quot;reach,views,accounts_engaged,total_interactions\&quot;. Valid metrics: reach, views, accounts_engaged, total_interactions, comments, likes, saves, shares, replies, reposts, follows_and_unfollows, profile_links_taps. Note: only \&quot;reach\&quot; supports metricType&#x3D;time_series. All other metrics are total_value only.
445
+ # @option opts [Date] :since Start date (YYYY-MM-DD). Defaults to 30 days ago.
446
+ # @option opts [Date] :_until End date (YYYY-MM-DD). Defaults to today.
447
+ # @option opts [String] :metric_type \&quot;total_value\&quot; (default) returns aggregated totals and supports breakdowns. \&quot;time_series\&quot; returns daily values but only works with the \&quot;reach\&quot; metric. (default to 'total_value')
448
+ # @option opts [String] :breakdown Breakdown dimension (only valid with metricType&#x3D;total_value). Valid values depend on the metric: media_product_type, follow_type, follower_type, contact_button_type.
449
+ # @return [Array<(InstagramAccountInsightsResponse, Integer, Hash)>] InstagramAccountInsightsResponse data, response status code and response headers
450
+ def get_instagram_account_insights_with_http_info(account_id, opts = {})
451
+ if @api_client.config.debugging
452
+ @api_client.config.logger.debug 'Calling API: AnalyticsApi.get_instagram_account_insights ...'
453
+ end
454
+ # verify the required parameter 'account_id' is set
455
+ if @api_client.config.client_side_validation && account_id.nil?
456
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AnalyticsApi.get_instagram_account_insights"
457
+ end
458
+ allowable_values = ["time_series", "total_value"]
459
+ if @api_client.config.client_side_validation && opts[:'metric_type'] && !allowable_values.include?(opts[:'metric_type'])
460
+ fail ArgumentError, "invalid value for \"metric_type\", must be one of #{allowable_values}"
461
+ end
462
+ # resource path
463
+ local_var_path = '/v1/analytics/instagram/account-insights'
464
+
465
+ # query parameters
466
+ query_params = opts[:query_params] || {}
467
+ query_params[:'accountId'] = account_id
468
+ query_params[:'metrics'] = opts[:'metrics'] if !opts[:'metrics'].nil?
469
+ query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
470
+ query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil?
471
+ query_params[:'metricType'] = opts[:'metric_type'] if !opts[:'metric_type'].nil?
472
+ query_params[:'breakdown'] = opts[:'breakdown'] if !opts[:'breakdown'].nil?
473
+
474
+ # header parameters
475
+ header_params = opts[:header_params] || {}
476
+ # HTTP header 'Accept' (if needed)
477
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
478
+
479
+ # form parameters
480
+ form_params = opts[:form_params] || {}
481
+
482
+ # http body (model)
483
+ post_body = opts[:debug_body]
484
+
485
+ # return_type
486
+ return_type = opts[:debug_return_type] || 'InstagramAccountInsightsResponse'
487
+
488
+ # auth_names
489
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
490
+
491
+ new_options = opts.merge(
492
+ :operation => :"AnalyticsApi.get_instagram_account_insights",
493
+ :header_params => header_params,
494
+ :query_params => query_params,
495
+ :form_params => form_params,
496
+ :body => post_body,
497
+ :auth_names => auth_names,
498
+ :return_type => return_type
499
+ )
500
+
501
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
502
+ if @api_client.config.debugging
503
+ @api_client.config.logger.debug "API called: AnalyticsApi#get_instagram_account_insights\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
504
+ end
505
+ return data, status_code, headers
506
+ end
507
+
508
+ # Get Instagram audience demographics
509
+ # Returns audience demographic insights for an Instagram account, broken down by age, city, country, and/or gender. Requires at least 100 followers. Returns top 45 entries per dimension. Data may be delayed up to 48 hours. Requires the Analytics add-on.
510
+ # @param account_id [String] The Zernio SocialAccount ID for the Instagram account
511
+ # @param [Hash] opts the optional parameters
512
+ # @option opts [String] :metric \&quot;follower_demographics\&quot; for follower audience data, or \&quot;engaged_audience_demographics\&quot; for engaged viewers. (default to 'follower_demographics')
513
+ # @option opts [String] :breakdown Comma-separated list of demographic dimensions: age, city, country, gender. Defaults to all four if omitted.
514
+ # @option opts [String] :timeframe Time period for demographic data. Defaults to \&quot;this_month\&quot;. (default to 'this_month')
515
+ # @return [InstagramDemographicsResponse]
516
+ def get_instagram_demographics(account_id, opts = {})
517
+ data, _status_code, _headers = get_instagram_demographics_with_http_info(account_id, opts)
518
+ data
519
+ end
520
+
521
+ # Get Instagram audience demographics
522
+ # Returns audience demographic insights for an Instagram account, broken down by age, city, country, and/or gender. Requires at least 100 followers. Returns top 45 entries per dimension. Data may be delayed up to 48 hours. Requires the Analytics add-on.
523
+ # @param account_id [String] The Zernio SocialAccount ID for the Instagram account
524
+ # @param [Hash] opts the optional parameters
525
+ # @option opts [String] :metric \&quot;follower_demographics\&quot; for follower audience data, or \&quot;engaged_audience_demographics\&quot; for engaged viewers. (default to 'follower_demographics')
526
+ # @option opts [String] :breakdown Comma-separated list of demographic dimensions: age, city, country, gender. Defaults to all four if omitted.
527
+ # @option opts [String] :timeframe Time period for demographic data. Defaults to \&quot;this_month\&quot;. (default to 'this_month')
528
+ # @return [Array<(InstagramDemographicsResponse, Integer, Hash)>] InstagramDemographicsResponse data, response status code and response headers
529
+ def get_instagram_demographics_with_http_info(account_id, opts = {})
530
+ if @api_client.config.debugging
531
+ @api_client.config.logger.debug 'Calling API: AnalyticsApi.get_instagram_demographics ...'
532
+ end
533
+ # verify the required parameter 'account_id' is set
534
+ if @api_client.config.client_side_validation && account_id.nil?
535
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AnalyticsApi.get_instagram_demographics"
536
+ end
537
+ allowable_values = ["follower_demographics", "engaged_audience_demographics"]
538
+ if @api_client.config.client_side_validation && opts[:'metric'] && !allowable_values.include?(opts[:'metric'])
539
+ fail ArgumentError, "invalid value for \"metric\", must be one of #{allowable_values}"
540
+ end
541
+ allowable_values = ["this_week", "this_month"]
542
+ if @api_client.config.client_side_validation && opts[:'timeframe'] && !allowable_values.include?(opts[:'timeframe'])
543
+ fail ArgumentError, "invalid value for \"timeframe\", must be one of #{allowable_values}"
544
+ end
545
+ # resource path
546
+ local_var_path = '/v1/analytics/instagram/demographics'
547
+
548
+ # query parameters
549
+ query_params = opts[:query_params] || {}
550
+ query_params[:'accountId'] = account_id
551
+ query_params[:'metric'] = opts[:'metric'] if !opts[:'metric'].nil?
552
+ query_params[:'breakdown'] = opts[:'breakdown'] if !opts[:'breakdown'].nil?
553
+ query_params[:'timeframe'] = opts[:'timeframe'] if !opts[:'timeframe'].nil?
554
+
555
+ # header parameters
556
+ header_params = opts[:header_params] || {}
557
+ # HTTP header 'Accept' (if needed)
558
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
559
+
560
+ # form parameters
561
+ form_params = opts[:form_params] || {}
562
+
563
+ # http body (model)
564
+ post_body = opts[:debug_body]
565
+
566
+ # return_type
567
+ return_type = opts[:debug_return_type] || 'InstagramDemographicsResponse'
568
+
569
+ # auth_names
570
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
571
+
572
+ new_options = opts.merge(
573
+ :operation => :"AnalyticsApi.get_instagram_demographics",
574
+ :header_params => header_params,
575
+ :query_params => query_params,
576
+ :form_params => form_params,
577
+ :body => post_body,
578
+ :auth_names => auth_names,
579
+ :return_type => return_type
580
+ )
581
+
582
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
583
+ if @api_client.config.debugging
584
+ @api_client.config.logger.debug "API called: AnalyticsApi#get_instagram_demographics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
585
+ end
586
+ return data, status_code, headers
587
+ end
588
+
425
589
  # Get LinkedIn aggregate stats
426
590
  # Returns aggregate analytics across all posts for a LinkedIn personal account. Org accounts should use /v1/analytics instead. Requires r_member_postAnalytics scope.
427
591
  # @param account_id [String] The ID of the LinkedIn personal account