late-sdk 0.0.56 → 0.0.57
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 +2 -1
- data/docs/AnalyticsApi.md +7 -7
- data/docs/AnalyticsListResponsePostsInner.md +4 -0
- data/docs/AnalyticsOverview.md +3 -1
- data/docs/AnalyticsOverviewDataStaleness.md +20 -0
- data/docs/AnalyticsSinglePostResponse.md +7 -1
- data/docs/GetAnalytics400Response.md +20 -0
- data/docs/PlatformAnalytics.md +6 -2
- data/lib/late-sdk/api/analytics_api.rb +9 -9
- data/lib/late-sdk/models/analytics_list_response_posts_inner.rb +20 -1
- data/lib/late-sdk/models/analytics_overview.rb +13 -4
- data/lib/late-sdk/models/{platform_analytics_account_metrics.rb → analytics_overview_data_staleness.rb} +18 -27
- data/lib/late-sdk/models/analytics_single_post_response.rb +56 -1
- data/lib/late-sdk/models/get_analytics400_response.rb +157 -0
- data/lib/late-sdk/models/platform_analytics.rb +73 -7
- data/lib/late-sdk/version.rb +1 -1
- data/lib/late-sdk.rb +2 -1
- data/openapi.yaml +79 -24
- data/spec/api/analytics_api_spec.rb +4 -4
- data/spec/models/analytics_list_response_posts_inner_spec.rb +12 -0
- data/spec/models/analytics_overview_data_staleness_spec.rb +42 -0
- data/spec/models/analytics_overview_spec.rb +6 -0
- data/spec/models/analytics_single_post_response_spec.rb +26 -0
- data/spec/models/{platform_analytics_account_metrics_spec.rb → get_analytics400_response_spec.rb} +8 -14
- data/spec/models/platform_analytics_spec.rb +21 -1
- metadata +9 -5
- data/docs/PlatformAnalyticsAccountMetrics.md +0 -22
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6327198d2961e2b56d6cf99d47a4a1fc455016ceb07d8d6280251bb4f8c8858f
|
|
4
|
+
data.tar.gz: 18557feeabc461ccd782429571a6c9e8036c3973967af02ba6da61ab292df39f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a8022b87b5ad526f8278d6958313c69a273b8174bab36171402e39401c3f95f6bf94729239903c3ad9631f14e7400c422ef791e83ffab8ad2b22a623ac95c06a
|
|
7
|
+
data.tar.gz: 754d0b64120de601e6c130e5be467c0f99418a456d8188b6e4664fcfa28a516a404b71e97e8cf1a859c9519fa499e217754cfd86bb8ec018c2152fc94b08d120
|
data/README.md
CHANGED
|
@@ -262,6 +262,7 @@ Class | Method | HTTP request | Description
|
|
|
262
262
|
- [Late::AnalyticsListResponse](docs/AnalyticsListResponse.md)
|
|
263
263
|
- [Late::AnalyticsListResponsePostsInner](docs/AnalyticsListResponsePostsInner.md)
|
|
264
264
|
- [Late::AnalyticsOverview](docs/AnalyticsOverview.md)
|
|
265
|
+
- [Late::AnalyticsOverviewDataStaleness](docs/AnalyticsOverviewDataStaleness.md)
|
|
265
266
|
- [Late::AnalyticsSinglePostResponse](docs/AnalyticsSinglePostResponse.md)
|
|
266
267
|
- [Late::AnalyticsSinglePostResponseMediaItemsInner](docs/AnalyticsSinglePostResponseMediaItemsInner.md)
|
|
267
268
|
- [Late::ApiKey](docs/ApiKey.md)
|
|
@@ -374,6 +375,7 @@ Class | Method | HTTP request | Description
|
|
|
374
375
|
- [Late::GetAllAccountsHealth200ResponseAccountsInner](docs/GetAllAccountsHealth200ResponseAccountsInner.md)
|
|
375
376
|
- [Late::GetAllAccountsHealth200ResponseSummary](docs/GetAllAccountsHealth200ResponseSummary.md)
|
|
376
377
|
- [Late::GetAnalytics200Response](docs/GetAnalytics200Response.md)
|
|
378
|
+
- [Late::GetAnalytics400Response](docs/GetAnalytics400Response.md)
|
|
377
379
|
- [Late::GetAnalytics402Response](docs/GetAnalytics402Response.md)
|
|
378
380
|
- [Late::GetBestTimeToPost200Response](docs/GetBestTimeToPost200Response.md)
|
|
379
381
|
- [Late::GetBestTimeToPost200ResponseSlotsInner](docs/GetBestTimeToPost200ResponseSlotsInner.md)
|
|
@@ -579,7 +581,6 @@ Class | Method | HTTP request | Description
|
|
|
579
581
|
- [Late::Pending](docs/Pending.md)
|
|
580
582
|
- [Late::PinterestPlatformData](docs/PinterestPlatformData.md)
|
|
581
583
|
- [Late::PlatformAnalytics](docs/PlatformAnalytics.md)
|
|
582
|
-
- [Late::PlatformAnalyticsAccountMetrics](docs/PlatformAnalyticsAccountMetrics.md)
|
|
583
584
|
- [Late::PlatformTarget](docs/PlatformTarget.md)
|
|
584
585
|
- [Late::PlatformTargetAccountId](docs/PlatformTargetAccountId.md)
|
|
585
586
|
- [Late::PlatformTargetPlatformSpecificData](docs/PlatformTargetPlatformSpecificData.md)
|
data/docs/AnalyticsApi.md
CHANGED
|
@@ -23,7 +23,7 @@ All URIs are relative to *https://getlate.dev/api*
|
|
|
23
23
|
|
|
24
24
|
Get post analytics
|
|
25
25
|
|
|
26
|
-
Returns analytics for posts. With postId, returns a single post. Without it, returns a paginated list with overview stats. Accepts both Late Post IDs and External Post IDs (auto-resolved).
|
|
26
|
+
Returns analytics for posts. With postId, returns a single post. Without it, returns a paginated list with overview stats. Accepts both Late Post IDs and External Post IDs (auto-resolved). fromDate defaults to 90 days ago if omitted, max range 366 days. Single post lookups may return 202 (sync pending) or 424 (all platforms failed). For follower stats, use /v1/accounts/follower-stats.
|
|
27
27
|
|
|
28
28
|
### Examples
|
|
29
29
|
|
|
@@ -42,11 +42,11 @@ opts = {
|
|
|
42
42
|
platform: 'platform_example', # String | Filter by platform (default \"all\")
|
|
43
43
|
profile_id: 'profile_id_example', # String | Filter by profile ID (default \"all\")
|
|
44
44
|
source: 'all', # String | Filter by post source: late (posted via Late API), external (synced from platform), all (default)
|
|
45
|
-
from_date: Date.parse('2013-10-20'), # Date | Inclusive lower bound
|
|
46
|
-
to_date: Date.parse('2013-10-20'), # Date | Inclusive upper bound
|
|
45
|
+
from_date: Date.parse('2013-10-20'), # Date | Inclusive lower bound (YYYY-MM-DD). Defaults to 90 days ago if omitted. Max range is 366 days.
|
|
46
|
+
to_date: Date.parse('2013-10-20'), # Date | Inclusive upper bound (YYYY-MM-DD). Defaults to today if omitted.
|
|
47
47
|
limit: 56, # Integer | Page size (default 50)
|
|
48
48
|
page: 56, # Integer | Page number (default 1)
|
|
49
|
-
sort_by: 'date', # String | Sort by date or
|
|
49
|
+
sort_by: 'date', # String | Sort by date, engagement, or a specific metric
|
|
50
50
|
order: 'asc' # String | Sort order
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -85,11 +85,11 @@ end
|
|
|
85
85
|
| **platform** | **String** | Filter by platform (default \"all\") | [optional] |
|
|
86
86
|
| **profile_id** | **String** | Filter by profile ID (default \"all\") | [optional] |
|
|
87
87
|
| **source** | **String** | Filter by post source: late (posted via Late API), external (synced from platform), all (default) | [optional][default to 'all'] |
|
|
88
|
-
| **from_date** | **Date** | Inclusive lower bound | [optional] |
|
|
89
|
-
| **to_date** | **Date** | Inclusive upper bound | [optional] |
|
|
88
|
+
| **from_date** | **Date** | Inclusive lower bound (YYYY-MM-DD). Defaults to 90 days ago if omitted. Max range is 366 days. | [optional] |
|
|
89
|
+
| **to_date** | **Date** | Inclusive upper bound (YYYY-MM-DD). Defaults to today if omitted. | [optional] |
|
|
90
90
|
| **limit** | **Integer** | Page size (default 50) | [optional][default to 50] |
|
|
91
91
|
| **page** | **Integer** | Page number (default 1) | [optional][default to 1] |
|
|
92
|
-
| **sort_by** | **String** | Sort by date or
|
|
92
|
+
| **sort_by** | **String** | Sort by date, engagement, or a specific metric | [optional][default to 'date'] |
|
|
93
93
|
| **order** | **String** | Sort order | [optional][default to 'desc'] |
|
|
94
94
|
|
|
95
95
|
### Return type
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **_id** | **String** | | [optional] |
|
|
8
|
+
| **late_post_id** | **String** | Original Late post ID if scheduled via Late | [optional] |
|
|
8
9
|
| **content** | **String** | | [optional] |
|
|
9
10
|
| **scheduled_for** | **Time** | | [optional] |
|
|
10
11
|
| **published_at** | **Time** | | [optional] |
|
|
@@ -14,6 +15,7 @@
|
|
|
14
15
|
| **platform** | **String** | | [optional] |
|
|
15
16
|
| **platform_post_url** | **String** | | [optional] |
|
|
16
17
|
| **is_external** | **Boolean** | | [optional] |
|
|
18
|
+
| **profile_id** | **String** | | [optional] |
|
|
17
19
|
| **thumbnail_url** | **String** | | [optional] |
|
|
18
20
|
| **media_type** | **String** | | [optional] |
|
|
19
21
|
| **media_items** | [**Array<AnalyticsSinglePostResponseMediaItemsInner>**](AnalyticsSinglePostResponseMediaItemsInner.md) | All media items for this post. Carousel posts contain one entry per slide. | [optional] |
|
|
@@ -25,6 +27,7 @@ require 'late-sdk'
|
|
|
25
27
|
|
|
26
28
|
instance = Late::AnalyticsListResponsePostsInner.new(
|
|
27
29
|
_id: null,
|
|
30
|
+
late_post_id: null,
|
|
28
31
|
content: null,
|
|
29
32
|
scheduled_for: null,
|
|
30
33
|
published_at: null,
|
|
@@ -34,6 +37,7 @@ instance = Late::AnalyticsListResponsePostsInner.new(
|
|
|
34
37
|
platform: null,
|
|
35
38
|
platform_post_url: null,
|
|
36
39
|
is_external: null,
|
|
40
|
+
profile_id: null,
|
|
37
41
|
thumbnail_url: null,
|
|
38
42
|
media_type: null,
|
|
39
43
|
media_items: null
|
data/docs/AnalyticsOverview.md
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
| **published_posts** | **Integer** | | [optional] |
|
|
9
9
|
| **scheduled_posts** | **Integer** | | [optional] |
|
|
10
10
|
| **last_sync** | **Time** | | [optional] |
|
|
11
|
+
| **data_staleness** | [**AnalyticsOverviewDataStaleness**](AnalyticsOverviewDataStaleness.md) | | [optional] |
|
|
11
12
|
|
|
12
13
|
## Example
|
|
13
14
|
|
|
@@ -18,7 +19,8 @@ instance = Late::AnalyticsOverview.new(
|
|
|
18
19
|
total_posts: null,
|
|
19
20
|
published_posts: null,
|
|
20
21
|
scheduled_posts: null,
|
|
21
|
-
last_sync: null
|
|
22
|
+
last_sync: null,
|
|
23
|
+
data_staleness: null
|
|
22
24
|
)
|
|
23
25
|
```
|
|
24
26
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Late::AnalyticsOverviewDataStaleness
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **stale_account_count** | **Integer** | Number of accounts with stale analytics data | [optional] |
|
|
8
|
+
| **sync_triggered** | **Boolean** | Whether a background sync was triggered for stale accounts | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'late-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Late::AnalyticsOverviewDataStaleness.new(
|
|
16
|
+
stale_account_count: null,
|
|
17
|
+
sync_triggered: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **post_id** | **String** | | [optional] |
|
|
8
|
-
| **
|
|
8
|
+
| **late_post_id** | **String** | Original Late post ID if scheduled via Late | [optional] |
|
|
9
|
+
| **status** | **String** | Overall post status. \"partial\" when some platforms published and others failed. | [optional] |
|
|
9
10
|
| **content** | **String** | | [optional] |
|
|
10
11
|
| **scheduled_for** | **Time** | | [optional] |
|
|
11
12
|
| **published_at** | **Time** | | [optional] |
|
|
@@ -14,6 +15,8 @@
|
|
|
14
15
|
| **platform** | **String** | | [optional] |
|
|
15
16
|
| **platform_post_url** | **String** | | [optional] |
|
|
16
17
|
| **is_external** | **Boolean** | | [optional] |
|
|
18
|
+
| **sync_status** | **String** | Overall sync state across all platforms | [optional] |
|
|
19
|
+
| **message** | **String** | Human-readable status message for pending, partial, or failed states | [optional] |
|
|
17
20
|
| **thumbnail_url** | **String** | | [optional] |
|
|
18
21
|
| **media_type** | **String** | | [optional] |
|
|
19
22
|
| **media_items** | [**Array<AnalyticsSinglePostResponseMediaItemsInner>**](AnalyticsSinglePostResponseMediaItemsInner.md) | All media items for this post. Carousel posts contain one entry per slide. | [optional] |
|
|
@@ -25,6 +28,7 @@ require 'late-sdk'
|
|
|
25
28
|
|
|
26
29
|
instance = Late::AnalyticsSinglePostResponse.new(
|
|
27
30
|
post_id: null,
|
|
31
|
+
late_post_id: null,
|
|
28
32
|
status: null,
|
|
29
33
|
content: null,
|
|
30
34
|
scheduled_for: null,
|
|
@@ -34,6 +38,8 @@ instance = Late::AnalyticsSinglePostResponse.new(
|
|
|
34
38
|
platform: null,
|
|
35
39
|
platform_post_url: null,
|
|
36
40
|
is_external: null,
|
|
41
|
+
sync_status: null,
|
|
42
|
+
message: null,
|
|
37
43
|
thumbnail_url: null,
|
|
38
44
|
media_type: null,
|
|
39
45
|
media_items: null
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Late::GetAnalytics400Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **error** | **String** | | [optional] |
|
|
8
|
+
| **details** | **Object** | Detailed validation errors | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'late-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Late::GetAnalytics400Response.new(
|
|
16
|
+
error: Invalid query parameters,
|
|
17
|
+
details: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
data/docs/PlatformAnalytics.md
CHANGED
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
| **account_id** | **String** | | [optional] |
|
|
10
10
|
| **account_username** | **String** | | [optional] |
|
|
11
11
|
| **analytics** | [**PostAnalytics**](PostAnalytics.md) | | [optional] |
|
|
12
|
-
| **
|
|
12
|
+
| **sync_status** | **String** | Sync state of analytics for this platform | [optional] |
|
|
13
|
+
| **platform_post_url** | **String** | | [optional] |
|
|
14
|
+
| **error_message** | **String** | Error details when status is failed | [optional] |
|
|
13
15
|
|
|
14
16
|
## Example
|
|
15
17
|
|
|
@@ -22,7 +24,9 @@ instance = Late::PlatformAnalytics.new(
|
|
|
22
24
|
account_id: null,
|
|
23
25
|
account_username: null,
|
|
24
26
|
analytics: null,
|
|
25
|
-
|
|
27
|
+
sync_status: null,
|
|
28
|
+
platform_post_url: null,
|
|
29
|
+
error_message: null
|
|
26
30
|
)
|
|
27
31
|
```
|
|
28
32
|
|
|
@@ -20,17 +20,17 @@ module Late
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Get post analytics
|
|
23
|
-
# Returns analytics for posts. With postId, returns a single post. Without it, returns a paginated list with overview stats. Accepts both Late Post IDs and External Post IDs (auto-resolved).
|
|
23
|
+
# Returns analytics for posts. With postId, returns a single post. Without it, returns a paginated list with overview stats. Accepts both Late Post IDs and External Post IDs (auto-resolved). fromDate defaults to 90 days ago if omitted, max range 366 days. Single post lookups may return 202 (sync pending) or 424 (all platforms failed). For follower stats, use /v1/accounts/follower-stats.
|
|
24
24
|
# @param [Hash] opts the optional parameters
|
|
25
25
|
# @option opts [String] :post_id Returns analytics for a single post. Accepts both Late Post IDs and External Post IDs. Late IDs are auto-resolved to External Post analytics.
|
|
26
26
|
# @option opts [String] :platform Filter by platform (default \"all\")
|
|
27
27
|
# @option opts [String] :profile_id Filter by profile ID (default \"all\")
|
|
28
28
|
# @option opts [String] :source Filter by post source: late (posted via Late API), external (synced from platform), all (default) (default to 'all')
|
|
29
|
-
# @option opts [Date] :from_date Inclusive lower bound
|
|
30
|
-
# @option opts [Date] :to_date Inclusive upper bound
|
|
29
|
+
# @option opts [Date] :from_date Inclusive lower bound (YYYY-MM-DD). Defaults to 90 days ago if omitted. Max range is 366 days.
|
|
30
|
+
# @option opts [Date] :to_date Inclusive upper bound (YYYY-MM-DD). Defaults to today if omitted.
|
|
31
31
|
# @option opts [Integer] :limit Page size (default 50) (default to 50)
|
|
32
32
|
# @option opts [Integer] :page Page number (default 1) (default to 1)
|
|
33
|
-
# @option opts [String] :sort_by Sort by date or
|
|
33
|
+
# @option opts [String] :sort_by Sort by date, engagement, or a specific metric (default to 'date')
|
|
34
34
|
# @option opts [String] :order Sort order (default to 'desc')
|
|
35
35
|
# @return [GetAnalytics200Response]
|
|
36
36
|
def get_analytics(opts = {})
|
|
@@ -39,17 +39,17 @@ module Late
|
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
# Get post analytics
|
|
42
|
-
# Returns analytics for posts. With postId, returns a single post. Without it, returns a paginated list with overview stats. Accepts both Late Post IDs and External Post IDs (auto-resolved).
|
|
42
|
+
# Returns analytics for posts. With postId, returns a single post. Without it, returns a paginated list with overview stats. Accepts both Late Post IDs and External Post IDs (auto-resolved). fromDate defaults to 90 days ago if omitted, max range 366 days. Single post lookups may return 202 (sync pending) or 424 (all platforms failed). For follower stats, use /v1/accounts/follower-stats.
|
|
43
43
|
# @param [Hash] opts the optional parameters
|
|
44
44
|
# @option opts [String] :post_id Returns analytics for a single post. Accepts both Late Post IDs and External Post IDs. Late IDs are auto-resolved to External Post analytics.
|
|
45
45
|
# @option opts [String] :platform Filter by platform (default \"all\")
|
|
46
46
|
# @option opts [String] :profile_id Filter by profile ID (default \"all\")
|
|
47
47
|
# @option opts [String] :source Filter by post source: late (posted via Late API), external (synced from platform), all (default) (default to 'all')
|
|
48
|
-
# @option opts [Date] :from_date Inclusive lower bound
|
|
49
|
-
# @option opts [Date] :to_date Inclusive upper bound
|
|
48
|
+
# @option opts [Date] :from_date Inclusive lower bound (YYYY-MM-DD). Defaults to 90 days ago if omitted. Max range is 366 days.
|
|
49
|
+
# @option opts [Date] :to_date Inclusive upper bound (YYYY-MM-DD). Defaults to today if omitted.
|
|
50
50
|
# @option opts [Integer] :limit Page size (default 50) (default to 50)
|
|
51
51
|
# @option opts [Integer] :page Page number (default 1) (default to 1)
|
|
52
|
-
# @option opts [String] :sort_by Sort by date or
|
|
52
|
+
# @option opts [String] :sort_by Sort by date, engagement, or a specific metric (default to 'date')
|
|
53
53
|
# @option opts [String] :order Sort order (default to 'desc')
|
|
54
54
|
# @return [Array<(GetAnalytics200Response, Integer, Hash)>] GetAnalytics200Response data, response status code and response headers
|
|
55
55
|
def get_analytics_with_http_info(opts = {})
|
|
@@ -72,7 +72,7 @@ module Late
|
|
|
72
72
|
fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AnalyticsApi.get_analytics, must be greater than or equal to 1.'
|
|
73
73
|
end
|
|
74
74
|
|
|
75
|
-
allowable_values = ["date", "engagement"]
|
|
75
|
+
allowable_values = ["date", "engagement", "impressions", "reach", "likes", "comments", "shares", "saves", "clicks", "views"]
|
|
76
76
|
if @api_client.config.client_side_validation && opts[:'sort_by'] && !allowable_values.include?(opts[:'sort_by'])
|
|
77
77
|
fail ArgumentError, "invalid value for \"sort_by\", must be one of #{allowable_values}"
|
|
78
78
|
end
|
|
@@ -17,6 +17,9 @@ module Late
|
|
|
17
17
|
class AnalyticsListResponsePostsInner < ApiModelBase
|
|
18
18
|
attr_accessor :_id
|
|
19
19
|
|
|
20
|
+
# Original Late post ID if scheduled via Late
|
|
21
|
+
attr_accessor :late_post_id
|
|
22
|
+
|
|
20
23
|
attr_accessor :content
|
|
21
24
|
|
|
22
25
|
attr_accessor :scheduled_for
|
|
@@ -35,6 +38,8 @@ module Late
|
|
|
35
38
|
|
|
36
39
|
attr_accessor :is_external
|
|
37
40
|
|
|
41
|
+
attr_accessor :profile_id
|
|
42
|
+
|
|
38
43
|
attr_accessor :thumbnail_url
|
|
39
44
|
|
|
40
45
|
attr_accessor :media_type
|
|
@@ -68,6 +73,7 @@ module Late
|
|
|
68
73
|
def self.attribute_map
|
|
69
74
|
{
|
|
70
75
|
:'_id' => :'_id',
|
|
76
|
+
:'late_post_id' => :'latePostId',
|
|
71
77
|
:'content' => :'content',
|
|
72
78
|
:'scheduled_for' => :'scheduledFor',
|
|
73
79
|
:'published_at' => :'publishedAt',
|
|
@@ -77,6 +83,7 @@ module Late
|
|
|
77
83
|
:'platform' => :'platform',
|
|
78
84
|
:'platform_post_url' => :'platformPostUrl',
|
|
79
85
|
:'is_external' => :'isExternal',
|
|
86
|
+
:'profile_id' => :'profileId',
|
|
80
87
|
:'thumbnail_url' => :'thumbnailUrl',
|
|
81
88
|
:'media_type' => :'mediaType',
|
|
82
89
|
:'media_items' => :'mediaItems'
|
|
@@ -97,6 +104,7 @@ module Late
|
|
|
97
104
|
def self.openapi_types
|
|
98
105
|
{
|
|
99
106
|
:'_id' => :'String',
|
|
107
|
+
:'late_post_id' => :'String',
|
|
100
108
|
:'content' => :'String',
|
|
101
109
|
:'scheduled_for' => :'Time',
|
|
102
110
|
:'published_at' => :'Time',
|
|
@@ -106,6 +114,7 @@ module Late
|
|
|
106
114
|
:'platform' => :'String',
|
|
107
115
|
:'platform_post_url' => :'String',
|
|
108
116
|
:'is_external' => :'Boolean',
|
|
117
|
+
:'profile_id' => :'String',
|
|
109
118
|
:'thumbnail_url' => :'String',
|
|
110
119
|
:'media_type' => :'String',
|
|
111
120
|
:'media_items' => :'Array<AnalyticsSinglePostResponseMediaItemsInner>'
|
|
@@ -138,6 +147,10 @@ module Late
|
|
|
138
147
|
self._id = attributes[:'_id']
|
|
139
148
|
end
|
|
140
149
|
|
|
150
|
+
if attributes.key?(:'late_post_id')
|
|
151
|
+
self.late_post_id = attributes[:'late_post_id']
|
|
152
|
+
end
|
|
153
|
+
|
|
141
154
|
if attributes.key?(:'content')
|
|
142
155
|
self.content = attributes[:'content']
|
|
143
156
|
end
|
|
@@ -176,6 +189,10 @@ module Late
|
|
|
176
189
|
self.is_external = attributes[:'is_external']
|
|
177
190
|
end
|
|
178
191
|
|
|
192
|
+
if attributes.key?(:'profile_id')
|
|
193
|
+
self.profile_id = attributes[:'profile_id']
|
|
194
|
+
end
|
|
195
|
+
|
|
179
196
|
if attributes.key?(:'thumbnail_url')
|
|
180
197
|
self.thumbnail_url = attributes[:'thumbnail_url']
|
|
181
198
|
end
|
|
@@ -224,6 +241,7 @@ module Late
|
|
|
224
241
|
return true if self.equal?(o)
|
|
225
242
|
self.class == o.class &&
|
|
226
243
|
_id == o._id &&
|
|
244
|
+
late_post_id == o.late_post_id &&
|
|
227
245
|
content == o.content &&
|
|
228
246
|
scheduled_for == o.scheduled_for &&
|
|
229
247
|
published_at == o.published_at &&
|
|
@@ -233,6 +251,7 @@ module Late
|
|
|
233
251
|
platform == o.platform &&
|
|
234
252
|
platform_post_url == o.platform_post_url &&
|
|
235
253
|
is_external == o.is_external &&
|
|
254
|
+
profile_id == o.profile_id &&
|
|
236
255
|
thumbnail_url == o.thumbnail_url &&
|
|
237
256
|
media_type == o.media_type &&
|
|
238
257
|
media_items == o.media_items
|
|
@@ -247,7 +266,7 @@ module Late
|
|
|
247
266
|
# Calculates hash code according to all attributes.
|
|
248
267
|
# @return [Integer] Hash code
|
|
249
268
|
def hash
|
|
250
|
-
[_id, content, scheduled_for, published_at, status, analytics, platforms, platform, platform_post_url, is_external, thumbnail_url, media_type, media_items].hash
|
|
269
|
+
[_id, late_post_id, content, scheduled_for, published_at, status, analytics, platforms, platform, platform_post_url, is_external, profile_id, thumbnail_url, media_type, media_items].hash
|
|
251
270
|
end
|
|
252
271
|
|
|
253
272
|
# Builds the object from hash
|
|
@@ -23,13 +23,16 @@ module Late
|
|
|
23
23
|
|
|
24
24
|
attr_accessor :last_sync
|
|
25
25
|
|
|
26
|
+
attr_accessor :data_staleness
|
|
27
|
+
|
|
26
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
29
|
def self.attribute_map
|
|
28
30
|
{
|
|
29
31
|
:'total_posts' => :'totalPosts',
|
|
30
32
|
:'published_posts' => :'publishedPosts',
|
|
31
33
|
:'scheduled_posts' => :'scheduledPosts',
|
|
32
|
-
:'last_sync' => :'lastSync'
|
|
34
|
+
:'last_sync' => :'lastSync',
|
|
35
|
+
:'data_staleness' => :'dataStaleness'
|
|
33
36
|
}
|
|
34
37
|
end
|
|
35
38
|
|
|
@@ -49,7 +52,8 @@ module Late
|
|
|
49
52
|
:'total_posts' => :'Integer',
|
|
50
53
|
:'published_posts' => :'Integer',
|
|
51
54
|
:'scheduled_posts' => :'Integer',
|
|
52
|
-
:'last_sync' => :'Time'
|
|
55
|
+
:'last_sync' => :'Time',
|
|
56
|
+
:'data_staleness' => :'AnalyticsOverviewDataStaleness'
|
|
53
57
|
}
|
|
54
58
|
end
|
|
55
59
|
|
|
@@ -90,6 +94,10 @@ module Late
|
|
|
90
94
|
if attributes.key?(:'last_sync')
|
|
91
95
|
self.last_sync = attributes[:'last_sync']
|
|
92
96
|
end
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'data_staleness')
|
|
99
|
+
self.data_staleness = attributes[:'data_staleness']
|
|
100
|
+
end
|
|
93
101
|
end
|
|
94
102
|
|
|
95
103
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -115,7 +123,8 @@ module Late
|
|
|
115
123
|
total_posts == o.total_posts &&
|
|
116
124
|
published_posts == o.published_posts &&
|
|
117
125
|
scheduled_posts == o.scheduled_posts &&
|
|
118
|
-
last_sync == o.last_sync
|
|
126
|
+
last_sync == o.last_sync &&
|
|
127
|
+
data_staleness == o.data_staleness
|
|
119
128
|
end
|
|
120
129
|
|
|
121
130
|
# @see the `==` method
|
|
@@ -127,7 +136,7 @@ module Late
|
|
|
127
136
|
# Calculates hash code according to all attributes.
|
|
128
137
|
# @return [Integer] Hash code
|
|
129
138
|
def hash
|
|
130
|
-
[total_posts, published_posts, scheduled_posts, last_sync].hash
|
|
139
|
+
[total_posts, published_posts, scheduled_posts, last_sync, data_staleness].hash
|
|
131
140
|
end
|
|
132
141
|
|
|
133
142
|
# Builds the object from hash
|
|
@@ -14,21 +14,18 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Late
|
|
17
|
-
class
|
|
18
|
-
#
|
|
19
|
-
attr_accessor :
|
|
17
|
+
class AnalyticsOverviewDataStaleness < ApiModelBase
|
|
18
|
+
# Number of accounts with stale analytics data
|
|
19
|
+
attr_accessor :stale_account_count
|
|
20
20
|
|
|
21
|
-
#
|
|
22
|
-
attr_accessor :
|
|
23
|
-
|
|
24
|
-
attr_accessor :last_updated
|
|
21
|
+
# Whether a background sync was triggered for stale accounts
|
|
22
|
+
attr_accessor :sync_triggered
|
|
25
23
|
|
|
26
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
25
|
def self.attribute_map
|
|
28
26
|
{
|
|
29
|
-
:'
|
|
30
|
-
:'
|
|
31
|
-
:'last_updated' => :'lastUpdated'
|
|
27
|
+
:'stale_account_count' => :'staleAccountCount',
|
|
28
|
+
:'sync_triggered' => :'syncTriggered'
|
|
32
29
|
}
|
|
33
30
|
end
|
|
34
31
|
|
|
@@ -45,9 +42,8 @@ module Late
|
|
|
45
42
|
# Attribute type mapping.
|
|
46
43
|
def self.openapi_types
|
|
47
44
|
{
|
|
48
|
-
:'
|
|
49
|
-
:'
|
|
50
|
-
:'last_updated' => :'Time'
|
|
45
|
+
:'stale_account_count' => :'Integer',
|
|
46
|
+
:'sync_triggered' => :'Boolean'
|
|
51
47
|
}
|
|
52
48
|
end
|
|
53
49
|
|
|
@@ -61,28 +57,24 @@ module Late
|
|
|
61
57
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
62
58
|
def initialize(attributes = {})
|
|
63
59
|
if (!attributes.is_a?(Hash))
|
|
64
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Late::
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Late::AnalyticsOverviewDataStaleness` initialize method"
|
|
65
61
|
end
|
|
66
62
|
|
|
67
63
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
68
64
|
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
69
65
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
70
66
|
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
71
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Late::
|
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Late::AnalyticsOverviewDataStaleness`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
72
68
|
end
|
|
73
69
|
h[k.to_sym] = v
|
|
74
70
|
}
|
|
75
71
|
|
|
76
|
-
if attributes.key?(:'
|
|
77
|
-
self.
|
|
78
|
-
end
|
|
79
|
-
|
|
80
|
-
if attributes.key?(:'subscribers')
|
|
81
|
-
self.subscribers = attributes[:'subscribers']
|
|
72
|
+
if attributes.key?(:'stale_account_count')
|
|
73
|
+
self.stale_account_count = attributes[:'stale_account_count']
|
|
82
74
|
end
|
|
83
75
|
|
|
84
|
-
if attributes.key?(:'
|
|
85
|
-
self.
|
|
76
|
+
if attributes.key?(:'sync_triggered')
|
|
77
|
+
self.sync_triggered = attributes[:'sync_triggered']
|
|
86
78
|
end
|
|
87
79
|
end
|
|
88
80
|
|
|
@@ -106,9 +98,8 @@ module Late
|
|
|
106
98
|
def ==(o)
|
|
107
99
|
return true if self.equal?(o)
|
|
108
100
|
self.class == o.class &&
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
last_updated == o.last_updated
|
|
101
|
+
stale_account_count == o.stale_account_count &&
|
|
102
|
+
sync_triggered == o.sync_triggered
|
|
112
103
|
end
|
|
113
104
|
|
|
114
105
|
# @see the `==` method
|
|
@@ -120,7 +111,7 @@ module Late
|
|
|
120
111
|
# Calculates hash code according to all attributes.
|
|
121
112
|
# @return [Integer] Hash code
|
|
122
113
|
def hash
|
|
123
|
-
[
|
|
114
|
+
[stale_account_count, sync_triggered].hash
|
|
124
115
|
end
|
|
125
116
|
|
|
126
117
|
# Builds the object from hash
|