instagram_connect 0.3.7 → 0.3.8
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/CHANGELOG.md +10 -0
- data/app/jobs/instagram_connect/sync_media_job.rb +8 -1
- data/lib/instagram_connect/client.rb +3 -1
- data/lib/instagram_connect/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e92666f3e02d64943e955f8e20162754255471dc92bd4fc2e54e3f6db3a68111
|
|
4
|
+
data.tar.gz: 4bc700ffa63d750b2ad1313d1015e8f799edc44e56c9520d6b7be10fd494631c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0ba66b7cabad11d19321d2efa789728a97f5b668fb84c05bf3bf4c80277ab1df483e2e37ad85b87d3c6e3f6a0878a80608550e8ffb91154fb8f2e27f5490c698
|
|
7
|
+
data.tar.gz: de44cfd0f48eeafa8c4d2556d4f72de17c18218f2bba8ae9da9d8fa5f8bc67ceb41a840d8412f7a05181517288afd2c5fd92ff40128d676c6318379d389c595c
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,16 @@ All notable changes to this project are documented here. The format follows
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.3.8] - 2026-07-27
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **Media sync now carries engagement and the poster frame.** `like_count` and `comments_count`
|
|
14
|
+
come straight off the media node (no insights permission needed for the account's own posts) and
|
|
15
|
+
`thumbnail_url` is the poster for videos, whose `media_url` is a playable mp4. All three columns
|
|
16
|
+
existed since 0.3.0; nothing ever asked Meta for them.
|
|
17
|
+
|
|
18
|
+
|
|
9
19
|
## [0.3.7] - 2026-07-27
|
|
10
20
|
|
|
11
21
|
### Added
|
|
@@ -17,7 +17,11 @@ module InstagramConnect
|
|
|
17
17
|
# enqueueing it once per page view.
|
|
18
18
|
THROTTLE = 10.minutes
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
# like_count and comments_count come straight off the media node — no
|
|
21
|
+
# insights permission needed for the account's own posts. thumbnail_url is
|
|
22
|
+
# the poster frame for videos, whose media_url is a playable mp4.
|
|
23
|
+
MEDIA_FIELDS = "id,caption,media_type,media_url,thumbnail_url,permalink," \
|
|
24
|
+
"timestamp,like_count,comments_count".freeze
|
|
21
25
|
|
|
22
26
|
def self.enqueue_throttled(account)
|
|
23
27
|
Rails.cache.fetch("instagram_connect:sync_media:#{account.id}", expires_in: THROTTLE) do
|
|
@@ -62,6 +66,9 @@ module InstagramConnect
|
|
|
62
66
|
caption: item["caption"],
|
|
63
67
|
permalink: item["permalink"],
|
|
64
68
|
media_url: item["media_url"],
|
|
69
|
+
thumbnail_url: item["thumbnail_url"],
|
|
70
|
+
like_count: item["like_count"],
|
|
71
|
+
comments_count: item["comments_count"],
|
|
65
72
|
posted_at: parse_time(item["timestamp"]),
|
|
66
73
|
synced_at: Time.current
|
|
67
74
|
)
|
|
@@ -133,7 +133,9 @@ module InstagramConnect
|
|
|
133
133
|
|
|
134
134
|
def list_media(ig_user_id: @ig_user_id, limit: 25)
|
|
135
135
|
get("/#{require_ig_user_id(ig_user_id)}/media",
|
|
136
|
-
{ fields: "id,caption,media_type,media_url,permalink,
|
|
136
|
+
{ fields: "id,caption,media_type,media_url,thumbnail_url,permalink," \
|
|
137
|
+
"timestamp,like_count,comments_count",
|
|
138
|
+
limit: limit })
|
|
137
139
|
end
|
|
138
140
|
|
|
139
141
|
def media_insights(media_id:, metrics: %w[reach likes comments])
|