feat(instagram): add media count fields#1664
Conversation
📝 WalkthroughWalkthroughAdded seven new Long properties to the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/main/lombok/com/restfb/types/instagram/IgMedia.java (1)
110-185: ⚡ Quick winAdd focused deserialization tests for the new metric fields.
Please add/extend JSON-mapper tests to assert each new API key (
view_count,reposts_count,saved_count,shares_count,total_comments_count,total_like_count,total_views_count) populates the intended property and remainsnullwhen omitted.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/main/lombok/com/restfb/types/instagram/IgMedia.java` around lines 110 - 185, Add focused JSON deserialization tests for the new IgMedia metric fields: viewCount (Facebook key "view_count"), repostsCount ("reposts_count"), savedCount ("saved_count"), sharesCount ("shares_count"), totalCommentsCount ("total_comments_count"), totalLikeCount ("total_like_count"), and totalViewsCount ("total_views_count"). Locate the existing Instagram media JSON-mapper tests (the test suite that exercises com.restfb.types.instagram.IgMedia) and add cases that (1) deserialize a JSON object containing each of those keys and assert the corresponding IgMedia getters (getViewCount, getRepostsCount, getSavedCount, getSharesCount, getTotalCommentsCount, getTotalLikeCount, getTotalViewsCount) are populated with the expected Long values, and (2) deserialize JSON that omits those keys and assert the same getters return null; keep tests small and focused on these properties only.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/main/lombok/com/restfb/types/instagram/IgMedia.java`:
- Around line 110-185: Add focused JSON deserialization tests for the new
IgMedia metric fields: viewCount (Facebook key "view_count"), repostsCount
("reposts_count"), savedCount ("saved_count"), sharesCount ("shares_count"),
totalCommentsCount ("total_comments_count"), totalLikeCount
("total_like_count"), and totalViewsCount ("total_views_count"). Locate the
existing Instagram media JSON-mapper tests (the test suite that exercises
com.restfb.types.instagram.IgMedia) and add cases that (1) deserialize a JSON
object containing each of those keys and assert the corresponding IgMedia
getters (getViewCount, getRepostsCount, getSavedCount, getSharesCount,
getTotalCommentsCount, getTotalLikeCount, getTotalViewsCount) are populated with
the expected Long values, and (2) deserialize JSON that omits those keys and
assert the same getters return null; keep tests small and focused on these
properties only.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 91039da6-897e-439f-914d-172a3b6dc738
📒 Files selected for processing (1)
src/main/lombok/com/restfb/types/instagram/IgMedia.java
Summary
Verification
mvn -q -DskipTests compileSummary by CodeRabbit